Skip to content

Commit

Permalink
1. rename db to drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
iasergunin committed Dec 15, 2023
1 parent d561536 commit 4cb0add
Show file tree
Hide file tree
Showing 91 changed files with 72 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
postgres:
image: postgres
env:
POSTGRES_DB: dbs
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
ports:
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ Easiest way to get the perfect repository.

## Supported implementations

* [database/sql](https://pkg.go.dev/database/sql), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/db/sql/v2) (
* [database/sql](https://pkg.go.dev/database/sql), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/drivers/sql/v2) (
Go 1.13)
* [jmoiron/sqlx](https://github.com/jmoiron/sqlx), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/db/sqlx/v2) (
* [jmoiron/sqlx](https://github.com/jmoiron/sqlx), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2) (
Go 1.13)
* [gorm](https://github.com/go-gorm/gorm), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/db/gorm/v2) (
* [gorm](https://github.com/go-gorm/gorm), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/drivers/gorm/v2) (
Go 1.18)
* [mongo-go-driver](https://github.com/mongodb/mongo-go-driver), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/db/mongo/v2) (
* [mongo-go-driver](https://github.com/mongodb/mongo-go-driver), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/drivers/mongo/v2) (
Go 1.13)
* [go-redis/redis](https://github.com/go-redis/redis), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/db/go-redis-v8/v2) (
* [go-redis/redis](https://github.com/go-redis/redis), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/drivers/go-redis-v8/v2) (
Go 1.17)
* [pgx_v4](https://github.com/jackc/pgx/tree/v4), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/db/pgxv4/v2) (
* [pgx_v4](https://github.com/jackc/pgx/tree/v4), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/drivers/pgxv4/v2) (
Go 1.16)
* [pgx_v5](https://github.com/jackc/pgx), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/db/pgxv5/v2) (
* [pgx_v5](https://github.com/jackc/pgx), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/drivers/pgxv5/v2) (
Go 1.19)

## Installation
Expand All @@ -33,9 +33,9 @@ Easiest way to get the perfect repository.
go get github.com/avito-tech/go-transaction-manager/v2
```

To install some support database use `go get github.com/avito-tech/go-transaction-manager/db/{name}/v2`.
To install some support database use `go get github.com/avito-tech/go-transaction-manager/drivers/{name}/v2`.

For example `go get github.com/avito-tech/go-transaction-manager/db/sqlx/v2`.
For example `go get github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2`.

### Backwards Compatibility

Expand All @@ -56,13 +56,13 @@ use [ChainedMW](manager/chain.go) ([docs](https://pkg.go.dev/github.com/github.c

### Examples with an ideal *repository* and nested transactions.

* [database/sql](dbs/sql/example_test.go)
* [jmoiron/sqlx](dbs/sqlx/example_test.go)
* [gorm](dbs/gorm/example_test.go)
* [mongo-go-driver](dbs/mongo/example_test.go)
* [go-redis/redis](dbs/go-redis-v8/example_test.go)
* [pgx_v4](dbs/pgxv4/example_test.go)
* [pgx_v5](dbs/pgxv5/example_test.go)
* [database/sql](drivers/sql/example_test.go)
* [jmoiron/sqlx](drivers/sqlx/example_test.go)
* [gorm](drivers/gorm/example_test.go)
* [mongo-go-driver](drivers/mongo/example_test.go)
* [go-redis/redis](drivers/go-redis-v8/example_test.go)
* [pgx_v4](drivers/pgxv4/example_test.go)
* [pgx_v5](drivers/pgxv5/example_test.go)

Below is an example how to start usage.

Expand All @@ -76,7 +76,7 @@ import (
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"

trmsqlx "github.com/avito-tech/go-transaction-manager/dbs/sqlx/v2"
trmsqlx "github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2"
"github.com/avito-tech/go-transaction-manager/v2/manager"
)

Expand Down Expand Up @@ -127,8 +127,8 @@ func newRepo(db *sqlx.DB, c *trmsqlx.CtxGetter) *repo {
}

type user struct {
ID int64 `dbs:"user_id"`
Username string `dbs:"username"`
ID int64 `db:"user_id"`
Username string `db:"username"`
}

func (r *repo) GetByID(ctx context.Context, id int64) (*user, error) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"encoding/json"
"fmt"

trm "github.com/avito-tech/go-transaction-manager/v2"
"github.com/go-redis/redis/v8"

trm "github.com/avito-tech/go-transaction-manager/v2"
"github.com/avito-tech/go-transaction-manager/v2/manager"
"github.com/avito-tech/go-transaction-manager/v2/settings"

trmredis "github.com/avito-tech/go-transaction-manager/db/go-redis-v8/v2"
trmredis "github.com/avito-tech/go-transaction-manager/drivers/go-redis-v8/v2"
)

// Example demonstrates the implementation of the Repository pattern by trm.Manager.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/go-redis-v8/go.mod → drivers/go-redis-v8/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/avito-tech/go-transaction-manager/db/go-redis-v8/v2
module github.com/avito-tech/go-transaction-manager/drivers/go-redis-v8/v2

go 1.13

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"fmt"
"time"

"github.com/go-redis/redis/v8"

trm "github.com/avito-tech/go-transaction-manager/v2"
"github.com/avito-tech/go-transaction-manager/v2/manager"
"github.com/avito-tech/go-transaction-manager/v2/settings"
"github.com/go-redis/redis/v8"

trmredis "github.com/avito-tech/go-transaction-manager/db/go-redis-v8/v2"
trmredis "github.com/avito-tech/go-transaction-manager/drivers/go-redis-v8/v2"
)

// Example demonstrates the watching of updated keys.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions dbs/gorm/example_test.go → drivers/gorm/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import (
"gorm.io/driver/sqlite"
"gorm.io/gorm"

trmgorm "github.com/avito-tech/go-transaction-manager/db/gorm/v2"
trmgorm "github.com/avito-tech/go-transaction-manager/drivers/gorm/v2"
trm "github.com/avito-tech/go-transaction-manager/v2"
"github.com/avito-tech/go-transaction-manager/v2/manager"
"github.com/avito-tech/go-transaction-manager/v2/settings"
)

// Example demonstrates the implementation of the Repository pattern by trm.Manager.
func Example() {
db, err := gorm.Open(sqlite.Open("file:test.dbs?mode=memory"))
db, err := gorm.Open(sqlite.Open("file:test.drivers?mode=memory"))
checkErr(err)

// Migrate the schema
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/gorm/go.mod → drivers/gorm/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/avito-tech/go-transaction-manager/db/gorm/v2
module github.com/avito-tech/go-transaction-manager/drivers/gorm/v2

go 1.18

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/gorm/go.work → drivers/gorm/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../
replace github.com/avito-tech/go-transaction-manager/db/sql/v2 => ../sql
replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 2 additions & 4 deletions dbs/mongo/example_test.go → drivers/mongo/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import (
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

trmsql "github.com/avito-tech/go-transaction-manager/dbs/sql/v2"

trmmongo "github.com/avito-tech/go-transaction-manager/drivers/mongo/v2"
trmsql "github.com/avito-tech/go-transaction-manager/drivers/sql/v2"
trmcontext "github.com/avito-tech/go-transaction-manager/v2/context"
"github.com/avito-tech/go-transaction-manager/v2/manager"

trmmongo "github.com/avito-tech/go-transaction-manager/db/mongo/v2"
)

// Example demonstrates the implementation of the Repository pattern by trm.Manager.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions dbs/mongo/go.mod → drivers/mongo/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/avito-tech/go-transaction-manager/db/mongo/v2
module github.com/avito-tech/go-transaction-manager/drivers/mongo/v2

go 1.13

require (
github.com/avito-tech/go-transaction-manager/db/sql/v2 v2.0.0
github.com/avito-tech/go-transaction-manager/drivers/sql/v2 v2.0.0
github.com/avito-tech/go-transaction-manager/v2 v2.0.0
github.com/mattn/go-sqlite3 v1.14.18
github.com/stretchr/testify v1.8.2
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/sqlx/go.work → drivers/mongo/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../
replace github.com/avito-tech/go-transaction-manager/db/sql/v2 => ../sql
replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions dbs/pgxv4/example_test.go → drivers/pgxv4/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (

"github.com/jackc/pgx/v4/pgxpool"

trmpgx "github.com/avito-tech/go-transaction-manager/db/pgxv4/v2"
trmpgx "github.com/avito-tech/go-transaction-manager/drivers/pgxv4/v2"

"github.com/avito-tech/go-transaction-manager/v2/manager"
)

Expand All @@ -18,7 +19,7 @@ func Example() {
ctx := context.Background()

uri := fmt.Sprintf("postgres://%s:%s@%s:%d/%s",
"user", "pass", "localhost", 5432, "dbs",
"user", "pass", "localhost", 5432, "drivers",
)

pool, err := pgxpool.Connect(ctx, uri)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/pgxv4/go.mod → drivers/pgxv4/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/avito-tech/go-transaction-manager/db/pgxv4/v2
module github.com/avito-tech/go-transaction-manager/drivers/pgxv4/v2

go 1.13

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions dbs/pgxv5/example_test.go → drivers/pgxv5/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (

"github.com/jackc/pgx/v5/pgxpool"

trmpgx "github.com/avito-tech/go-transaction-manager/db/pgxv5/v2"
trmpgx "github.com/avito-tech/go-transaction-manager/drivers/pgxv5/v2"

"github.com/avito-tech/go-transaction-manager/v2/manager"
)

Expand All @@ -18,7 +19,7 @@ func Example() {
ctx := context.Background()

uri := fmt.Sprintf("postgres://%s:%s@%s:%d/%s",
"user", "pass", "localhost", 5432, "dbs",
"user", "pass", "localhost", 5432, "drivers",
)

pool, err := pgxpool.New(ctx, uri)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/pgxv5/go.mod → drivers/pgxv5/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/avito-tech/go-transaction-manager/db/pgxv5/v2
module github.com/avito-tech/go-transaction-manager/drivers/pgxv5/v2

go 1.13

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion dbs/sql/example_test.go → drivers/sql/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (

_ "github.com/mattn/go-sqlite3"

trmsql "github.com/avito-tech/go-transaction-manager/db/sql/v2"
trmsql "github.com/avito-tech/go-transaction-manager/drivers/sql/v2"

trmcontext "github.com/avito-tech/go-transaction-manager/v2/context"

"github.com/avito-tech/go-transaction-manager/v2/manager"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/sql/go.mod → drivers/sql/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/avito-tech/go-transaction-manager/db/sql/v2
module github.com/avito-tech/go-transaction-manager/drivers/sql/v2

go 1.13

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/sql/settings.go → drivers/sql/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sql
import (
"database/sql"

trm "github.com/avito-tech/go-transaction-manager/v2"
trm "github.com/avito-tech/go-transaction-manager/v2"
)

// Opt is a type to configure Settings.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import (

_ "github.com/mattn/go-sqlite3"

trmsqlx "github.com/avito-tech/go-transaction-manager/db/sqlx/v2"
trmsqlx "github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2"
trm "github.com/avito-tech/go-transaction-manager/v2"
trmcontext "github.com/avito-tech/go-transaction-manager/v2/context"

"github.com/avito-tech/go-transaction-manager/v2/settings"

"github.com/avito-tech/go-transaction-manager/v2/manager"
"github.com/avito-tech/go-transaction-manager/v2/settings"
)

// Example demonstrates a work of manager.ChainedMW.
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions dbs/sqlx/example_test.go → drivers/sqlx/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"

trmsqlx "github.com/avito-tech/go-transaction-manager/db/sqlx/v2"
trmsqlx "github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2"
"github.com/avito-tech/go-transaction-manager/v2/manager"
)

Expand Down Expand Up @@ -76,8 +76,8 @@ type user struct {
}

type userRow struct {
ID int64 `dbs:"user_id"`
Username string `dbs:"username"`
ID int64 `db:"user_id"`
Username string `db:"username"`
}

func (r *repo) GetByID(ctx context.Context, id int64) (*user, error) {
Expand Down
2 changes: 1 addition & 1 deletion dbs/sqlx/factory.go → drivers/sqlx/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/jmoiron/sqlx"

trmsql "github.com/avito-tech/go-transaction-manager/dbs/sql/v2"
trmsql "github.com/avito-tech/go-transaction-manager/drivers/sql/v2"

trm "github.com/avito-tech/go-transaction-manager/v2"
)
Expand Down
4 changes: 2 additions & 2 deletions dbs/sqlx/go.mod → drivers/sqlx/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/avito-tech/go-transaction-manager/db/sqlx/v2
module github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2

go 1.13

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/avito-tech/go-transaction-manager/db/sql/v2 v2.0.0
github.com/avito-tech/go-transaction-manager/drivers/sql/v2 v2.0.0
github.com/avito-tech/go-transaction-manager/v2 v2.0.0
github.com/jmoiron/sqlx v1.3.5
github.com/mattn/go-sqlite3 v1.14.18
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dbs/mongo/go.work → drivers/sqlx/go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ go 1.21
use .

replace github.com/avito-tech/go-transaction-manager/v2 => ../../
replace github.com/avito-tech/go-transaction-manager/db/sql/v2 => ../sql
replace github.com/avito-tech/go-transaction-manager/drivers/sql/v2 => ../sql

2 changes: 1 addition & 1 deletion dbs/sqlx/transaction.go → drivers/sqlx/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/jmoiron/sqlx"
"go.uber.org/multierr"

trmsql "github.com/avito-tech/go-transaction-manager/dbs/sql/v2"
trmsql "github.com/avito-tech/go-transaction-manager/drivers/sql/v2"

trm "github.com/avito-tech/go-transaction-manager/v2"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/benchmark/with_or_without_trm/clean_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func BenchmarkClean_MockDB(b *testing.B) {
}

func BenchmarkClean_SQLite_File(b *testing.B) {
db := sqlite3(b, "file:test_clean.dbs")
db := sqlite3(b, "file:test_clean.drivers")
defer db.Close()

runClean(b, db)
Expand Down
4 changes: 2 additions & 2 deletions internal/benchmark/with_or_without_trm/model.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package with_or_without_trm

type user struct {
ID int64 `dbs:"user_id"`
Username string `dbs:"username"`
ID int64 `db:"user_id"`
Username string `db:"username"`
}
2 changes: 1 addition & 1 deletion internal/benchmark/with_or_without_trm/trm_test.go.skip
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
_ "github.com/mattn/go-sqlite3"
"github.com/stretchr/testify/require"

trmsqlx "github.com/avito-tech/go-transaction-manager/db/sqlx/v2"
trmsqlx "github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2"

"github.com/avito-tech/go-transaction-manager/v2/manager"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/benchmark/with_or_without_trm/trmrepo.go.skip
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/jmoiron/sqlx"

trmsqlx "github.com/avito-tech/go-transaction-manager/db/sqlx/v2"
trmsqlx "github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2"
)

type trmRepo struct {
Expand Down
4 changes: 3 additions & 1 deletion sh/go.mod.tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ ROOT=$(pwd)

go mod tidy

for driver in ./db/*/; do
drivers=$($DIR/utils/drivers.sh)

for driver in $drivers; do
if [ -d "$driver" ]; then
echo "\n$driver"
cd $driver && go mod tidy
Expand Down
4 changes: 3 additions & 1 deletion sh/go.mod.vendor.local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ ROOT=$(pwd)

go mod vendor

for driver in ./db/*; do
drivers=$($DIR/utils/drivers.sh)

for driver in $drivers; do
if [ -d "$driver" ]; then
echo "\n$driver"

Expand Down
Loading

0 comments on commit 4cb0add

Please sign in to comment.