-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Inline SQL queries using boolean parameters #15525
Changes from 8 commits
5cfdae4
cd4359a
3857478
2ea3b58
44aedd8
7d60307
36c4012
e5c5d35
07e90d4
c29c05f
be3fbc1
8737a24
24f4de0
7eb4f91
e5a668d
aa97aa2
f733e25
7ae7fef
b33a4d2
152e015
97f337b
53d04b9
19e15c3
32d8dd4
99e265b
e871524
1c5a66e
3e7c901
34e98ec
66b8ab0
634b269
8f7029d
ea1fbfc
cafd08e
aaa1ad2
c4340ff
37d3013
b9e505a
4506e7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Updated all Inline SQL queries using boolean parameters as supported in sqlite 3.27 | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1455,8 +1455,8 @@ def _update_outliers_txn( | |||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| sql = "UPDATE events SET outlier = ? WHERE event_id = ?" | ||||||||||||||||||||||||||||||||||||||||||||||||
| txn.execute(sql, (False, event.event_id)) | ||||||||||||||||||||||||||||||||||||||||||||||||
| sql = "UPDATE events SET outlier = False WHERE event_id = ?" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
| BOOLEAN_COLUMNS = { | |
| "access_tokens": ["used"], | |
| "account_validity": ["email_sent"], | |
| "device_lists_changes_in_room": ["converted_to_destinations"], | |
| "device_lists_outbound_pokes": ["sent"], | |
| "devices": ["hidden"], | |
| "e2e_fallback_keys_json": ["used"], | |
| "e2e_room_keys": ["is_verified"], | |
| "event_edges": ["is_state"], | |
| "events": ["processed", "outlier", "contains_url"], | |
| "local_media_repository": ["safe_from_quarantine"], | |
| "presence_list": ["accepted"], | |
| "presence_stream": ["currently_active"], | |
| "public_room_list_stream": ["visibility"], | |
| "pushers": ["enabled"], | |
| "redactions": ["have_censored"], | |
| "room_stats_state": ["is_federatable"], | |
| "rooms": ["is_public", "has_auth_chain_index"], | |
| "users": ["shadow_banned", "approved"], | |
| "un_partial_stated_event_stream": ["rejection_status_changed"], | |
| "users_who_share_rooms": ["share_private"], | |
| "per_user_experimental_features": ["enabled"], | |
| } |
Uh oh!
There was an error while loading. Please reload this page.