Compare commits

...

2 commits

Author SHA1 Message Date
Imbus
a0a165d66b .sqlx queries for offline builds 2023-11-05 20:04:26 +01:00
Imbus
73cbf53797 Removed .sqlx from gitignore 2023-11-05 20:04:04 +01:00
11 changed files with 344 additions and 3 deletions

3
.gitignore vendored
View file

@ -25,6 +25,3 @@ dist-ssr
*.env
*.db*
# Remove this if ever needed
*.sqlx

View file

@ -0,0 +1,56 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM posts WHERE id = (SELECT MAX(id) FROM posts)",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "user_id",
"ordinal": 1,
"type_info": "Int64"
},
{
"name": "content",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "upvotes",
"ordinal": 3,
"type_info": "Int64"
},
{
"name": "downvotes",
"ordinal": 4,
"type_info": "Int64"
},
{
"name": "created_at",
"ordinal": 5,
"type_info": "Datetime"
},
{
"name": "updated_at",
"ordinal": 6,
"type_info": "Datetime"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "1cff76615ce5fb26bd9fbb23cbe4a204ddf3d75be6666fca3624deb35c0aaa97"
}

View file

@ -0,0 +1,20 @@
{
"db_name": "SQLite",
"query": "SELECT id FROM users WHERE username = ?",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int64"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false
]
},
"hash": "2e61cd30a6cd3e0937dd096b4f94493e8bcb8c10687d0f8c0592fe38ed956fa6"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO users (username, password) VALUES (?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 2
},
"nullable": []
},
"hash": "78ecd3bc5a999dc227a86556f0ce41065974104b735d96b3c5785480023bb60a"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO posts (user_id, content) VALUES (1, 'Hello world! The demo username is user and the password is pass.')",
"describe": {
"columns": [],
"parameters": {
"Right": 0
},
"nullable": []
},
"hash": "8c06e65c10e3a2eee83cfe51628eec79860b1f3119c4025f541e7d724ed381be"
}

View file

@ -0,0 +1,56 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM posts ORDER BY created_at DESC LIMIT ? OFFSET ?",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "user_id",
"ordinal": 1,
"type_info": "Int64"
},
{
"name": "content",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "upvotes",
"ordinal": 3,
"type_info": "Int64"
},
{
"name": "downvotes",
"ordinal": 4,
"type_info": "Int64"
},
{
"name": "created_at",
"ordinal": 5,
"type_info": "Datetime"
},
{
"name": "updated_at",
"ordinal": 6,
"type_info": "Datetime"
}
],
"parameters": {
"Right": 2
},
"nullable": [
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "8f5e9d8d0c7c33d31f02a9cbd9886ed945d788caeb704b2ee5f743f7bf5fac88"
}

View file

@ -0,0 +1,44 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM users WHERE username = ?",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "username",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "password",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "created_at",
"ordinal": 3,
"type_info": "Datetime"
},
{
"name": "updated_at",
"ordinal": 4,
"type_info": "Datetime"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
false
]
},
"hash": "98f4c0bfff04e07f5d0a46d48a31d24655826eebdf09c7f9f45d770df02035d3"
}

View file

@ -0,0 +1,56 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM posts WHERE id = 1",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "user_id",
"ordinal": 1,
"type_info": "Int64"
},
{
"name": "content",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "upvotes",
"ordinal": 3,
"type_info": "Int64"
},
{
"name": "downvotes",
"ordinal": 4,
"type_info": "Int64"
},
{
"name": "created_at",
"ordinal": 5,
"type_info": "Datetime"
},
{
"name": "updated_at",
"ordinal": 6,
"type_info": "Datetime"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "abd3af0c2a9ba20eab7116a2d5ed4ccde65b4858124c174988ff72847704e305"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO posts (user_id, content) VALUES (?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 2
},
"nullable": []
},
"hash": "c2804e9c7bbd92dcddc34dd6f9d95a2598bb69984d6023e38eeea54454887b90"
}

View file

@ -0,0 +1,56 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM posts WHERE id = ?",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "user_id",
"ordinal": 1,
"type_info": "Int64"
},
{
"name": "content",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "upvotes",
"ordinal": 3,
"type_info": "Int64"
},
{
"name": "downvotes",
"ordinal": 4,
"type_info": "Int64"
},
{
"name": "created_at",
"ordinal": 5,
"type_info": "Datetime"
},
{
"name": "updated_at",
"ordinal": 6,
"type_info": "Datetime"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
false,
false,
false
]
},
"hash": "da280dfbdfe992918eb4f25ca61c08fc01474c3753a63e05b02051f5c066abc2"
}

View file

@ -0,0 +1,20 @@
{
"db_name": "SQLite",
"query": "SELECT username FROM users WHERE username = ?",
"describe": {
"columns": [
{
"name": "username",
"ordinal": 0,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false
]
},
"hash": "fdbb1cd2873a5c866faaf3a60185d1f98e14198655aa536c2227ef8d2c6b88e1"
}