mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-03 06:32:47 +00:00
Factor out StatementList to sqlutil
and use it in userapi
It helps with the boilerplate.
This commit is contained in:
parent
9e4618000e
commit
ed4097825b
43 changed files with 145 additions and 264 deletions
|
@ -19,7 +19,7 @@ import (
|
|||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/storage/shared"
|
||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
"github.com/matrix-org/dendrite/roomserver/storage/tables"
|
||||
)
|
||||
|
||||
|
@ -62,7 +62,7 @@ func createTransactionsTable(db *sql.DB) error {
|
|||
func prepareTransactionsTable(db *sql.DB) (tables.Transactions, error) {
|
||||
s := &transactionStatements{}
|
||||
|
||||
return s, shared.StatementList{
|
||||
return s, sqlutil.StatementList{
|
||||
{&s.insertTransactionStmt, insertTransactionSQL},
|
||||
{&s.selectTransactionEventIDStmt, selectTransactionEventIDSQL},
|
||||
}.Prepare(db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue