sqlx prepare ready

This commit is contained in:
filipriec
2025-03-05 20:01:04 +01:00
parent 8d7335a46e
commit 144b23e532
10 changed files with 227 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
{
"db_name": "PostgreSQL",
"query": "SELECT id, columns FROM table_definitions\n WHERE profile_id = $1 AND table_name = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int8"
},
{
"ordinal": 1,
"name": "columns",
"type_info": "Jsonb"
}
],
"parameters": {
"Left": [
"Int8",
"Text"
]
},
"nullable": [
false,
false
]
},
"hash": "18494c5209588687b2339097eb7c27822246dc6c92a8bb6de976395e9271085f"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(\n SELECT 1 FROM table_definitions\n WHERE profile_id = $1 AND table_name = $2\n )",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Int8",
"Text"
]
},
"nullable": [
null
]
},
"hash": "191c33c4b3f9acf81b7e78297bc1903bbaae8bbc3057a2469be202fdcb3c2945"
}

View File

@@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM table_definitions WHERE id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": []
},
"hash": "39d6176d6c3c4b647e4deb7cd7822a03c210ae5ec8a395f4fd3fb87dabe9ecc6"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT id FROM table_definitions \n WHERE profile_id = $1 AND table_name = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Int8",
"Text"
]
},
"nullable": [
false
]
},
"hash": "5e0c1a07987fcdbcca9878e2f4a0c95cee65cae4cc036e99f01d92c17236e038"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT id FROM profiles WHERE name = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false
]
},
"hash": "7600fd56765577629232ab785bad61637faf3a11af43902577a3905fbb767c1f"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT COUNT(*) as count FROM table_definitions WHERE profile_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "count",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
null
]
},
"hash": "7b1b134886c98c0b897cacb13d6e4614f6473f7f8fd18b1443713437e4493896"
}

View File

@@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM profiles WHERE id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": []
},
"hash": "990c9f644bc8f229b1be87f7a6a5dd8fdc2935758561b94e62e661fd03cb92d8"
}

View File

@@ -0,0 +1,35 @@
{
"db_name": "PostgreSQL",
"query": "SELECT id, columns, linked_table_id FROM table_definitions\n WHERE profile_id = $1 AND table_name = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int8"
},
{
"ordinal": 1,
"name": "columns",
"type_info": "Jsonb"
},
{
"ordinal": 2,
"name": "linked_table_id",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Int8",
"Text"
]
},
"nullable": [
false,
false,
true
]
},
"hash": "bda5d4507e4f190b8b9df224688095bb0c77017709415e91e8164a5f029f46af"
}

View File

@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT 1 AS exists FROM table_definitions\n WHERE profile_id = $1 AND table_name = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Int8",
"Text"
]
},
"nullable": [
null
]
},
"hash": "c380148ff87cf4bd4535f118d064bf39db63a318eedf8d3d21ae6f4856bb0655"
}

View File

@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT table_name FROM table_definitions WHERE id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "table_name",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
false
]
},
"hash": "e6ef405614c7499ee6e25cdc3811cc0e90bc7592ce7dc35673039b5978ffbb6b"
}