sqlx prepare

This commit is contained in:
2025-12-26 01:13:47 +01:00
parent 994d9a8957
commit 4d73a963df
7 changed files with 138 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO tokens (token, is_refresh,expires_at) VALUES (?, 0, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 2
},
"nullable": []
},
"hash": "33215728aa8e13de85b813c833bac96b331fd48d5cd1e76cd41d8194539d7d6d"
}

View File

@@ -1,6 +1,6 @@
{ {
"db_name": "SQLite", "db_name": "SQLite",
"query": "SELECT * FROM tokens WHERE is_refresh = $1", "query": "SELECT * FROM tokens WHERE is_refresh = ?",
"describe": { "describe": {
"columns": [ "columns": [
{ {
@@ -40,5 +40,5 @@
true true
] ]
}, },
"hash": "5b381986f605cdd82b2aaa32cdb1ddbb0c95d602f70ce58761192e11fedfa145" "hash": "3bd568b7253ed0f1b1c54a64115acf53c2c8e217185f90312e2749bbfe13b006"
} }

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE tokens SET token = ?, expires_at = ? WHERE is_refresh = 1 AND token = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 3
},
"nullable": []
},
"hash": "6b1ebebff9845b41516789dd9c454a0c33acbaab1e25c1baa0c9c6a12146b05e"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO tokens (token, is_refresh,expires_at) VALUES (?, 1, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 2
},
"nullable": []
},
"hash": "72f5895f51e2ab2807b7bc6fbfe89ef09b46d86aa808ea34aa20922f180e3d98"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "DELETE FROM tokens WHERE expires_at < ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "a4a7f8cf6778480c645ffde3daf5e495a7604176c71753f53fa756c9a7290713"
}

View File

@@ -0,0 +1,44 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM tokens WHERE is_refresh = 1 ORDER BY expires_at DESC LIMIT 1",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Integer"
},
{
"name": "token",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "is_refresh",
"ordinal": 2,
"type_info": "Integer"
},
{
"name": "created_at",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "expires_at",
"ordinal": 4,
"type_info": "Text"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false,
false,
true,
true
]
},
"hash": "abd3db49b4b1c87b205caf9256f3fe7d40cf979973fd502e3ec7327a1d7cda34"
}

View File

@@ -0,0 +1,44 @@
{
"db_name": "SQLite",
"query": "SELECT * FROM tokens WHERE is_refresh = 0 ORDER BY expires_at DESC LIMIT 1",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Integer"
},
{
"name": "token",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "is_refresh",
"ordinal": 2,
"type_info": "Integer"
},
{
"name": "created_at",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "expires_at",
"ordinal": 4,
"type_info": "Text"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false,
false,
true,
true
]
},
"hash": "e52ee1d9e3fcfb214d7d8a333ca04c1cab4b1f3fa7ffb37d1c6458917f591ba8"
}