From 623104231f52b4f80fb2435014ef70ab4073c2e8 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Tue, 20 Feb 2024 22:18:22 +0000 Subject: [PATCH] Add sqlx metadata Gnenerated using https://crates.io/crates/sqlx-cli. --- .env | 1 - ...76cc4e48831d9f115ec780d6e182b1f205082.json | 12 ++++++ ...8519adcbe7443f3e1923be2b7f9d27c71881c.json | 12 ++++++ ...37a0b2346810efc1c8e30a3a198761785719e.json | 12 ++++++ ...090859de17e1b015e4e852efd7afd0c8acb2d.json | 12 ++++++ ...060d9a9779c154e8b290479be939fa6d4d5c5.json | 12 ++++++ ...c4c86fe62cf30e065278d7456d1251784fe11.json | 38 +++++++++++++++++++ ...cfecaa85db4dd9f810d6ff7d2aab7b9a002ec.json | 20 ++++++++++ 8 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 .sqlx/query-2384c1ab0d95aaaf679befdf76c76cc4e48831d9f115ec780d6e182b1f205082.json create mode 100644 .sqlx/query-331408b7348336c3cf427d3d23e8519adcbe7443f3e1923be2b7f9d27c71881c.json create mode 100644 .sqlx/query-441850f70a550ef82ed189278c037a0b2346810efc1c8e30a3a198761785719e.json create mode 100644 .sqlx/query-7d5263f214e9602447fd98e57f4090859de17e1b015e4e852efd7afd0c8acb2d.json create mode 100644 .sqlx/query-d580e26d87812e76b1c99b12c62060d9a9779c154e8b290479be939fa6d4d5c5.json create mode 100644 .sqlx/query-ea4e38250ec0c44915951e55cb7c4c86fe62cf30e065278d7456d1251784fe11.json create mode 100644 .sqlx/query-eefc79011b65be5656d6b5d3fadcfecaa85db4dd9f810d6ff7d2aab7b9a002ec.json diff --git a/.env b/.env index a223ac6..e69de29 100644 --- a/.env +++ b/.env @@ -1 +0,0 @@ -DATABASE_URL=sqlite://sqlite.db diff --git a/.sqlx/query-2384c1ab0d95aaaf679befdf76c76cc4e48831d9f115ec780d6e182b1f205082.json b/.sqlx/query-2384c1ab0d95aaaf679befdf76c76cc4e48831d9f115ec780d6e182b1f205082.json new file mode 100644 index 0000000..99558ba --- /dev/null +++ b/.sqlx/query-2384c1ab0d95aaaf679befdf76c76cc4e48831d9f115ec780d6e182b1f205082.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT INTO user_tokens\n (username, token, created, valid)\n VALUES\n ($1, $2, DATETIME('NOW'), TRUE)\n ", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "2384c1ab0d95aaaf679befdf76c76cc4e48831d9f115ec780d6e182b1f205082" +} diff --git a/.sqlx/query-331408b7348336c3cf427d3d23e8519adcbe7443f3e1923be2b7f9d27c71881c.json b/.sqlx/query-331408b7348336c3cf427d3d23e8519adcbe7443f3e1923be2b7f9d27c71881c.json new file mode 100644 index 0000000..6a67647 --- /dev/null +++ b/.sqlx/query-331408b7348336c3cf427d3d23e8519adcbe7443f3e1923be2b7f9d27c71881c.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT INTO server_padlocks (hash, padlock) VALUES ($1, $2)", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "331408b7348336c3cf427d3d23e8519adcbe7443f3e1923be2b7f9d27c71881c" +} diff --git a/.sqlx/query-441850f70a550ef82ed189278c037a0b2346810efc1c8e30a3a198761785719e.json b/.sqlx/query-441850f70a550ef82ed189278c037a0b2346810efc1c8e30a3a198761785719e.json new file mode 100644 index 0000000..c1c5186 --- /dev/null +++ b/.sqlx/query-441850f70a550ef82ed189278c037a0b2346810efc1c8e30a3a198761785719e.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "CREATE TABLE IF NOT EXISTS user_tokens (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n username VARCHAR(255) NOT NULL,\n token NCHAR(30) NOT NULL,\n valid BOOLEAN NOT NULL,\n created DATETIME NOT NULL,\n last_used DATETIME\n )", + "describe": { + "columns": [], + "parameters": { + "Right": 0 + }, + "nullable": [] + }, + "hash": "441850f70a550ef82ed189278c037a0b2346810efc1c8e30a3a198761785719e" +} diff --git a/.sqlx/query-7d5263f214e9602447fd98e57f4090859de17e1b015e4e852efd7afd0c8acb2d.json b/.sqlx/query-7d5263f214e9602447fd98e57f4090859de17e1b015e4e852efd7afd0c8acb2d.json new file mode 100644 index 0000000..093adac --- /dev/null +++ b/.sqlx/query-7d5263f214e9602447fd98e57f4090859de17e1b015e4e852efd7afd0c8acb2d.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "CREATE TABLE IF NOT EXISTS server_padlocks (\n hash TEXT NOT NULL UNIQUE,\n padlock TEXT NOT NULL\n ) STRICT", + "describe": { + "columns": [], + "parameters": { + "Right": 0 + }, + "nullable": [] + }, + "hash": "7d5263f214e9602447fd98e57f4090859de17e1b015e4e852efd7afd0c8acb2d" +} diff --git a/.sqlx/query-d580e26d87812e76b1c99b12c62060d9a9779c154e8b290479be939fa6d4d5c5.json b/.sqlx/query-d580e26d87812e76b1c99b12c62060d9a9779c154e8b290479be939fa6d4d5c5.json new file mode 100644 index 0000000..b647013 --- /dev/null +++ b/.sqlx/query-d580e26d87812e76b1c99b12c62060d9a9779c154e8b290479be939fa6d4d5c5.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE user_tokens\n SET last_used = DATETIME('NOW')\n WHERE username = $1 AND token = $2", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "d580e26d87812e76b1c99b12c62060d9a9779c154e8b290479be939fa6d4d5c5" +} diff --git a/.sqlx/query-ea4e38250ec0c44915951e55cb7c4c86fe62cf30e065278d7456d1251784fe11.json b/.sqlx/query-ea4e38250ec0c44915951e55cb7c4c86fe62cf30e065278d7456d1251784fe11.json new file mode 100644 index 0000000..7334b43 --- /dev/null +++ b/.sqlx/query-ea4e38250ec0c44915951e55cb7c4c86fe62cf30e065278d7456d1251784fe11.json @@ -0,0 +1,38 @@ +{ + "db_name": "SQLite", + "query": "SELECT token, valid, created, last_used\n FROM user_tokens\n WHERE username = $1\n ORDER BY created DESC", + "describe": { + "columns": [ + { + "name": "token", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "valid", + "ordinal": 1, + "type_info": "Bool" + }, + { + "name": "created", + "ordinal": 2, + "type_info": "Datetime" + }, + { + "name": "last_used", + "ordinal": 3, + "type_info": "Datetime" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false, + true + ] + }, + "hash": "ea4e38250ec0c44915951e55cb7c4c86fe62cf30e065278d7456d1251784fe11" +} diff --git a/.sqlx/query-eefc79011b65be5656d6b5d3fadcfecaa85db4dd9f810d6ff7d2aab7b9a002ec.json b/.sqlx/query-eefc79011b65be5656d6b5d3fadcfecaa85db4dd9f810d6ff7d2aab7b9a002ec.json new file mode 100644 index 0000000..0eec2ed --- /dev/null +++ b/.sqlx/query-eefc79011b65be5656d6b5d3fadcfecaa85db4dd9f810d6ff7d2aab7b9a002ec.json @@ -0,0 +1,20 @@ +{ + "db_name": "SQLite", + "query": "SELECT padlock FROM server_padlocks WHERE hash = $1", + "describe": { + "columns": [ + { + "name": "padlock", + "ordinal": 0, + "type_info": "Text" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false + ] + }, + "hash": "eefc79011b65be5656d6b5d3fadcfecaa85db4dd9f810d6ff7d2aab7b9a002ec" +}