Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Jul 26, 2023
1 parent 0cc1df7 commit c39f316
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/backends/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (bc *backendContract) Close() {
// The database does not need to exist.
func (bc *backendContract) Database(name string) (Database, error) {
var res Database

err := validateDatabaseName(name)
if err == nil {
res, err = bc.b.Database(name)
Expand Down
1 change: 1 addition & 0 deletions internal/backends/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func (dbc *databaseContract) Close() {
// The collection (or database) does not need to exist.
func (dbc *databaseContract) Collection(name string) (Collection, error) {
var res Collection

err := validateCollectionName(name)
if err == nil {
res, err = dbc.db.Collection(name)
Expand Down
1 change: 1 addition & 0 deletions internal/handlers/sqlite/msg_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (h *Handler) updateDocument(ctx context.Context, params *common.UpdatesPara
defer db.Close()

err = db.CreateCollection(ctx, &backends.CreateCollectionParams{Name: params.Collection})

switch {
case err == nil:
// nothing
Expand Down

0 comments on commit c39f316

Please sign in to comment.