likwid/backend/.sqlx/query-8d3042b1d0415262c8729e52a4d8933bf52b484798b7e3530219b0117a60f5d1.json

92 lines
2 KiB
JSON
Raw Normal View History

{
"db_name": "PostgreSQL",
"query": "SELECT i.*, u.username as creator_username, c.name as community_name\n FROM invitations i\n LEFT JOIN users u ON u.id = i.created_by\n LEFT JOIN communities c ON c.id = i.community_id\n WHERE ($1::boolean = true OR i.created_by = $2)\n AND ($3::uuid IS NULL OR i.community_id = $3)\n AND ($4::boolean IS NULL OR i.is_active = $4)\n ORDER BY i.created_at DESC\n LIMIT 100",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "code",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "created_by",
"type_info": "Uuid"
},
{
"ordinal": 3,
"name": "email",
"type_info": "Varchar"
},
{
"ordinal": 4,
"name": "community_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "max_uses",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "uses_count",
"type_info": "Int4"
},
{
"ordinal": 7,
"name": "expires_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "is_active",
"type_info": "Bool"
},
{
"ordinal": 9,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "creator_username",
"type_info": "Varchar"
},
{
"ordinal": 11,
"name": "community_name",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Bool",
"Uuid",
"Uuid",
"Bool"
]
},
"nullable": [
false,
false,
false,
true,
true,
true,
true,
true,
true,
true,
false,
false
]
},
"hash": "8d3042b1d0415262c8729e52a4d8933bf52b484798b7e3530219b0117a60f5d1"
}