Added ON CONFLICT handling to saveRow
This commit is contained in:
@@ -64,15 +64,15 @@ keys = [
|
||||
"@rmass_bridge:loxthelion.com",
|
||||
],
|
||||
},
|
||||
#{
|
||||
#"keytitle": "power_level_content_override",
|
||||
#"keyvalue": {
|
||||
#"users": {
|
||||
#"@lyncoln:loxthelion.com": 100,
|
||||
#"@rmass_:loxthelion.com": 100,
|
||||
#},
|
||||
#},
|
||||
#}
|
||||
{
|
||||
"keytitle": "power_level_content_override",
|
||||
"keyvalue": {
|
||||
"users": {
|
||||
"@lyncoln:loxthelion.com": 100,
|
||||
"@rmass_bridge:loxthelion.com": 100,
|
||||
},
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
method = "POST"
|
||||
@@ -109,8 +109,17 @@ saverow = {
|
||||
{"resolved": "sender"},
|
||||
{"resolved": "username"},
|
||||
{"resolved": "matrixdm"},
|
||||
{"outputs" : "useravatar_hash"},
|
||||
{"outputs": "useravatar_hash"},
|
||||
],
|
||||
"onconflict": {
|
||||
"target": "rmass_user_id",
|
||||
"update": [
|
||||
"rmass_username",
|
||||
"rmass_dm_room",
|
||||
"rmass_avatar_hash",
|
||||
],
|
||||
"preservenull": True,
|
||||
},
|
||||
}
|
||||
|
||||
#readrow = {
|
||||
|
||||
Reference in New Issue
Block a user