Simon Bruder
5b3dd34312
This architecture was started when the project still used Diesel. Now that it uses SQLx, less things are done in Rust and more are done in SQL. This commit now moves more of the query logic into SQL, which should lead to more efficient queries and less moving data around.
47 lines
1.1 KiB
JSON
47 lines
1.1 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "SELECT\n class.id,\n class.name,\n class.description,\n class.parent,\n parent.name AS \"parent_name?\"\n FROM item_classes AS \"class\"\n LEFT JOIN item_classes AS \"parent\"\n ON class.parent = parent.id\n WHERE class.id = $1",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "id",
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "name",
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "description",
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "parent",
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "parent_name?",
|
|
"type_info": "Varchar"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false
|
|
]
|
|
},
|
|
"hash": "84b4620db57dd9b963e09153c3de5938b3959ae41744098c4e9565404abf09ae"
|
|
}
|