Files
book_library_server/.sqlx/query-9bb82eaa3dcf8ead767d5f9ac9dbe8d70f8e68b12f6b004a9e495aa8ebc6d250.json
2024-12-25 23:51:21 +01:00

36 lines
1.2 KiB
JSON

{
"db_name": "PostgreSQL",
"query": "\n SELECT\n b.id,\n CASE WHEN b.file_type = 'fb2' THEN ARRAY['fb2', 'epub', 'mobi', 'fb2zip']::text[] ELSE ARRAY[b.file_type]::text[] END AS \"available_types!: Vec<String>\"\n FROM books b\n WHERE lang = ANY($1) AND\n ($2::boolean IS NULL OR is_deleted = $2) AND\n ($3::date IS NULL OR uploaded >= $3) AND\n ($4::date IS NULL OR uploaded <= $4) AND\n ($5::integer IS NULL OR id >= $5) AND\n ($6::integer IS NULL OR id <= $6)\n ORDER BY b.id ASC\n OFFSET $7\n LIMIT $8\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "available_types!: Vec<String>",
"type_info": "TextArray"
}
],
"parameters": {
"Left": [
"TextArray",
"Bool",
"Date",
"Date",
"Int4",
"Int4",
"Int8",
"Int8"
]
},
"nullable": [
false,
null
]
},
"hash": "9bb82eaa3dcf8ead767d5f9ac9dbe8d70f8e68b12f6b004a9e495aa8ebc6d250"
}