registry: add sqlx checks for agent and operation reads

This commit is contained in:
a.tolmachev
2026-04-12 21:07:30 +00:00
parent 6a909feb64
commit 934c872753
10 changed files with 1176 additions and 165 deletions
@@ -0,0 +1,95 @@
{
"db_name": "PostgreSQL",
"query": "select\n operations.id,\n operations.workspace_id,\n operations.name,\n operations.display_name,\n operations.category,\n operations.protocol,\n ov.target_json,\n operations.status,\n operations.current_draft_version,\n operations.latest_published_version,\n to_char(operations.created_at at time zone 'UTC', 'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') as \"created_at!\",\n to_char(operations.updated_at at time zone 'UTC', 'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') as \"updated_at!\",\n to_char(operations.published_at at time zone 'UTC', 'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') as published_at\n from operations\n join operation_versions ov\n on ov.operation_id = operations.id\n and ov.version = operations.current_draft_version\n where operations.workspace_id = $1 and operations.id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "workspace_id",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "name",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "display_name",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "category",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "protocol",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "target_json",
"type_info": "Jsonb"
},
{
"ordinal": 7,
"name": "status",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "current_draft_version",
"type_info": "Int4"
},
{
"ordinal": 9,
"name": "latest_published_version",
"type_info": "Int4"
},
{
"ordinal": 10,
"name": "created_at!",
"type_info": "Text"
},
{
"ordinal": 11,
"name": "updated_at!",
"type_info": "Text"
},
{
"ordinal": 12,
"name": "published_at",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
true,
null,
null,
null
]
},
"hash": "d9beed1c482720fbb55525223107474328f347661607f15b248052149625bc78"
}