mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
Provide stream ID statements
This commit is contained in:
parent
c0030f5b00
commit
2c052ea292
|
|
@ -68,8 +68,10 @@ type relationsStatements struct {
|
|||
selectMaxRelationIDStmt *sql.Stmt
|
||||
}
|
||||
|
||||
func NewSqliteRelationsTable(db *sql.DB) (tables.Relations, error) {
|
||||
s := &relationsStatements{}
|
||||
func NewSqliteRelationsTable(db *sql.DB, streamID *StreamIDStatements) (tables.Relations, error) {
|
||||
s := &relationsStatements{
|
||||
streamIDStatements: streamID,
|
||||
}
|
||||
_, err := db.Exec(relationsSchema)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ func (d *SyncServerDatasource) prepare(ctx context.Context) (err error) {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
relations, err := NewSqliteRelationsTable(d.db)
|
||||
relations, err := NewSqliteRelationsTable(d.db, &d.streamID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue