mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
3.1 KiB
JSON
105 lines
3.1 KiB
JSON
|
2 months ago
|
{
|
||
|
|
"db_name": "PostgreSQL",
|
||
|
1 month ago
|
"query": "\n SELECT p.room_id AS \"room_id!: RoomId\",\n p.message_id AS \"message_id!\",\n p.message_created_at AS \"message_created_at!\",\n p.pinned_by AS \"pinned_by?: UserId\",\n u.username AS pinned_by_username,\n p.note,\n p.pinned_at AS \"pinned_at!\"\n FROM chat_message_pins p\n LEFT JOIN users u ON u.id = p.pinned_by\n JOIN chat_messages m\n ON m.room_id = p.room_id\n AND m.id = p.message_id\n AND m.created_at = p.message_created_at\n WHERE p.room_id = $1\n AND m.status <> $2\n AND m.deletion_source IS DISTINCT FROM $4\n AND ($5::bigint IS NULL OR NOT EXISTS (\n SELECT 1 FROM user_blocks ub\n WHERE ub.blocker_user_id = $5 AND ub.blocked_user_id = m.user_id\n ))\n ORDER BY p.pinned_at DESC, p.message_id DESC\n LIMIT $3\n ",
|
||
|
2 months ago
|
"describe": {
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"ordinal": 0,
|
||
|
|
"name": "room_id!: RoomId",
|
||
|
|
"type_info": "Int8",
|
||
|
|
"origin": {
|
||
|
|
"Table": {
|
||
|
|
"table": "chat_message_pins",
|
||
|
|
"name": "room_id"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"ordinal": 1,
|
||
|
|
"name": "message_id!",
|
||
|
|
"type_info": "Int8",
|
||
|
|
"origin": {
|
||
|
|
"Table": {
|
||
|
|
"table": "chat_message_pins",
|
||
|
|
"name": "message_id"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"ordinal": 2,
|
||
|
|
"name": "message_created_at!",
|
||
|
|
"type_info": "Timestamptz",
|
||
|
|
"origin": {
|
||
|
|
"Table": {
|
||
|
|
"table": "chat_message_pins",
|
||
|
|
"name": "message_created_at"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"ordinal": 3,
|
||
|
|
"name": "pinned_by?: UserId",
|
||
|
|
"type_info": "Int8",
|
||
|
|
"origin": {
|
||
|
|
"Table": {
|
||
|
|
"table": "chat_message_pins",
|
||
|
|
"name": "pinned_by"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"ordinal": 4,
|
||
|
|
"name": "pinned_by_username",
|
||
|
|
"type_info": "Varchar",
|
||
|
|
"origin": {
|
||
|
|
"Table": {
|
||
|
|
"table": "users",
|
||
|
|
"name": "username"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"ordinal": 5,
|
||
|
|
"name": "note",
|
||
|
|
"type_info": "Text",
|
||
|
|
"origin": {
|
||
|
|
"Table": {
|
||
|
|
"table": "chat_message_pins",
|
||
|
|
"name": "note"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"ordinal": 6,
|
||
|
|
"name": "pinned_at!",
|
||
|
|
"type_info": "Timestamptz",
|
||
|
|
"origin": {
|
||
|
|
"Table": {
|
||
|
|
"table": "chat_message_pins",
|
||
|
|
"name": "pinned_at"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"parameters": {
|
||
|
|
"Left": [
|
||
|
|
"Int8",
|
||
|
|
"Int2",
|
||
|
2 months ago
|
"Int8",
|
||
|
1 month ago
|
"Int2",
|
||
|
|
"Int8"
|
||
|
2 months ago
|
]
|
||
|
|
},
|
||
|
|
"nullable": [
|
||
|
|
false,
|
||
|
|
false,
|
||
|
|
false,
|
||
|
|
true,
|
||
|
|
false,
|
||
|
|
true,
|
||
|
|
false
|
||
|
|
]
|
||
|
|
},
|
||
|
1 month ago
|
"hash": "23e80a3bfca3636d2364dcc63d6b31e4816c363fc32e78cdc61b6c2508cc621f"
|
||
|
2 months ago
|
}
|