Skip to content

Commit

Permalink
Automate prepared statements (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
marco6 authored Aug 1, 2024
1 parent b71a2ec commit b3721ee
Show file tree
Hide file tree
Showing 7 changed files with 282 additions and 250 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/canonical/k8s-dqlite
go 1.21

require (
github.com/Rican7/retry v0.3.1
github.com/canonical/go-dqlite v1.22.0
github.com/mattn/go-sqlite3 v1.14.22
github.com/onsi/gomega v1.27.10
Expand All @@ -29,6 +28,7 @@ require (
)

require (
github.com/Rican7/retry v0.3.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/kine/drivers/dqlite/dqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewVariant(ctx context.Context, datasourceName string) (server.Backend, *ge
if err != nil {
return nil, nil, errors.Wrap(err, "sqlite client")
}
if err := migrate(ctx, generic.DB); err != nil {
if err := migrate(ctx, generic.DB.Underlying()); err != nil {
return nil, nil, errors.Wrap(err, "failed to migrate DB from sqlite")
}
generic.LockWrites = true
Expand Down
Loading

0 comments on commit b3721ee

Please sign in to comment.