158 lines
4.6 KiB
JSON
158 lines
4.6 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n INSERT INTO recurring_transactions (\n id,\n name,\n account_id,\n amount_cents,\n direction,\n starts_at,\n ends_at,\n recurrence_every,\n recurrence_unit,\n weekend_adjustment\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)\n ON CONFLICT (id) DO UPDATE SET\n name = EXCLUDED.name,\n account_id = EXCLUDED.account_id,\n amount_cents = EXCLUDED.amount_cents,\n direction = EXCLUDED.direction,\n starts_at = EXCLUDED.starts_at,\n ends_at = EXCLUDED.ends_at,\n recurrence_every = EXCLUDED.recurrence_every,\n recurrence_unit = EXCLUDED.recurrence_unit,\n weekend_adjustment = EXCLUDED.weekend_adjustment\n RETURNING WITH (OLD AS old_row, NEW AS new_row)\n old_row.id AS \"old_id?\",\n new_row.id AS \"id!\",\n new_row.name AS \"name!\",\n new_row.account_id AS \"account_id!\",\n new_row.amount_cents AS \"amount_cents!\",\n new_row.direction AS \"direction!\",\n new_row.starts_at AS \"starts_at!\",\n new_row.ends_at AS \"ends_at?\",\n new_row.recurrence_every AS \"recurrence_every!\",\n new_row.recurrence_unit AS \"recurrence_unit!\",\n new_row.weekend_adjustment AS \"weekend_adjustment?\"\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "old_id?",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "id!",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "name!",
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "name"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "account_id!",
|
|
"type_info": "Uuid",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "account_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "amount_cents!",
|
|
"type_info": "Int8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "amount_cents"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 5,
|
|
"name": "direction!",
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "direction"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 6,
|
|
"name": "starts_at!",
|
|
"type_info": "Timestamptz",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "starts_at"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 7,
|
|
"name": "ends_at?",
|
|
"type_info": "Timestamptz",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "ends_at"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 8,
|
|
"name": "recurrence_every!",
|
|
"type_info": "Int4",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "recurrence_every"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 9,
|
|
"name": "recurrence_unit!",
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "recurrence_unit"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 10,
|
|
"name": "weekend_adjustment?",
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "recurring_transactions",
|
|
"name": "weekend_adjustment"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Text",
|
|
"Uuid",
|
|
"Int8",
|
|
"Text",
|
|
"Timestamptz",
|
|
"Timestamptz",
|
|
"Int4",
|
|
"Text",
|
|
"Text"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
true
|
|
]
|
|
},
|
|
"hash": "7d7363a1746170ceec82763cadcf2e0803753901e73a2a8e04c87eb061bb724e"
|
|
}
|