59 lines
1.5 KiB
JSON
59 lines
1.5 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n select\n q.*,\n true as \"active!\",\n (select answer from responses r where r.question_id = q.id and r.user_id = $1) as response\n from questions q\n where\n q.publish_date <= current_timestamp\n and current_timestamp <= q.publish_date + interval '1 day'\n and current_timestamp > q.publish_date\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "id",
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "publish_date",
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "question_text",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "answers",
|
|
"type_info": "TextArray"
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "suggester",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 5,
|
|
"name": "active!",
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"ordinal": 6,
|
|
"name": "response",
|
|
"type_info": "Int2"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
null,
|
|
null
|
|
]
|
|
},
|
|
"hash": "5ba789f8d031bf48af42d0261544091231fed0d5f7c36f7c1f93933c46650e8e"
|
|
}
|