Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement query request for SQLite backend #2665

Merged
merged 8 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
WIP
  • Loading branch information
Dmitry committed May 18, 2023
commit a6ed9e34822c79992f7590485b0292f1abfd5d09
1 change: 1 addition & 0 deletions internal/backends/sqlite/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (c *connPool) Close() error {
return errs
}

// CloseDB closes a database connection for the given name.
func (c *connPool) CloseDB(name string) {
c.mx.Lock()
defer c.mx.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion internal/backends/sqlite/query_iterator.go
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to put it inside util/iterator but got an import cycle error. Maybe there is another place where we can put it? It would be pretty much the same as in pgdb, I guess.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it there for now

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

// queryIterator implements iterator.Interface to fetch documents from the database.
type queryIterator struct {
type queryIterator struct { //nolint:vet // for readability
ctx context.Context
unmarshal func(b []byte) (*types.Document, error) // defaults to sjson.Unmarshal

Expand Down