mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-20 01:08:55 +00:00
Update the username as well in the upsert case
This commit is contained in:
parent
de06c8e37f
commit
96961ed731
2 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"db_name": "SQLite",
|
"db_name": "SQLite",
|
||||||
"query": "INSERT\n INTO osu_users(user_id, username, id, last_update, pp_std, pp_taiko, pp_mania, pp_catch, failures)\n VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (user_id) WHERE id = ? DO UPDATE\n SET\n last_update = excluded.last_update,\n pp_std = excluded.pp_std,\n pp_taiko = excluded.pp_taiko,\n pp_mania = excluded.pp_mania,\n pp_catch = excluded.pp_catch,\n failures = excluded.failures\n ",
|
"query": "INSERT\n INTO osu_users(user_id, username, id, last_update, pp_std, pp_taiko, pp_mania, pp_catch, failures)\n VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (user_id) WHERE id = ? DO UPDATE\n SET\n last_update = excluded.last_update,\n username = excluded.username,\n pp_std = excluded.pp_std,\n pp_taiko = excluded.pp_taiko,\n pp_mania = excluded.pp_mania,\n pp_catch = excluded.pp_catch,\n failures = excluded.failures\n ",
|
||||||
"describe": {
|
"describe": {
|
||||||
"columns": [],
|
"columns": [],
|
||||||
"parameters": {
|
"parameters": {
|
||||||
|
@ -8,5 +8,5 @@
|
||||||
},
|
},
|
||||||
"nullable": []
|
"nullable": []
|
||||||
},
|
},
|
||||||
"hash": "e17f70eb4375790907c7ecec1132cab859a7a18a8ce636f0b39c0b5387d9dffc"
|
"hash": "26a910506c0613936be169df13320dfd7f9d3df62a35ba63c61efc5de70e750d"
|
||||||
}
|
}
|
|
@ -95,6 +95,7 @@ impl OsuUser {
|
||||||
ON CONFLICT (user_id) WHERE id = ? DO UPDATE
|
ON CONFLICT (user_id) WHERE id = ? DO UPDATE
|
||||||
SET
|
SET
|
||||||
last_update = excluded.last_update,
|
last_update = excluded.last_update,
|
||||||
|
username = excluded.username,
|
||||||
pp_std = excluded.pp_std,
|
pp_std = excluded.pp_std,
|
||||||
pp_taiko = excluded.pp_taiko,
|
pp_taiko = excluded.pp_taiko,
|
||||||
pp_mania = excluded.pp_mania,
|
pp_mania = excluded.pp_mania,
|
||||||
|
|
Loading…
Add table
Reference in a new issue