Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
99c7fbfe
Commit
99c7fbfe
authored
9 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fix to work with SQLite
parent
1d9e1098
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/room.py
+11
-4
11 additions, 4 deletions
synapse/storage/room.py
with
11 additions
and
4 deletions
synapse/storage/room.py
+
11
−
4
View file @
99c7fbfe
...
...
@@ -19,6 +19,7 @@ from synapse.api.errors import StoreError
from
._base
import
SQLBaseStore
from
synapse.util.caches.descriptors
import
cachedInlineCallbacks
from
.engines
import
PostgresEngine
import
collections
import
logging
...
...
@@ -202,10 +203,16 @@ class RoomStore(SQLBaseStore):
)
def
_store_event_search_txn
(
self
,
txn
,
event
,
key
,
value
):
sql
=
(
"
INSERT INTO event_search (event_id, room_id, key, vector)
"
"
VALUES (?,?,?,to_tsvector(
'
english
'
, ?))
"
)
if
isinstance
(
self
.
database_engine
,
PostgresEngine
):
sql
=
(
"
INSERT INTO event_search (event_id, room_id, key, vector)
"
"
VALUES (?,?,?,to_tsvector(
'
english
'
, ?))
"
)
else
:
sql
=
(
"
INSERT INTO event_search (event_id, room_id, key, value)
"
"
VALUES (?,?,?,?)
"
)
txn
.
execute
(
sql
,
(
event
.
event_id
,
event
.
room_id
,
key
,
value
,))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment