{ "db": "PostgreSQL", "0dba13e5ae77834be905ec25f12343345d09f8c425eaa7fd56e655d4a1399b19": { "query": "\n SELECT note.id, cr.current_revision AS \"current_revision?\"\n FROM note\n LEFT JOIN current_revision cr on cr.id = note.id\n WHERE note.id = $1\n ", "describe": { "columns": [ { "ordinal": 0, "name": "id", "type_info": "Uuid" }, { "ordinal": 1, "name": "current_revision?", "type_info": "Uuid" } ], "parameters": { "Left": [ "Uuid" ] }, "nullable": [ false, false ] } }, "1736db8057b031c583330340d5d314d78c00021530ab4c80913694fceaf3642d": { "query": "DELETE FROM current_revision WHERE id = $1", "describe": { "columns": [], "parameters": { "Left": [ "Uuid" ] }, "nullable": [] } }, "1ff367db7a515db2bd68f5f8cb76e35e75c807fba50dd7f8fdefd77e51fbb4c1": { "query": "\n SELECT\n revision,\n id,\n title,\n note_inner,\n parent,\n prev,\n referents,\n metadata_schema_version,\n metadata_created_at,\n metadata_modified_at,\n metadata_tags,\n metadata_custom_metadata\n FROM revision\n WHERE id = $1 AND revision = $2\n ", "describe": { "columns": [ { "ordinal": 0, "name": "revision", "type_info": "Uuid" }, { "ordinal": 1, "name": "id", "type_info": "Uuid" }, { "ordinal": 2, "name": "title", "type_info": "Text" }, { "ordinal": 3, "name": "note_inner", "type_info": "Text" }, { "ordinal": 4, "name": "parent", "type_info": "Uuid" }, { "ordinal": 5, "name": "prev", "type_info": "Uuid" }, { "ordinal": 6, "name": "referents", "type_info": "UuidArray" }, { "ordinal": 7, "name": "metadata_schema_version", "type_info": "Int8" }, { "ordinal": 8, "name": "metadata_created_at", "type_info": "Timestamptz" }, { "ordinal": 9, "name": "metadata_modified_at", "type_info": "Timestamptz" }, { "ordinal": 10, "name": "metadata_tags", "type_info": "TextArray" }, { "ordinal": 11, "name": "metadata_custom_metadata", "type_info": "Jsonb" } ], "parameters": { "Left": [ "Uuid", "Uuid" ] }, "nullable": [ false, false, false, false, true, true, false, false, false, false, false, false ] } }, "44d12c1355da8f01b014dcd2c6376e8e68ff040a3d8ce5a26e6e50081ecbb610": { "query": "\n SELECT\n revision.revision,\n revision.id,\n revision.title,\n revision.note_inner,\n revision.parent,\n revision.prev,\n revision.referents,\n revision.metadata_schema_version,\n revision.metadata_created_at,\n revision.metadata_modified_at,\n revision.metadata_tags,\n revision.metadata_custom_metadata\n FROM revision\n LEFT JOIN current_revision cr on revision.revision = cr.current_revision\n WHERE revision.id = $1 AND cr.current_revision IS NOT NULL\n ", "describe": { "columns": [ { "ordinal": 0, "name": "revision", "type_info": "Uuid" }, { "ordinal": 1, "name": "id", "type_info": "Uuid" }, { "ordinal": 2, "name": "title", "type_info": "Text" }, { "ordinal": 3, "name": "note_inner", "type_info": "Text" }, { "ordinal": 4, "name": "parent", "type_info": "Uuid" }, { "ordinal": 5, "name": "prev", "type_info": "Uuid" }, { "ordinal": 6, "name": "referents", "type_info": "UuidArray" }, { "ordinal": 7, "name": "metadata_schema_version", "type_info": "Int8" }, { "ordinal": 8, "name": "metadata_created_at", "type_info": "Timestamptz" }, { "ordinal": 9, "name": "metadata_modified_at", "type_info": "Timestamptz" }, { "ordinal": 10, "name": "metadata_tags", "type_info": "TextArray" }, { "ordinal": 11, "name": "metadata_custom_metadata", "type_info": "Jsonb" } ], "parameters": { "Left": [ "Uuid" ] }, "nullable": [ false, false, false, false, true, true, false, false, false, false, false, false ] } }, "5edaa96dc6b5a468028606ec4a90022bbe402028a2560b97c1083c49064fe055": { "query": "\n INSERT INTO\n revision(\n revision, id, title, note_inner, parent, prev, referents,\n metadata_schema_version, metadata_created_at,\n metadata_modified_at, metadata_tags, metadata_custom_metadata\n )\n VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)\n ", "describe": { "columns": [], "parameters": { "Left": [ "Uuid", "Uuid", "Text", "Text", "Uuid", "Uuid", "UuidArray", "Int8", "Timestamptz", "Timestamptz", "TextArray", "Jsonb" ] }, "nullable": [] } }, "6d83af4cc4e18c6abcbee0a77e91b7f681136996aa67803cf816fa7390c59575": { "query": "\n INSERT INTO current_revision (id, current_revision)\n VALUES ($1, $2)\n ON CONFLICT (id) DO UPDATE\n SET current_revision = EXCLUDED.current_revision\n ", "describe": { "columns": [], "parameters": { "Left": [ "Uuid", "Uuid" ] }, "nullable": [] } }, "993d4cef0950217b0e95ac7ca25fea164768809cf6ffb979543cb9ae58517970": { "query": "INSERT INTO note(id) VALUES ($1)", "describe": { "columns": [], "parameters": { "Left": [ "Uuid" ] }, "nullable": [] } }, "ae8d495aab9478759badbc14dc00c0834d956ec077f8ad46848a13c8e214ab7e": { "query": "\n SELECT id\n FROM current_revision\n WHERE id = $1 AND current_revision = $2\n ", "describe": { "columns": [ { "ordinal": 0, "name": "id", "type_info": "Uuid" } ], "parameters": { "Left": [ "Uuid", "Uuid" ] }, "nullable": [ false ] } }, "ba15c668b3d8f0845e053ea2df8ac688248554b35d8e19d95d94f6c3f8385c8b": { "query": "\n SELECT id\n FROM note\n WHERE id = $1\n ", "describe": { "columns": [ { "ordinal": 0, "name": "id", "type_info": "Uuid" } ], "parameters": { "Left": [ "Uuid" ] }, "nullable": [ false ] } }, "cb07e983a89847fe929c37ecfe696ddb1f7f7f4193e0b29f23ec264abb9b199c": { "query": "\n SELECT\n array_remove(array_agg(DISTINCT tag ORDER BY tag), NULL) AS tags\n FROM\n revision\n LEFT JOIN current_revision cr ON revision.revision = cr.current_revision\n LEFT JOIN LATERAL unnest(metadata_tags) tag ON TRUE\n WHERE cr.current_revision IS NOT NULL\n ", "describe": { "columns": [ { "ordinal": 0, "name": "tags", "type_info": "TextArray" } ], "parameters": { "Left": [] }, "nullable": [ null ] } }, "cc5867c004b986f6323b1ab499b2280ceedc5c951116b24b166e833099d4a036": { "query": "\n SELECT\n note.id,\n cr.current_revision AS \"current_revision?\"\n FROM note\n LEFT JOIN current_revision cr on cr.id = note.id\n WHERE note.id = $1\n ", "describe": { "columns": [ { "ordinal": 0, "name": "id", "type_info": "Uuid" }, { "ordinal": 1, "name": "current_revision?", "type_info": "Uuid" } ], "parameters": { "Left": [ "Uuid" ] }, "nullable": [ false, false ] } }, "f883de81cbcfe22edee8c2fcccd8f86420e0c32baf63a3e529a0e6e8c4d1da80": { "query": "DELETE FROM current_revision WHERE id = $1 AND current_revision = $2", "describe": { "columns": [], "parameters": { "Left": [ "Uuid", "Uuid" ] }, "nullable": [] } } }