fixup! Move database operations to separate module
This commit is contained in:
parent
b123054f1b
commit
1aee8ee22d
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT\n items.name,\n items.parent,\n items.class,\n item_classes.name AS \"class_name\",\n items.original_packaging,\n items.description\n FROM items\n JOIN item_classes\n ON items.class = item_classes.id\n WHERE items.id = $1",
|
||||
"query": "SELECT\n items.name,\n items.parent,\n items.class,\n items.original_packaging,\n items.description\n FROM items\n WHERE items.id = $1",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
|
@ -20,16 +20,11 @@
|
|||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "class_name",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "original_packaging",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"ordinal": 4,
|
||||
"name": "description",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
|
@ -43,10 +38,9 @@
|
|||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "c49b88eda9a62743783bc894f01bb6198594f94a3e0856abde0efdb4e49dbab8"
|
||||
"hash": "7b1265f893e68df4ebde549fed8dc1872c723d1294521a72d9d2251f4ddd8da6"
|
||||
}
|
|
@ -24,12 +24,9 @@ impl ItemRepository {
|
|||
items.name,
|
||||
items.parent,
|
||||
items.class,
|
||||
item_classes.name AS "class_name",
|
||||
items.original_packaging,
|
||||
items.description
|
||||
FROM items
|
||||
JOIN item_classes
|
||||
ON items.class = item_classes.id
|
||||
WHERE items.id = $1"#,
|
||||
id
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue