120 lines
3.2 KiB
JSON
120 lines
3.2 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n INSERT INTO user_app_secrets (id, app_id, secret_hash, expires_at)\n VALUES ($1, $2, $3, $4)\n ON CONFLICT (id, app_id) DO UPDATE SET\n secret_hash = EXCLUDED.secret_hash,\n expires_at = EXCLUDED.expires_at\n RETURNING WITH (OLD AS old_row, NEW AS new_row)\n old_row.id AS \"old_id?\",\n COALESCE(old_row.app_id, new_row.app_id) AS \"old_app_id!\",\n COALESCE(old_row.secret_hash, new_row.secret_hash) AS \"old_secret_hash!\",\n COALESCE(old_row.expires_at, new_row.expires_at) AS \"old_expires_at!\",\n COALESCE(old_row.created_at, new_row.created_at) AS \"old_created_at!\",\n new_row.id AS \"id!\",\n new_row.app_id AS \"app_id!\",\n new_row.secret_hash AS \"secret_hash!\",\n new_row.expires_at AS \"expires_at!\",\n new_row.created_at AS \"created_at!\"\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "old_id?",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_app_secrets",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "old_app_id!",
|
|
"type_info": "Uuid",
|
|
"origin": "Expression"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "old_secret_hash!",
|
|
"type_info": "Bytea",
|
|
"origin": "Expression"
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "old_expires_at!",
|
|
"type_info": "Timestamptz",
|
|
"origin": "Expression"
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "old_created_at!",
|
|
"type_info": "Timestamptz",
|
|
"origin": "Expression"
|
|
},
|
|
{
|
|
"ordinal": 5,
|
|
"name": "id!",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_app_secrets",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 6,
|
|
"name": "app_id!",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_app_secrets",
|
|
"name": "app_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 7,
|
|
"name": "secret_hash!",
|
|
"type_info": "Bytea",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_app_secrets",
|
|
"name": "secret_hash"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 8,
|
|
"name": "expires_at!",
|
|
"type_info": "Timestamptz",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_app_secrets",
|
|
"name": "expires_at"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 9,
|
|
"name": "created_at!",
|
|
"type_info": "Timestamptz",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "user_app_secrets",
|
|
"name": "created_at"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid",
|
|
"Bytea",
|
|
"Timestamptz"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false
|
|
]
|
|
},
|
|
"hash": "18f30fc05dd48c2c65659cf16f167207303707d544f8bede6407790d97c8b927"
|
|
}
|