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.
39 lines
925 B
JSON
39 lines
925 B
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "SELECT class.id, class.name, class.parent, 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 ORDER BY class.created_at\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "id",
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "name",
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "parent",
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "parent_name?",
|
|
"type_info": "Varchar"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": []
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
true,
|
|
false
|
|
]
|
|
},
|
|
"hash": "c7e35dee5f56da8da3c083e191f396b95917b15768ebe0250ce7840391036616"
|
|
}
|