aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/sqlite3/peeks_table.go
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2022-04-08 17:53:24 +0100
committerGitHub <noreply@github.com>2022-04-08 17:53:24 +0100
commit6d25bd6ca57f518404000c47d69bcbfadb4fd2ef (patch)
tree14246daf0644ccbafd255b930887695382bbe8f8 /syncapi/storage/sqlite3/peeks_table.go
parent986d27a1287e9d86fe16a6152f2457657513a6dd (diff)
syncapi: add more tests; fix more bugs (#2338)
* syncapi: add more tests; fix more bugs bugfixes: - The postgres impl of TopologyTable.SelectEventIDsInRange did not use the provided txn - The postgres impl of EventsTable.SelectEvents did not preserve the ordering of the input event IDs in the output events slice - The sqlite impl of EventsTable.SelectEvents did not use a bulk `IN ($1)` query. Added tests: - `TestGetEventsInRangeWithTopologyToken` - `TestOutputRoomEventsTable` - `TestTopologyTable` * -p 1 for now
Diffstat (limited to 'syncapi/storage/sqlite3/peeks_table.go')
-rw-r--r--syncapi/storage/sqlite3/peeks_table.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/syncapi/storage/sqlite3/peeks_table.go b/syncapi/storage/sqlite3/peeks_table.go
index c93c8205..5ee86448 100644
--- a/syncapi/storage/sqlite3/peeks_table.go
+++ b/syncapi/storage/sqlite3/peeks_table.go
@@ -66,7 +66,7 @@ const selectMaxPeekIDSQL = "" +
type peekStatements struct {
db *sql.DB
- streamIDStatements *streamIDStatements
+ streamIDStatements *StreamIDStatements
insertPeekStmt *sql.Stmt
deletePeekStmt *sql.Stmt
deletePeeksStmt *sql.Stmt
@@ -75,7 +75,7 @@ type peekStatements struct {
selectMaxPeekIDStmt *sql.Stmt
}
-func NewSqlitePeeksTable(db *sql.DB, streamID *streamIDStatements) (tables.Peeks, error) {
+func NewSqlitePeeksTable(db *sql.DB, streamID *StreamIDStatements) (tables.Peeks, error) {
_, err := db.Exec(peeksSchema)
if err != nil {
return nil, err