Added additional transaction operations.

This commit is contained in:
2026-09-25 16:18:53 +02:00
parent c6efb2cd0b
commit e7062b31e4
15 changed files with 516 additions and 92 deletions
@@ -0,0 +1,46 @@
{
"db_name": "PostgreSQL",
"query": "\n\t\tSELECT id, description, amount_cents, direction, date\n\t\tFROM transactions\n\t\tWHERE id = $1\n\t\t",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "amount_cents",
"type_info": "Int8"
},
{
"ordinal": 3,
"name": "direction",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "date",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
false,
false,
false,
false
]
},
"hash": "04e8934ac1d987fc859ed21a3fdc41f62165efb6248575e78d577ca333d025c2"
}
@@ -0,0 +1,56 @@
{
"db_name": "PostgreSQL",
"query": "\n\t\tINSERT INTO transactions (id, description, amount_cents, direction, date)\n\t\tVALUES ($1, $2, $3, $4, $5)\n\t\tON CONFLICT (id) DO UPDATE SET\n\t\t\tdescription = EXCLUDED.description,\n\t\t\tamount_cents = EXCLUDED.amount_cents,\n\t\t\tdirection = EXCLUDED.direction,\n\t\t\tdate = EXCLUDED.date\n\t\tRETURNING WITH (OLD AS old_row, NEW AS new_row)\n\t\t\told_row.id AS \"old_id?\",\n\t\t\tnew_row.id AS \"id!\",\n\t\t\tnew_row.description AS \"description!\",\n\t\t\tnew_row.amount_cents AS \"amount_cents!\",\n\t\t\tnew_row.direction AS \"direction!\",\n\t\t\tnew_row.date AS \"date!\"\n\t\t",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "old_id?",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "id!",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "description!",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "amount_cents!",
"type_info": "Int8"
},
{
"ordinal": 4,
"name": "direction!",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "date!",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Text",
"Int8",
"Text",
"Timestamptz"
]
},
"nullable": [
false,
false,
false,
false,
false,
false
]
},
"hash": "2c91d06bd5687a10c8b54386586b1c5be73ae4cc1a72351a78f26c136c429e1d"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT id, description, amount_cents, direction, date\n FROM transactions\n ORDER BY date DESC, id DESC\n ",
"query": "\n\t\tSELECT id, description, amount_cents, direction, date\n\t\tFROM transactions\n\t\tORDER BY date DESC, id DESC\n\t\t",
"describe": {
"columns": [
{
@@ -40,5 +40,5 @@
false
]
},
"hash": "9046c905a83167f865e902a3bd66e0e53647938e0f5af0ff00058726f25c761e"
"hash": "7e9c0f4b0502b63b823233a826c9388703e9568f769cfc50c40ac0929750b744"
}