diff --git a/.sqlx/query-0ec98b2387cf4adb82d7e53e872ac97125444c84930bafd71cf1955d4bd93616.json b/.sqlx/query-0ec98b2387cf4adb82d7e53e872ac97125444c84930bafd71cf1955d4bd93616.json new file mode 100644 index 0000000..cc0e585 --- /dev/null +++ b/.sqlx/query-0ec98b2387cf4adb82d7e53e872ac97125444c84930bafd71cf1955d4bd93616.json @@ -0,0 +1,64 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id,\n title,\n content,\n pinned,\n department,\n category,\n author,\n date as \"date: _\"\n FROM posts\n WHERE id = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "title", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "content", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "pinned", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "category", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "author", + "type_info": "Int4" + }, + { + "ordinal": 7, + "name": "date: _", + "type_info": "Timestamptz" + } + ], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true, + true, + false + ] + }, + "hash": "0ec98b2387cf4adb82d7e53e872ac97125444c84930bafd71cf1955d4bd93616" +} diff --git a/.sqlx/query-284e3ef901e15adaf1b3264be93dd78da75ac992b4dae6c42ff9ee63a52fc23c.json b/.sqlx/query-284e3ef901e15adaf1b3264be93dd78da75ac992b4dae6c42ff9ee63a52fc23c.json new file mode 100644 index 0000000..0b43d94 --- /dev/null +++ b/.sqlx/query-284e3ef901e15adaf1b3264be93dd78da75ac992b4dae6c42ff9ee63a52fc23c.json @@ -0,0 +1,29 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE departments\n SET department = $1\n WHERE id = $2\n RETURNING id, department\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "department", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Varchar", + "Int4" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "284e3ef901e15adaf1b3264be93dd78da75ac992b4dae6c42ff9ee63a52fc23c" +} diff --git a/.sqlx/query-2d45cb571944022016c8d328f4b556a794a7191038bb023f491209d18c6d6678.json b/.sqlx/query-2d45cb571944022016c8d328f4b556a794a7191038bb023f491209d18c6d6678.json new file mode 100644 index 0000000..d086504 --- /dev/null +++ b/.sqlx/query-2d45cb571944022016c8d328f4b556a794a7191038bb023f491209d18c6d6678.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id, department FROM departments LIMIT 100", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "department", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false + ] + }, + "hash": "2d45cb571944022016c8d328f4b556a794a7191038bb023f491209d18c6d6678" +} diff --git a/.sqlx/query-341cd3c1a713e36f0d4f1c42ff35cf7a44e7cad89115116729ee1d95f6576ca7.json b/.sqlx/query-341cd3c1a713e36f0d4f1c42ff35cf7a44e7cad89115116729ee1d95f6576ca7.json new file mode 100644 index 0000000..6828292 --- /dev/null +++ b/.sqlx/query-341cd3c1a713e36f0d4f1c42ff35cf7a44e7cad89115116729ee1d95f6576ca7.json @@ -0,0 +1,58 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n id, name, created_at, updated_at, modified as \"modified: _\"\n FROM pages\n ORDER BY name DESC\n LIMIT LEAST($1, 100)\n OFFSET $2\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "created_at", + "type_info": "Timestamp" + }, + { + "ordinal": 3, + "name": "updated_at", + "type_info": "Timestamp" + }, + { + "ordinal": 4, + "name": "modified: _", + "type_info": { + "Custom": { + "name": "page_status", + "kind": { + "Enum": [ + "unmodified", + "new", + "edited" + ] + } + } + } + } + ], + "parameters": { + "Left": [ + "Int4", + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + false + ] + }, + "hash": "341cd3c1a713e36f0d4f1c42ff35cf7a44e7cad89115116729ee1d95f6576ca7" +} diff --git a/.sqlx/query-34c16071a2a97193b9c835f19cf5ab07dbbf048cb2a6df7efd5ef3bb348e1369.json b/.sqlx/query-34c16071a2a97193b9c835f19cf5ab07dbbf048cb2a6df7efd5ef3bb348e1369.json new file mode 100644 index 0000000..53374f3 --- /dev/null +++ b/.sqlx/query-34c16071a2a97193b9c835f19cf5ab07dbbf048cb2a6df7efd5ef3bb348e1369.json @@ -0,0 +1,29 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE categories\n SET category = $1\n WHERE id = $2\n RETURNING id, category\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "category", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Varchar", + "Int4" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "34c16071a2a97193b9c835f19cf5ab07dbbf048cb2a6df7efd5ef3bb348e1369" +} diff --git a/.sqlx/query-3c051391e6fe8ebbf1efc54ec29f865fb5afa88fc3670bfc9359d7ec335b49ab.json b/.sqlx/query-3c051391e6fe8ebbf1efc54ec29f865fb5afa88fc3670bfc9359d7ec335b49ab.json new file mode 100644 index 0000000..4a6629b --- /dev/null +++ b/.sqlx/query-3c051391e6fe8ebbf1efc54ec29f865fb5afa88fc3670bfc9359d7ec335b49ab.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO categories(category)\n VALUES ($1)\n RETURNING id, category\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "category", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Varchar" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "3c051391e6fe8ebbf1efc54ec29f865fb5afa88fc3670bfc9359d7ec335b49ab" +} diff --git a/.sqlx/query-3c9d3d84c6c942b3d89df9c9d29e7910863404a0784f173e5d86d0a86e69a174.json b/.sqlx/query-3c9d3d84c6c942b3d89df9c9d29e7910863404a0784f173e5d86d0a86e69a174.json new file mode 100644 index 0000000..f833ca0 --- /dev/null +++ b/.sqlx/query-3c9d3d84c6c942b3d89df9c9d29e7910863404a0784f173e5d86d0a86e69a174.json @@ -0,0 +1,70 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE posts\n SET title = $1,\n content = $2,\n pinned = $3,\n department = $4,\n category = $5,\n author = $6\n WHERE id = $7\n RETURNING id,\n title,\n content,\n pinned,\n department,\n category,\n author,\n date as \"date: _\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "title", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "content", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "pinned", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "category", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "author", + "type_info": "Int4" + }, + { + "ordinal": 7, + "name": "date: _", + "type_info": "Timestamptz" + } + ], + "parameters": { + "Left": [ + "Varchar", + "Text", + "Bool", + "Int4", + "Int4", + "Int4", + "Int4" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true, + true, + false + ] + }, + "hash": "3c9d3d84c6c942b3d89df9c9d29e7910863404a0784f173e5d86d0a86e69a174" +} diff --git a/.sqlx/query-3e5e92ac6eb5744d738ba15451ed6d69cff702dacaabb993295bf9227a24dce0.json b/.sqlx/query-3e5e92ac6eb5744d738ba15451ed6d69cff702dacaabb993295bf9227a24dce0.json new file mode 100644 index 0000000..ddc802a --- /dev/null +++ b/.sqlx/query-3e5e92ac6eb5744d738ba15451ed6d69cff702dacaabb993295bf9227a24dce0.json @@ -0,0 +1,68 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id,\n title,\n content,\n pinned,\n department,\n category,\n author,\n date as \"date: _\"\n FROM posts\n WHERE ($1::integer IS NULL OR author = $1)\n AND ($2::integer IS NULL OR category = $2)\n AND ($3::integer IS NULL OR department = $3)\n ORDER BY pinned DESC,\n date DESC\n LIMIT LEAST(100, $4)\n OFFSET $5\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "title", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "content", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "pinned", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "category", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "author", + "type_info": "Int4" + }, + { + "ordinal": 7, + "name": "date: _", + "type_info": "Timestamptz" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Int4", + "Int4", + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true, + true, + false + ] + }, + "hash": "3e5e92ac6eb5744d738ba15451ed6d69cff702dacaabb993295bf9227a24dce0" +} diff --git a/.sqlx/query-4081053613c236fa708f37cff33f332ab70e3f3b9525772a02d138b0e799885d.json b/.sqlx/query-4081053613c236fa708f37cff33f332ab70e3f3b9525772a02d138b0e799885d.json new file mode 100644 index 0000000..5c9e2cd --- /dev/null +++ b/.sqlx/query-4081053613c236fa708f37cff33f332ab70e3f3b9525772a02d138b0e799885d.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO users_groups(user_id, group_id) VALUES($1, $2)", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "4081053613c236fa708f37cff33f332ab70e3f3b9525772a02d138b0e799885d" +} diff --git a/.sqlx/query-4a6e0220eabe7590d3e62f55fb09106268e4c0843cef34413c2a51784889e80e.json b/.sqlx/query-4a6e0220eabe7590d3e62f55fb09106268e4c0843cef34413c2a51784889e80e.json new file mode 100644 index 0000000..ecdde16 --- /dev/null +++ b/.sqlx/query-4a6e0220eabe7590d3e62f55fb09106268e4c0843cef34413c2a51784889e80e.json @@ -0,0 +1,69 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO posts (\n title,\n content,\n author,\n pinned,\n department,\n category\n ) VALUES (\n $1, $2, $3, $4, $5, $6\n ) RETURNING id,\n title,\n content,\n pinned,\n department,\n category,\n author,\n date as \"date: _\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "title", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "content", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "pinned", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "category", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "author", + "type_info": "Int4" + }, + { + "ordinal": 7, + "name": "date: _", + "type_info": "Timestamptz" + } + ], + "parameters": { + "Left": [ + "Varchar", + "Text", + "Int4", + "Bool", + "Int4", + "Int4" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true, + true, + false + ] + }, + "hash": "4a6e0220eabe7590d3e62f55fb09106268e4c0843cef34413c2a51784889e80e" +} diff --git a/.sqlx/query-4d7d0195d33156f7b54ef030dba1796d733321b8fe4faf6d8d62af3094fad7fb.json b/.sqlx/query-4d7d0195d33156f7b54ef030dba1796d733321b8fe4faf6d8d62af3094fad7fb.json new file mode 100644 index 0000000..7cc7278 --- /dev/null +++ b/.sqlx/query-4d7d0195d33156f7b54ef030dba1796d733321b8fe4faf6d8d62af3094fad7fb.json @@ -0,0 +1,89 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id, name, username, role as \"role: Role\", description, department, permissions as \"permissions: Vec\"\n FROM users\n WHERE id = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "username", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "role: Role", + "type_info": { + "Custom": { + "name": "role", + "kind": { + "Enum": [ + "teacher", + "admin" + ] + } + } + } + }, + { + "ordinal": 4, + "name": "description", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "permissions: Vec", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + true, + false + ] + }, + "hash": "4d7d0195d33156f7b54ef030dba1796d733321b8fe4faf6d8d62af3094fad7fb" +} diff --git a/.sqlx/query-50293c2e54af11d4c2a553e29b671cef087a159c6ee7182d8ca929ecb748f3b7.json b/.sqlx/query-50293c2e54af11d4c2a553e29b671cef087a159c6ee7182d8ca929ecb748f3b7.json new file mode 100644 index 0000000..cf6c805 --- /dev/null +++ b/.sqlx/query-50293c2e54af11d4c2a553e29b671cef087a159c6ee7182d8ca929ecb748f3b7.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM users WHERE id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "50293c2e54af11d4c2a553e29b671cef087a159c6ee7182d8ca929ecb748f3b7" +} diff --git a/.sqlx/query-6d961342f062df248268a7d6b7261a65152a99a51ee62dd8dec9fdd2fd480e8b.json b/.sqlx/query-6d961342f062df248268a7d6b7261a65152a99a51ee62dd8dec9fdd2fd480e8b.json new file mode 100644 index 0000000..9472fb4 --- /dev/null +++ b/.sqlx/query-6d961342f062df248268a7d6b7261a65152a99a51ee62dd8dec9fdd2fd480e8b.json @@ -0,0 +1,77 @@ +{ + "db_name": "PostgreSQL", + "query": "\n insert into groups(name, permissions)\n values ($1, $2)\n returning id, name, permissions as \"permissions: _\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "permissions: _", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Varchar", + { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + ] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "6d961342f062df248268a7d6b7261a65152a99a51ee62dd8dec9fdd2fd480e8b" +} diff --git a/.sqlx/query-769d696fa2b2c7931c39f4adaa329e20de085e4301c7d872b0145a17c875a95e.json b/.sqlx/query-769d696fa2b2c7931c39f4adaa329e20de085e4301c7d872b0145a17c875a95e.json new file mode 100644 index 0000000..acc1f83 --- /dev/null +++ b/.sqlx/query-769d696fa2b2c7931c39f4adaa329e20de085e4301c7d872b0145a17c875a95e.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO departments(department)\n VALUES ($1)\n RETURNING id, department\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "department", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Varchar" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "769d696fa2b2c7931c39f4adaa329e20de085e4301c7d872b0145a17c875a95e" +} diff --git a/.sqlx/query-8158dcf335d819b503049a0b71d0143e41a524177c8bfa5a685d62a3baa7c8d1.json b/.sqlx/query-8158dcf335d819b503049a0b71d0143e41a524177c8bfa5a685d62a3baa7c8d1.json new file mode 100644 index 0000000..0811278 --- /dev/null +++ b/.sqlx/query-8158dcf335d819b503049a0b71d0143e41a524177c8bfa5a685d62a3baa7c8d1.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id, category FROM categories LIMIT 100", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "category", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false + ] + }, + "hash": "8158dcf335d819b503049a0b71d0143e41a524177c8bfa5a685d62a3baa7c8d1" +} diff --git a/.sqlx/query-85c201df5f91790cb1ed04c20b1c9a6353d6ff489c366576b03c25d7351a9a4a.json b/.sqlx/query-85c201df5f91790cb1ed04c20b1c9a6353d6ff489c366576b03c25d7351a9a4a.json new file mode 100644 index 0000000..be6b102 --- /dev/null +++ b/.sqlx/query-85c201df5f91790cb1ed04c20b1c9a6353d6ff489c366576b03c25d7351a9a4a.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id,\n category\n FROM categories\n WHERE id = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "category", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "85c201df5f91790cb1ed04c20b1c9a6353d6ff489c366576b03c25d7351a9a4a" +} diff --git a/.sqlx/query-8c5f1400988adb95ea5af6ff0f8c3f5e32965d426bd1fdc026f58f5cf63c172d.json b/.sqlx/query-8c5f1400988adb95ea5af6ff0f8c3f5e32965d426bd1fdc026f58f5cf63c172d.json new file mode 100644 index 0000000..c25837d --- /dev/null +++ b/.sqlx/query-8c5f1400988adb95ea5af6ff0f8c3f5e32965d426bd1fdc026f58f5cf63c172d.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE pages SET modified = 'edited'::page_status WHERE id = $1 RETURNING name", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "name", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [ + false + ] + }, + "hash": "8c5f1400988adb95ea5af6ff0f8c3f5e32965d426bd1fdc026f58f5cf63c172d" +} diff --git a/.sqlx/query-907ad325f245c9583b14db07e46a3ef91f4815ca1d47f75856966153cd17ac1d.json b/.sqlx/query-907ad325f245c9583b14db07e46a3ef91f4815ca1d47f75856966153cd17ac1d.json new file mode 100644 index 0000000..b4a454c --- /dev/null +++ b/.sqlx/query-907ad325f245c9583b14db07e46a3ef91f4815ca1d47f75856966153cd17ac1d.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "delete from groups where id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "907ad325f245c9583b14db07e46a3ef91f4815ca1d47f75856966153cd17ac1d" +} diff --git a/.sqlx/query-a5c6c93ed7bf58f3e0cb331de5b6bf4603d04e2b348a6d60bd94998b9b497b80.json b/.sqlx/query-a5c6c93ed7bf58f3e0cb331de5b6bf4603d04e2b348a6d60bd94998b9b497b80.json new file mode 100644 index 0000000..e424b9c --- /dev/null +++ b/.sqlx/query-a5c6c93ed7bf58f3e0cb331de5b6bf4603d04e2b348a6d60bd94998b9b497b80.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO pages (name, modified) VALUES ($1, 'new'::page_status)", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "a5c6c93ed7bf58f3e0cb331de5b6bf4603d04e2b348a6d60bd94998b9b497b80" +} diff --git a/.sqlx/query-a7b125a4393862be3f2bb1c2efa6c02e2973b8929a52e4966e47ac3e4d344f6d.json b/.sqlx/query-a7b125a4393862be3f2bb1c2efa6c02e2973b8929a52e4966e47ac3e4d344f6d.json new file mode 100644 index 0000000..2058cd2 --- /dev/null +++ b/.sqlx/query-a7b125a4393862be3f2bb1c2efa6c02e2973b8929a52e4966e47ac3e4d344f6d.json @@ -0,0 +1,104 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE users SET\n username = $1,\n name = $2,\n description = $3,\n department = $4,\n role = $5\n WHERE id = $6\n RETURNING id,\n username,\n name,\n description,\n department,\n role as \"role: _\",\n permissions as \"permissions: _\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "username", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "description", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "role: _", + "type_info": { + "Custom": { + "name": "role", + "kind": { + "Enum": [ + "teacher", + "admin" + ] + } + } + } + }, + { + "ordinal": 6, + "name": "permissions: _", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Varchar", + "Varchar", + "Text", + "Int4", + { + "Custom": { + "name": "role", + "kind": { + "Enum": [ + "teacher", + "admin" + ] + } + } + }, + "Int4" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + false + ] + }, + "hash": "a7b125a4393862be3f2bb1c2efa6c02e2973b8929a52e4966e47ac3e4d344f6d" +} diff --git a/.sqlx/query-a7dc87a62d5f19b19cbf62f59a65f0d9e22b0312cd01779bb5d6d2930b9e494f.json b/.sqlx/query-a7dc87a62d5f19b19cbf62f59a65f0d9e22b0312cd01779bb5d6d2930b9e494f.json new file mode 100644 index 0000000..b37d08c --- /dev/null +++ b/.sqlx/query-a7dc87a62d5f19b19cbf62f59a65f0d9e22b0312cd01779bb5d6d2930b9e494f.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE pages SET modified = 'unmodified'::page_status WHERE id = ANY ($1) AND modified = ANY (ARRAY['new', 'edited']::page_status[]) RETURNING name", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "name", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Int4Array" + ] + }, + "nullable": [ + false + ] + }, + "hash": "a7dc87a62d5f19b19cbf62f59a65f0d9e22b0312cd01779bb5d6d2930b9e494f" +} diff --git a/.sqlx/query-b1dc9c4fb4fbcf39617e8efcbbdff605011d210e4f10de9e3fc323b78cab6537.json b/.sqlx/query-b1dc9c4fb4fbcf39617e8efcbbdff605011d210e4f10de9e3fc323b78cab6537.json new file mode 100644 index 0000000..c8058bf --- /dev/null +++ b/.sqlx/query-b1dc9c4fb4fbcf39617e8efcbbdff605011d210e4f10de9e3fc323b78cab6537.json @@ -0,0 +1,55 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id, name, permissions as \"permissions: _\"\n FROM users_groups\n INNER JOIN groups\n ON groups.id = users_groups.group_id\n WHERE user_id = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "permissions: _", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "b1dc9c4fb4fbcf39617e8efcbbdff605011d210e4f10de9e3fc323b78cab6537" +} diff --git a/.sqlx/query-b69eb0e1ba35083ee8a3c88ff46bc1e377f4cad89bcfe8ba8d29419147d685fe.json b/.sqlx/query-b69eb0e1ba35083ee8a3c88ff46bc1e377f4cad89bcfe8ba8d29419147d685fe.json new file mode 100644 index 0000000..86e917a --- /dev/null +++ b/.sqlx/query-b69eb0e1ba35083ee8a3c88ff46bc1e377f4cad89bcfe8ba8d29419147d685fe.json @@ -0,0 +1,87 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id,\n name,\n username,\n role as \"role: _\",\n description,\n department,\n permissions as \"permissions: _\"\n FROM users\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "username", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "role: _", + "type_info": { + "Custom": { + "name": "role", + "kind": { + "Enum": [ + "teacher", + "admin" + ] + } + } + } + }, + { + "ordinal": 4, + "name": "description", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "permissions: _", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false, + false, + false, + true, + false + ] + }, + "hash": "b69eb0e1ba35083ee8a3c88ff46bc1e377f4cad89bcfe8ba8d29419147d685fe" +} diff --git a/.sqlx/query-bf0ae73808bd463efda6b7d904da3101807777e4086bc09a9fc4051940c72ee5.json b/.sqlx/query-bf0ae73808bd463efda6b7d904da3101807777e4086bc09a9fc4051940c72ee5.json new file mode 100644 index 0000000..c3cdb08 --- /dev/null +++ b/.sqlx/query-bf0ae73808bd463efda6b7d904da3101807777e4086bc09a9fc4051940c72ee5.json @@ -0,0 +1,95 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id, name, username, role as \"role: _\", description, department, hash, permissions as \"permissions: _\"\n FROM users\n WHERE username = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "username", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "role: _", + "type_info": { + "Custom": { + "name": "role", + "kind": { + "Enum": [ + "teacher", + "admin" + ] + } + } + } + }, + { + "ordinal": 4, + "name": "description", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "hash", + "type_info": "Text" + }, + { + "ordinal": 7, + "name": "permissions: _", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + true, + false, + false + ] + }, + "hash": "bf0ae73808bd463efda6b7d904da3101807777e4086bc09a9fc4051940c72ee5" +} diff --git a/.sqlx/query-cdc3af6760e90d2728e33835064c591a5c9ca7ef4f58f9ebfa4913ca4ce81a39.json b/.sqlx/query-cdc3af6760e90d2728e33835064c591a5c9ca7ef4f58f9ebfa4913ca4ce81a39.json new file mode 100644 index 0000000..615ec84 --- /dev/null +++ b/.sqlx/query-cdc3af6760e90d2728e33835064c591a5c9ca7ef4f58f9ebfa4913ca4ce81a39.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM departments WHERE id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "cdc3af6760e90d2728e33835064c591a5c9ca7ef4f58f9ebfa4913ca4ce81a39" +} diff --git a/.sqlx/query-dbbb1a0494a82e39e09965d2e957085498ec5a2f2cf32d1189bef806ad2dda45.json b/.sqlx/query-dbbb1a0494a82e39e09965d2e957085498ec5a2f2cf32d1189bef806ad2dda45.json new file mode 100644 index 0000000..d96d69b --- /dev/null +++ b/.sqlx/query-dbbb1a0494a82e39e09965d2e957085498ec5a2f2cf32d1189bef806ad2dda45.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM categories WHERE id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "dbbb1a0494a82e39e09965d2e957085498ec5a2f2cf32d1189bef806ad2dda45" +} diff --git a/.sqlx/query-dd99e48b1572e25db38f03da95984fda1072913b29bb6b3753a0d351583dfff6.json b/.sqlx/query-dd99e48b1572e25db38f03da95984fda1072913b29bb6b3753a0d351583dfff6.json new file mode 100644 index 0000000..30f96c3 --- /dev/null +++ b/.sqlx/query-dd99e48b1572e25db38f03da95984fda1072913b29bb6b3753a0d351583dfff6.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id FROM users WHERE username = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false + ] + }, + "hash": "dd99e48b1572e25db38f03da95984fda1072913b29bb6b3753a0d351583dfff6" +} diff --git a/.sqlx/query-e2d7016aff475630bad636774beed9d0e2e4511d5f51bbe66d750bb9a0cc998d.json b/.sqlx/query-e2d7016aff475630bad636774beed9d0e2e4511d5f51bbe66d750bb9a0cc998d.json new file mode 100644 index 0000000..26bfdd7 --- /dev/null +++ b/.sqlx/query-e2d7016aff475630bad636774beed9d0e2e4511d5f51bbe66d750bb9a0cc998d.json @@ -0,0 +1,56 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT id, name, permissions as \"permissions: Vec\"\n FROM groups\n LIMIT LEAST(100, $1)\n OFFSET $2\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "permissions: Vec", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Int4", + "Int8" + ] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "e2d7016aff475630bad636774beed9d0e2e4511d5f51bbe66d750bb9a0cc998d" +} diff --git a/.sqlx/query-e63bc55c7075e272b834ff706a8fa6113f94f9205ff754a8cbf57b69f426e6e9.json b/.sqlx/query-e63bc55c7075e272b834ff706a8fa6113f94f9205ff754a8cbf57b69f426e6e9.json new file mode 100644 index 0000000..c6ead13 --- /dev/null +++ b/.sqlx/query-e63bc55c7075e272b834ff706a8fa6113f94f9205ff754a8cbf57b69f426e6e9.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id, department FROM departments WHERE id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "department", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "e63bc55c7075e272b834ff706a8fa6113f94f9205ff754a8cbf57b69f426e6e9" +} diff --git a/.sqlx/query-ecc69119b5e9a42322a667abe66bece529660e3909d0538ae12efd357485c7b6.json b/.sqlx/query-ecc69119b5e9a42322a667abe66bece529660e3909d0538ae12efd357485c7b6.json new file mode 100644 index 0000000..9cd8ec4 --- /dev/null +++ b/.sqlx/query-ecc69119b5e9a42322a667abe66bece529660e3909d0538ae12efd357485c7b6.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM users_groups WHERE user_id = $1 AND group_id = $2", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "ecc69119b5e9a42322a667abe66bece529660e3909d0538ae12efd357485c7b6" +} diff --git a/.sqlx/query-ef23d299d3a9894692760347db64ba287858d55ae390abb284dc49377cb76822.json b/.sqlx/query-ef23d299d3a9894692760347db64ba287858d55ae390abb284dc49377cb76822.json new file mode 100644 index 0000000..3e89d59 --- /dev/null +++ b/.sqlx/query-ef23d299d3a9894692760347db64ba287858d55ae390abb284dc49377cb76822.json @@ -0,0 +1,78 @@ +{ + "db_name": "PostgreSQL", + "query": "\n update groups\n set name = $1, permissions = $2\n where id = $3\n returning id, name, permissions as \"permissions: _\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "permissions: _", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Varchar", + { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + }, + "Int4" + ] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "ef23d299d3a9894692760347db64ba287858d55ae390abb284dc49377cb76822" +} diff --git a/.sqlx/query-f9711cf7b3a5bf7479c990ccf1071cbef210dd2bbf787b0a457c32377d2b7ccb.json b/.sqlx/query-f9711cf7b3a5bf7479c990ccf1071cbef210dd2bbf787b0a457c32377d2b7ccb.json new file mode 100644 index 0000000..6c40e71 --- /dev/null +++ b/.sqlx/query-f9711cf7b3a5bf7479c990ccf1071cbef210dd2bbf787b0a457c32377d2b7ccb.json @@ -0,0 +1,104 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO users (name, username, role, description, department, hash)\n VALUES ($1, $2, $3, $4, $5, $6)\n RETURNING id,\n name,\n username,\n role as \"role: _\",\n description,\n department,\n permissions as \"permissions: _\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "username", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "role: _", + "type_info": { + "Custom": { + "name": "role", + "kind": { + "Enum": [ + "teacher", + "admin" + ] + } + } + } + }, + { + "ordinal": 4, + "name": "description", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "department", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "permissions: _", + "type_info": { + "Custom": { + "name": "permission[]", + "kind": { + "Array": { + "Custom": { + "name": "permission", + "kind": { + "Enum": [ + "edit_departments", + "edit_categories", + "create_posts", + "edit_posts", + "manage_users", + "manage_pages" + ] + } + } + } + } + } + } + } + ], + "parameters": { + "Left": [ + "Varchar", + "Varchar", + { + "Custom": { + "name": "role", + "kind": { + "Enum": [ + "teacher", + "admin" + ] + } + } + }, + "Text", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + true, + false + ] + }, + "hash": "f9711cf7b3a5bf7479c990ccf1071cbef210dd2bbf787b0a457c32377d2b7ccb" +} diff --git a/.sqlx/query-f981f19da3798c0a6ca886819b15bdc2fb84d60aa394aa23de463b13e7c1d368.json b/.sqlx/query-f981f19da3798c0a6ca886819b15bdc2fb84d60aa394aa23de463b13e7c1d368.json new file mode 100644 index 0000000..a5963ed --- /dev/null +++ b/.sqlx/query-f981f19da3798c0a6ca886819b15bdc2fb84d60aa394aa23de463b13e7c1d368.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM posts WHERE id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "f981f19da3798c0a6ca886819b15bdc2fb84d60aa394aa23de463b13e7c1d368" +} diff --git a/.sqlx/query-ff3039435c85bda626c1d976d04c437a7521327951318304b7b8b7af0ced0fda.json b/.sqlx/query-ff3039435c85bda626c1d976d04c437a7521327951318304b7b8b7af0ced0fda.json new file mode 100644 index 0000000..6548d33 --- /dev/null +++ b/.sqlx/query-ff3039435c85bda626c1d976d04c437a7521327951318304b7b8b7af0ced0fda.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE users\n SET hash = $1\n WHERE users.id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "ff3039435c85bda626c1d976d04c437a7521327951318304b7b8b7af0ced0fda" +}