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 dbStats for SQLite #3270

Merged
merged 28 commits into from
Aug 31, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5cc27a7
SQLite backend implements dummy DBStats
chilagrow Aug 29, 2023
1946ee6
only include changes related to interface
chilagrow Aug 29, 2023
003ca76
rename and use parameter for interface func
chilagrow Aug 29, 2023
d64a35d
task fmt
chilagrow Aug 29, 2023
fbc612b
implement handler
chilagrow Aug 29, 2023
20ac1dc
run analyze and get DB size
chilagrow Aug 29, 2023
6ef3aaf
merge database stats interface
chilagrow Aug 30, 2023
d2a69a9
query sqlite stats
chilagrow Aug 30, 2023
85c5d63
merge main
chilagrow Aug 30, 2023
a669531
use correct sql
chilagrow Aug 30, 2023
c0f880f
exclude sql reserved table and indexes
chilagrow Aug 30, 2023
ecfafc1
use btree cells to return count of rows
chilagrow Aug 30, 2023
c61198b
format
chilagrow Aug 30, 2023
0bc22cb
sqlite integration tests for dbstats
chilagrow Aug 30, 2023
988893b
fix returned db
chilagrow Aug 30, 2023
b00df57
cleanup
chilagrow Aug 31, 2023
c72e775
use aggregate where it can
chilagrow Aug 31, 2023
2d90e59
add comment
chilagrow Aug 31, 2023
46ee41a
Make registry return full collection info
AlekSi Aug 31, 2023
3f0129f
Formatting
AlekSi Aug 31, 2023
ee80c58
More formatting
AlekSi Aug 31, 2023
4655a6d
Revert "More formatting"
AlekSi Aug 31, 2023
36349b0
Merge branch 'list-info' into issue-3259-dbstats-sqlite
chilagrow Aug 31, 2023
986b025
use registry to get list of tables
chilagrow Aug 31, 2023
a75bfdc
unexport metadata const
chilagrow Aug 31, 2023
6a2e325
update comment
chilagrow Aug 31, 2023
e28c1b9
return zero index for now
chilagrow Aug 31, 2023
407190c
Merge branch 'main' into issue-3259-dbstats-sqlite
chilagrow Aug 31, 2023
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
Next Next commit
update comment
  • Loading branch information
chilagrow committed Aug 31, 2023
commit 6a2e325c0e99b5162dacaa18f5ce29fcc51a6d70
2 changes: 2 additions & 0 deletions internal/handlers/sqlite/msg_dbstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func (h *Handler) MsgDBStats(ctx context.Context, msg *wire.OpMsg) (*wire.OpMsg,
return nil, lazyerrors.Error(err)
}

// MongoDB uses "numbers" that could be int32 or int64,
// FerretDB always returns int64 for simplicity.
pairs := []any{
"db", dbName,
"collections", stats.CountCollections,
Expand Down