61 lines
1.5 KiB
JSON
61 lines
1.5 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n INSERT INTO user_apps (id, user_id)\n VALUES ($1, $2)\n ON CONFLICT (id) DO UPDATE SET\n user_id = user_apps.user_id\n WHERE user_apps.user_id = EXCLUDED.user_id\n RETURNING WITH (OLD AS old_row, NEW AS new_row)\n old_row.id AS \"old_id?\",\n COALESCE(old_row.user_id, new_row.user_id) AS \"old_user_id!\",\n new_row.id AS \"id!\",\n new_row.user_id AS \"user_id!\"\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "old_id?",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_apps",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "old_user_id!",
|
|
"type_info": "Uuid",
|
|
"origin": "Expression"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "id!",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_apps",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "user_id!",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_apps",
|
|
"name": "user_id"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
null,
|
|
false,
|
|
false
|
|
]
|
|
},
|
|
"hash": "ed91880a0398df14f4886a622c5432712c70187d08dea243809986a45fec4f68"
|
|
}
|