679 lines
No EOL
18 KiB
JSON
679 lines
No EOL
18 KiB
JSON
{
|
|
"db": "PostgreSQL",
|
|
"0e52c31f550313507192bd0436e469dc2b01e67bd19ecdd26e663fbb5af8929b": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "author_display_name",
|
|
"ordinal": 0,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "author_username",
|
|
"ordinal": 1,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"ordinal": 2,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"ordinal": 3,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"ordinal": 4,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"ordinal": 5,
|
|
"type_info": "VarcharArray"
|
|
},
|
|
{
|
|
"name": "blocks!: Json<Vec<PostBlock>>",
|
|
"ordinal": 6,
|
|
"type_info": "Jsonb"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 7,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "modified_at",
|
|
"ordinal": 8,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "published",
|
|
"ordinal": 9,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "collections",
|
|
"ordinal": 10,
|
|
"type_info": "UuidArray"
|
|
}
|
|
],
|
|
"nullable": [
|
|
null,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid",
|
|
"Timestamp",
|
|
"Int8"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT\n COALESCE(users.display_name,users.name) as author_display_name,\n users.name as author_username,\n pages.slug,\n pages.title,\n pages.description,\n pages.tags,\n pages.blocks as \"blocks!: Json<Vec<PostBlock>>\",\n pages.created_at,\n pages.modified_at,\n pages.published,\n pages.collections\n FROM pages\n JOIN\n users ON author = users.id\n WHERE\n pages.site = $1\n AND $2 = ANY(collections)\n AND pages.deleted_at IS NULL\n AND published = true\n AND pages.created_at <= $3\n ORDER BY created_at DESC\n LIMIT $4\n "
|
|
},
|
|
"11e96cfd8c2736f13ce55975ea910dd68640f6f14e38a4b3342d514804e3de27": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "DELETE FROM sessions WHERE id = $1"
|
|
},
|
|
"1d21e65cb21ec57986f154395627de9aefbf77f88c892c5e093787ec53d623d3": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"ordinal": 1,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"ordinal": 2,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "parent",
|
|
"ordinal": 3,
|
|
"type_info": "Uuid"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT id, slug, name, parent FROM collections WHERE site = $1"
|
|
},
|
|
"340503adadca3968e84a6c33fcc15433018aa8171218feae413002c1927de359": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "session_id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"name": "session_actor",
|
|
"ordinal": 1,
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"name": "secret",
|
|
"ordinal": 2,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "session_created_at",
|
|
"ordinal": 3,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "expires_at",
|
|
"ordinal": 4,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "user_id",
|
|
"ordinal": 5,
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"ordinal": 6,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "email",
|
|
"ordinal": 7,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "display_name",
|
|
"ordinal": 8,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "bio",
|
|
"ordinal": 9,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "roles",
|
|
"ordinal": 10,
|
|
"type_info": "UuidArray"
|
|
},
|
|
{
|
|
"name": "user_created_at",
|
|
"ordinal": 11,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "modified_at",
|
|
"ordinal": 12,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "deleted_at",
|
|
"ordinal": 13,
|
|
"type_info": "Timestamp"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
false,
|
|
false,
|
|
true,
|
|
true
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT\n\t\t\tsessions.id AS session_id,\n\t\t\tsessions.actor AS session_actor,\n\t\t\tsessions.secret,\n\t\t\tsessions.created_at AS session_created_at,\n\t\t\tsessions.expires_at,\n\t\t\tusers.id AS user_id,\n\t\t\tusers.name,\n\t\t\tusers.email,\n\t\t\tusers.display_name,\n\t\t\tusers.bio,\n\t\t\tusers.roles,\n\t\t\tusers.created_at AS user_created_at,\n\t\t\tusers.modified_at,\n\t\t\tusers.deleted_at\n\t\t FROM\n\t\t\tsessions\n\t\t JOIN\n\t\t\tusers ON sessions.actor = users.id\n\t\t WHERE\n\t\t\tsessions.id = $1"
|
|
},
|
|
"35deaad55b84124dcba02c555718fe815003e3f50b1c8ee2fc7e540009fa5aef": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "empty",
|
|
"ordinal": 0,
|
|
"type_info": "Bool"
|
|
}
|
|
],
|
|
"nullable": [
|
|
null
|
|
],
|
|
"parameters": {
|
|
"Left": []
|
|
}
|
|
},
|
|
"query": "SELECT CASE WHEN EXISTS(SELECT 1 FROM users) THEN false ELSE true END AS empty;"
|
|
},
|
|
"39237d1e40ce33ce386320212a53986cb21949dd07014772a150242caf4fa610": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid",
|
|
"Uuid",
|
|
"Varchar",
|
|
"Varchar",
|
|
"Text",
|
|
"VarcharArray",
|
|
"Jsonb",
|
|
"UuidArray",
|
|
"Bool"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO pages (id, author, site, slug, title, description, tags, blocks, collections, published)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)"
|
|
},
|
|
"3b27a97c644fda93d0e9b605b606509b4cf77a1877949d0e614a8725666e7e71": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "name",
|
|
"ordinal": 0,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"ordinal": 1,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "owner_display_name",
|
|
"ordinal": 2,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"ordinal": 3,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"ordinal": 4,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 5,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "default_collection",
|
|
"ordinal": 6,
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"name": "collections!: Vec<CollectionData>",
|
|
"ordinal": 7,
|
|
"type_info": "RecordArray"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
null,
|
|
false,
|
|
true,
|
|
false,
|
|
true,
|
|
null
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT\n sites.name,\n users.name as owner,\n COALESCE(users.display_name,users.name) as owner_display_name,\n title,\n description,\n sites.created_at,\n default_collection,\n array_agg(row(collections.id, collections.slug, collections.name, parent)) as \"collections!: Vec<CollectionData>\"\n FROM sites\n JOIN\n users ON sites.owner = users.id\n JOIN\n collections ON collections.site = sites.id\n WHERE\n sites.name = $1\n AND sites.deleted_at IS NULL\n GROUP BY\n sites.name, users.name, users.display_name, title, description, sites.created_at, default_collection"
|
|
},
|
|
"562254387ad52ad5ee3cf806085873485d6b8a0b372ac59a0796b9f0c8910cf2": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid",
|
|
"Varchar",
|
|
"Timestamp",
|
|
"Timestamp"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO sessions (id, actor, secret, created_at, expires_at) VALUES ($1, $2, $3, $4, $5) RETURNING id"
|
|
},
|
|
"61fcf083e6abcfed9480164f3ed4ff2f396c8041a30df002f6e4af920b41f4e4": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "UPDATE sites SET deleted_at = NOW() WHERE name = $1 AND owner = $2 AND deleted_at IS NULL"
|
|
},
|
|
"6690726421106e317b58513f5d0a2eb0a38f15e1e89eb10695eb00e8bb3076d9": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Varchar",
|
|
"Varchar",
|
|
"Text",
|
|
"Uuid",
|
|
"Text",
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "UPDATE sites SET\n name = COALESCE($1, name),\n title = COALESCE($2, title),\n description = COALESCE($3, description),\n default_collection = COALESCE($4, default_collection),\n modified_at = NOW()\n WHERE\n name = $5\n AND owner = $6\n AND deleted_at IS NULL"
|
|
},
|
|
"742b9eef92ad404b3b1ec285ce8b99e945b1b910f25bff376466c704a79fc9c8": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Timestamp"
|
|
]
|
|
}
|
|
},
|
|
"query": "DELETE FROM sessions WHERE expires_at < $1"
|
|
},
|
|
"7bdb55b060b5e81b50c1bf86cb117215cba7010c91f8384a397efac06a88507d": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "DELETE FROM pages WHERE author = $1 AND site = $2 AND slug = $3"
|
|
},
|
|
"8c2ad67b10d926e72efdcf63140c6cc34790aca9a90b52f555e745bbb30faffa": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"ordinal": 1,
|
|
"type_info": "Uuid"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT id, owner FROM sites WHERE name = $1 AND deleted_at IS NULL"
|
|
},
|
|
"9f37c6f3929ca1bf2a6ec55291d652b216419fd13e27b3d61d23c9cf900c501e": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Timestamp",
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "UPDATE sessions SET expires_at = $1 WHERE id = $2 RETURNING id"
|
|
},
|
|
"ab76708bdd8ae46dbab771ef5da6489450fa92c0fcb16df8f393091b108ea2b2": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 1,
|
|
"type_info": "Timestamp"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Varchar",
|
|
"Varchar",
|
|
"UuidArray"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO users ( id, name, password, roles )\n\t\t VALUES ( $1,$2,$3,$4 ) RETURNING id, created_at"
|
|
},
|
|
"b85aa5820a73028398878a86ed550ea42daa362a8b0124f9ed626769a22bc047": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "UPDATE sites\n SET default_collection = $1\n WHERE id = $2"
|
|
},
|
|
"cb17620d355a66a591cfae86e63dc293664a85777b39d7d19f2493a7388ecaf6": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "author_display_name",
|
|
"ordinal": 0,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "author_username",
|
|
"ordinal": 1,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "slug",
|
|
"ordinal": 2,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"ordinal": 3,
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"ordinal": 4,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"ordinal": 5,
|
|
"type_info": "VarcharArray"
|
|
},
|
|
{
|
|
"name": "blocks!: Json<Vec<PostBlock>>",
|
|
"ordinal": 6,
|
|
"type_info": "Jsonb"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"ordinal": 7,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "modified_at",
|
|
"ordinal": 8,
|
|
"type_info": "Timestamp"
|
|
},
|
|
{
|
|
"name": "published",
|
|
"ordinal": 9,
|
|
"type_info": "Bool"
|
|
},
|
|
{
|
|
"name": "collections",
|
|
"ordinal": 10,
|
|
"type_info": "UuidArray"
|
|
}
|
|
],
|
|
"nullable": [
|
|
null,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "SELECT\n COALESCE(users.display_name,users.name) as author_display_name,\n users.name as author_username,\n pages.slug,\n pages.title,\n pages.description,\n pages.tags,\n pages.blocks as \"blocks!: Json<Vec<PostBlock>>\",\n pages.created_at,\n pages.modified_at,\n pages.published,\n pages.collections\n FROM pages \n JOIN\n sites ON site = sites.id\n JOIN\n users ON author = users.id\n WHERE\n slug = $1\n AND sites.name = $2 \n AND pages.deleted_at IS NULL\n AND sites.deleted_at IS NULL"
|
|
},
|
|
"cde4892e52ef14049256499eb4b0529a3b1cefd8f83ef3dc7cb201ee4a8253a3": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Text",
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"query": "DELETE FROM sites WHERE name = $1 AND owner = $2"
|
|
},
|
|
"d9649c375db5825adda3b91c52468235fd9c361b827df64350c7e65bca0f00b4": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "UPDATE pages SET deleted_at = NOW() WHERE author = $1 AND site = $2 AND slug = $3 AND deleted_at IS NULL"
|
|
},
|
|
"e9f521d288a92f1e70b4de35b0d75792007d910ee65e2782eee4a3cdd30560a0": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Varchar",
|
|
"Uuid",
|
|
"Varchar",
|
|
"Text"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO sites (id, name, owner, title, description)\n VALUES ($1, $2, $3, $4, $5) RETURNING id"
|
|
},
|
|
"eaf5344fe77b96ba3697e0454989d0e4d2fd074a850e7c8bafeaa9a19c50b71a": {
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Uuid"
|
|
}
|
|
],
|
|
"nullable": [
|
|
false
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Uuid",
|
|
"Varchar",
|
|
"Varchar"
|
|
]
|
|
}
|
|
},
|
|
"query": "INSERT INTO collections (id, site, slug, name)\n VALUES ($1, $2, $3, $4)\n RETURNING id"
|
|
},
|
|
"ecbbf6f400e058cd6e8695354d65a1883f974a39e11ac5ba0f7fba408fcf6b2a": {
|
|
"describe": {
|
|
"columns": [],
|
|
"nullable": [],
|
|
"parameters": {
|
|
"Left": [
|
|
"Varchar",
|
|
"Text",
|
|
"VarcharArray",
|
|
"Jsonb",
|
|
"Uuid",
|
|
"Uuid",
|
|
"Text",
|
|
"UuidArray",
|
|
"Bool"
|
|
]
|
|
}
|
|
},
|
|
"query": "UPDATE pages SET title = COALESCE($1, title), description = COALESCE($2, description), tags = COALESCE($3, tags), blocks = COALESCE($4, blocks), collections = COALESCE($8, collections), published = COALESCE($9, published) WHERE author = $5 AND site = $6 AND slug = $7 AND deleted_at IS NULL"
|
|
}
|
|
} |