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.
192 lines
5.4 KiB
JSON
192 lines
5.4 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n SELECT id as \"id!: PlaylistId\",\n room_id as \"room_id!: RoomId\",\n creator_id as \"creator_id: crate::models::UserId\",\n name as \"name!\",\n description as \"description!\",\n cover_file_reference_id,\n parent_id as \"parent_id: PlaylistId\",\n position as \"position!\",\n browse_access_mode as \"browse_access_mode!\",\n source_provider,\n source_config as \"source_config: crate::models::PlaylistSourceConfig\",\n NULLIF(provider_instance_name, '') AS \"provider_instance_name?\",\n created_at as \"created_at!\",\n updated_at as \"updated_at!\",\n version as \"version!\"\n FROM playlists p\n WHERE p.id = ANY($1)\n AND p.deleted_at IS NULL\n AND EXISTS (SELECT 1 FROM rooms r WHERE r.id = p.room_id AND r.deleted_at IS NULL)\n AND (p.creator_id IS NULL OR EXISTS (\n SELECT 1 FROM users u WHERE u.id = p.creator_id AND u.deleted_at IS NULL\n ))\n AND (p.parent_id IS NULL OR EXISTS (\n SELECT 1\n FROM playlists parent\n WHERE parent.id = p.parent_id\n AND parent.deleted_at IS NULL\n AND (parent.creator_id IS NULL OR EXISTS (\n SELECT 1 FROM users u WHERE u.id = parent.creator_id AND u.deleted_at IS NULL\n ))\n ))\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "id!: PlaylistId",
|
|
"type_info": "Int8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "room_id!: RoomId",
|
|
"type_info": "Int8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "room_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "creator_id: crate::models::UserId",
|
|
"type_info": "Int8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "creator_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "name!",
|
|
"type_info": "Varchar",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "name"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "description!",
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "description"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 5,
|
|
"name": "cover_file_reference_id",
|
|
"type_info": "Int8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "cover_file_reference_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 6,
|
|
"name": "parent_id: PlaylistId",
|
|
"type_info": "Int8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "parent_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 7,
|
|
"name": "position!",
|
|
"type_info": "Float8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "position"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 8,
|
|
"name": "browse_access_mode!",
|
|
"type_info": "Int2",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "browse_access_mode"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 9,
|
|
"name": "source_provider",
|
|
"type_info": "Int2",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "source_provider"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 10,
|
|
"name": "source_config: crate::models::PlaylistSourceConfig",
|
|
"type_info": "Jsonb",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "source_config"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 11,
|
|
"name": "provider_instance_name?",
|
|
"type_info": "Text",
|
|
"origin": "Expression"
|
|
},
|
|
{
|
|
"ordinal": 12,
|
|
"name": "created_at!",
|
|
"type_info": "Timestamptz",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "created_at"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 13,
|
|
"name": "updated_at!",
|
|
"type_info": "Timestamptz",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "updated_at"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 14,
|
|
"name": "version!",
|
|
"type_info": "Int4",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "playlists",
|
|
"name": "version"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8Array"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
null,
|
|
false,
|
|
false,
|
|
false
|
|
]
|
|
},
|
|
"hash": "07a1a7b88297eac6aab592b19e37e4ba5523dd780cd4605d81bb7d6bbcc24613"
|
|
}
|