mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-25 07:43:10 -06:00
Linting
This commit is contained in:
parent
e61cb16059
commit
ba6ed97282
|
|
@ -36,6 +36,9 @@ func NewPostgresDatabase(dbOpts *config.DatabaseOptions) (Database, error) {
|
||||||
CONSTRAINT msc2836_relationships_unique UNIQUE (parent_event_id, child_event_id)
|
CONSTRAINT msc2836_relationships_unique UNIQUE (parent_event_id, child_event_id)
|
||||||
);
|
);
|
||||||
`)
|
`)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
if p.insertRelationStmt, err = p.db.Prepare(`
|
if p.insertRelationStmt, err = p.db.Prepare(`
|
||||||
INSERT INTO msc2836_relationships(parent_event_id, child_event_id, parent_room_id) VALUES($1, $2, $3) ON CONFLICT DO NOTHING
|
INSERT INTO msc2836_relationships(parent_event_id, child_event_id, parent_room_id) VALUES($1, $2, $3) ON CONFLICT DO NOTHING
|
||||||
`); err != nil {
|
`); err != nil {
|
||||||
|
|
@ -84,6 +87,9 @@ func NewSQLiteDatabase(dbOpts *config.DatabaseOptions) (Database, error) {
|
||||||
UNIQUE (parent_event_id, child_event_id)
|
UNIQUE (parent_event_id, child_event_id)
|
||||||
);
|
);
|
||||||
`)
|
`)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
if s.insertRelationStmt, err = s.db.Prepare(`
|
if s.insertRelationStmt, err = s.db.Prepare(`
|
||||||
INSERT INTO msc2836_relationships(parent_event_id, child_event_id, room_id) VALUES($1, $2, $3) ON CONFLICT (parent_event_id, child_event_id) DO NOTHING
|
INSERT INTO msc2836_relationships(parent_event_id, child_event_id, room_id) VALUES($1, $2, $3) ON CONFLICT (parent_event_id, child_event_id) DO NOTHING
|
||||||
`); err != nil {
|
`); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue