More verbose, but also more consistent.
This commit is contained in:
+120
@@ -0,0 +1,120 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n INSERT INTO refresh_tokens (id, access_token_id, secret_hash, expires_at, issued_at)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (id) DO UPDATE SET\n secret_hash = refresh_tokens.secret_hash,\n expires_at = refresh_tokens.expires_at,\n issued_at = refresh_tokens.issued_at\n WHERE refresh_tokens.access_token_id = EXCLUDED.access_token_id\n AND refresh_tokens.secret_hash <> EXCLUDED.secret_hash\n RETURNING WITH (OLD AS old_row, NEW AS new_row)\n old_row.id AS \"old_id?\",\n COALESCE(old_row.access_token_id, new_row.access_token_id) AS \"old_access_token_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.issued_at, new_row.issued_at) AS \"old_issued_at!\",\n new_row.id AS \"id!\",\n new_row.access_token_id AS \"access_token_id!\",\n new_row.secret_hash AS \"secret_hash!\",\n new_row.expires_at AS \"expires_at!\",\n new_row.issued_at AS \"issued_at!\"\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "old_id?",
|
||||
"type_info": "Uuid",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "refresh_tokens",
|
||||
"name": "id"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "old_access_token_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_issued_at!",
|
||||
"type_info": "Timestamptz",
|
||||
"origin": "Expression"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "id!",
|
||||
"type_info": "Uuid",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "refresh_tokens",
|
||||
"name": "id"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "access_token_id!",
|
||||
"type_info": "Uuid",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "refresh_tokens",
|
||||
"name": "access_token_id"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "secret_hash!",
|
||||
"type_info": "Bytea",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "refresh_tokens",
|
||||
"name": "secret_hash"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"name": "expires_at!",
|
||||
"type_info": "Timestamptz",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "refresh_tokens",
|
||||
"name": "expires_at"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"name": "issued_at!",
|
||||
"type_info": "Timestamptz",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "refresh_tokens",
|
||||
"name": "issued_at"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Bytea",
|
||||
"Timestamptz",
|
||||
"Timestamptz"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "5320efb1916efecdeb9f0b5d199d7e7d13d6df53399de9c062d0fab3ea17d224"
|
||||
}
|
||||
Reference in New Issue
Block a user