/
githubmirror
/
tldraw
Обзор
Документация
Войти
/
githubmirror
/
tldraw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
apps/dotcom/sync-worker/src/fetchEverythingSql.snap.ts
338 строк
8 KB
Kevin Ingersoll
feat(dotcom): rework the manage workspace dialog (#9168)
17 июн 2026, 16:28
Не верифицирован
17 июн 2026, 16:28
abfa9f5
Код
Авторство
О чём код?
// This file is auto-generated. Do not edit it directly. // Instead, edit the fetchEverythingSql.test.ts file and run yarn test -u export const fetchEverythingSql = ` WITH legacy_my_own_files AS (SELECT * FROM public."file" WHERE "ownerId" = $1 AND "isDeleted" = false), my_file_states AS (SELECT * FROM public."file_state" WHERE "userId" = $1), legacy_files_shared_with_me AS (SELECT f.* FROM my_file_states ufs JOIN public."file" f ON f.id = ufs."fileId" WHERE ufs."isFileOwner" = false AND f.shared = true), my_group_ids AS (SELECT "groupId" FROM public."group_user" WHERE "userId" = $1), my_groups AS (SELECT g.* FROM my_group_ids mg JOIN public."group" g ON g.id = mg."groupId" WHERE g."isDeleted" = false), all_group_users AS (SELECT ug.* FROM my_groups mg JOIN public."group_user" ug ON ug."groupId" = mg."id"), group_file_ownership AS (SELECT fg.* FROM my_groups mg JOIN public."group_file" fg ON fg."groupId" = mg."id"), group_files AS (SELECT f.* FROM group_file_ownership gfo JOIN public."file" f ON f.id = gfo."fileId"), all_files AS (SELECT * from legacy_my_own_files UNION SELECT * from legacy_files_shared_with_me UNION SELECT * from group_files) SELECT 'user' as "table", "allowAnalyticsCookie"::boolean as "0", "areKeyboardShortcutsEnabled"::boolean as "1", "enhancedA11yMode"::boolean as "2", "exportBackground"::boolean as "3", "exportPadding"::boolean as "4", "isDynamicSizeMode"::boolean as "5", "isPasteAtCursorMode"::boolean as "6", "isSnapMode"::boolean as "7", "isWrapMode"::boolean as "8", "isZoomDirectionInverted"::boolean as "9", "animationSpeed"::bigint as "10", "createdAt"::bigint as "11", "edgeScrollSpeed"::bigint as "12", "updatedAt"::bigint as "13", "avatar"::text as "14", "color"::text as "15", "colorScheme"::text as "16", "email"::text as "17", "exportFormat"::text as "18", "exportTheme"::text as "19", "flags"::text as "20", "id"::text as "21", "inputMode"::text as "22", "locale"::text as "23", "name"::text as "24" FROM public."user" WHERE "id" = $1 UNION ALL SELECT 'file_state' as "table", "isFileOwner"::boolean as "0", "isPinned"::boolean as "1", null::boolean as "2", null::boolean as "3", null::boolean as "4", null::boolean as "5", null::boolean as "6", null::boolean as "7", null::boolean as "8", null::boolean as "9", "firstVisitAt"::bigint as "10", "lastEditAt"::bigint as "11", "lastVisitAt"::bigint as "12", null::bigint as "13", "fileId"::text as "14", "lastSessionState"::text as "15", "userId"::text as "16", null::text as "17", null::text as "18", null::text as "19", null::text as "20", null::text as "21", null::text as "22", null::text as "23", null::text as "24" FROM my_file_states UNION ALL SELECT 'file' as "table", "isDeleted"::boolean as "0", "isEmpty"::boolean as "1", "published"::boolean as "2", "shared"::boolean as "3", null::boolean as "4", null::boolean as "5", null::boolean as "6", null::boolean as "7", null::boolean as "8", null::boolean as "9", "createdAt"::bigint as "10", "lastPublished"::bigint as "11", "updatedAt"::bigint as "12", null::bigint as "13", "createSource"::text as "14", "id"::text as "15", "name"::text as "16", "ownerAvatar"::text as "17", "ownerId"::text as "18", "ownerName"::text as "19", "owningGroupId"::text as "20", "publishedSlug"::text as "21", "sharedLinkType"::text as "22", "thumbnail"::text as "23", null::text as "24" FROM all_files UNION ALL SELECT 'group_file' as "table", null::boolean as "0", null::boolean as "1", null::boolean as "2", null::boolean as "3", null::boolean as "4", null::boolean as "5", null::boolean as "6", null::boolean as "7", null::boolean as "8", null::boolean as "9", "createdAt"::bigint as "10", "updatedAt"::bigint as "11", null::bigint as "12", null::bigint as "13", "fileId"::text as "14", "groupId"::text as "15", "index"::text as "16", null::text as "17", null::text as "18", null::text as "19", null::text as "20", null::text as "21", null::text as "22", null::text as "23", null::text as "24" FROM group_file_ownership UNION ALL SELECT 'group' as "table", "inviteLinkEnabled"::boolean as "0", "isDeleted"::boolean as "1", null::boolean as "2", null::boolean as "3", null::boolean as "4", null::boolean as "5", null::boolean as "6", null::boolean as "7", null::boolean as "8", null::boolean as "9", "createdAt"::bigint as "10", "updatedAt"::bigint as "11", null::bigint as "12", null::bigint as "13", "id"::text as "14", "inviteSecret"::text as "15", "name"::text as "16", null::text as "17", null::text as "18", null::text as "19", null::text as "20", null::text as "21", null::text as "22", null::text as "23", null::text as "24" FROM my_groups UNION ALL SELECT 'group_user' as "table", null::boolean as "0", null::boolean as "1", null::boolean as "2", null::boolean as "3", null::boolean as "4", null::boolean as "5", null::boolean as "6", null::boolean as "7", null::boolean as "8", null::boolean as "9", "createdAt"::bigint as "10", "updatedAt"::bigint as "11", null::bigint as "12", null::bigint as "13", "groupId"::text as "14", "index"::text as "15", "role"::text as "16", "userColor"::text as "17", "userId"::text as "18", "userName"::text as "19", null::text as "20", null::text as "21", null::text as "22", null::text as "23", null::text as "24" FROM all_group_users UNION ALL SELECT 'user_mutation_number' as "table", null::boolean as "0", null::boolean as "1", null::boolean as "2", null::boolean as "3", null::boolean as "4", null::boolean as "5", null::boolean as "6", null::boolean as "7", null::boolean as "8", null::boolean as "9", "mutationNumber"::bigint as "10", null::bigint as "11", null::bigint as "12", null::bigint as "13", null::text as "14", null::text as "15", null::text as "16", null::text as "17", null::text as "18", null::text as "19", null::text as "20", null::text as "21", null::text as "22", null::text as "23", null::text as "24" FROM public."user_mutation_number" WHERE "userId" = $1 UNION ALL SELECT 'lsn' as "table", null::boolean as "0", null::boolean as "1", null::boolean as "2", null::boolean as "3", null::boolean as "4", null::boolean as "5", null::boolean as "6", null::boolean as "7", null::boolean as "8", null::boolean as "9", null::bigint as "10", null::bigint as "11", null::bigint as "12", null::bigint as "13", pg_current_wal_lsn()::text as "14", null::text as "15", null::text as "16", null::text as "17", null::text as "18", null::text as "19", null::text as "20", null::text as "21", null::text as "22", null::text as "23", null::text as "24" ` export const columnNamesByAlias = { user: { '0': 'allowAnalyticsCookie', '1': 'areKeyboardShortcutsEnabled', '2': 'enhancedA11yMode', '3': 'exportBackground', '4': 'exportPadding', '5': 'isDynamicSizeMode', '6': 'isPasteAtCursorMode', '7': 'isSnapMode', '8': 'isWrapMode', '9': 'isZoomDirectionInverted', '10': 'animationSpeed', '11': 'createdAt', '12': 'edgeScrollSpeed', '13': 'updatedAt', '14': 'avatar', '15': 'color', '16': 'colorScheme', '17': 'email', '18': 'exportFormat', '19': 'exportTheme', '20': 'flags', '21': 'id', '22': 'inputMode', '23': 'locale', '24': 'name', }, file_state: { '0': 'isFileOwner', '1': 'isPinned', '10': 'firstVisitAt', '11': 'lastEditAt', '12': 'lastVisitAt', '14': 'fileId', '15': 'lastSessionState', '16': 'userId', }, file: { '0': 'isDeleted', '1': 'isEmpty', '2': 'published', '3': 'shared', '10': 'createdAt', '11': 'lastPublished', '12': 'updatedAt', '14': 'createSource', '15': 'id', '16': 'name', '17': 'ownerAvatar', '18': 'ownerId', '19': 'ownerName', '20': 'owningGroupId', '21': 'publishedSlug', '22': 'sharedLinkType', '23': 'thumbnail', }, group_file: { '10': 'createdAt', '11': 'updatedAt', '14': 'fileId', '15': 'groupId', '16': 'index', }, group: { '0': 'inviteLinkEnabled', '1': 'isDeleted', '10': 'createdAt', '11': 'updatedAt', '14': 'id', '15': 'inviteSecret', '16': 'name', }, group_user: { '10': 'createdAt', '11': 'updatedAt', '14': 'groupId', '15': 'index', '16': 'role', '17': 'userColor', '18': 'userId', '19': 'userName', }, user_mutation_number: { '10': 'mutationNumber', }, lsn: { '14': 'lsn', }, }