Compare commits

..

1 Commits

Author SHA1 Message Date
Alphonse Paix
be69a54fd1 queries
All checks were successful
Rust / Test (push) Successful in 5m51s
Rust / Rustfmt (push) Successful in 22s
Rust / Clippy (push) Successful in 1m38s
Rust / Code coverage (push) Successful in 5m6s
2025-10-11 00:06:08 +02:00
5 changed files with 58 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{ {
"db_name": "PostgreSQL", "db_name": "PostgreSQL",
"query": "\n SELECT p.post_id, p.author_id, u.username AS author,\n p.title, p.content, p.published_at, last_modified\n FROM posts p\n LEFT JOIN users u ON p.author_id = u.user_id\n WHERE p.post_id = $1\n ", "query": "\n SELECT p.post_id, p.author_id, u.username AS author, u.full_name,\n p.title, p.content, p.published_at, last_modified\n FROM posts p\n LEFT JOIN users u ON p.author_id = u.user_id\n WHERE p.post_id = $1\n ",
"describe": { "describe": {
"columns": [ "columns": [
{ {
@@ -20,21 +20,26 @@
}, },
{ {
"ordinal": 3, "ordinal": 3,
"name": "title", "name": "full_name",
"type_info": "Text" "type_info": "Text"
}, },
{ {
"ordinal": 4, "ordinal": 4,
"name": "content", "name": "title",
"type_info": "Text" "type_info": "Text"
}, },
{ {
"ordinal": 5, "ordinal": 5,
"name": "content",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "published_at", "name": "published_at",
"type_info": "Timestamptz" "type_info": "Timestamptz"
}, },
{ {
"ordinal": 6, "ordinal": 7,
"name": "last_modified", "name": "last_modified",
"type_info": "Timestamptz" "type_info": "Timestamptz"
} }
@@ -48,11 +53,12 @@
false, false,
false, false,
false, false,
true,
false, false,
false, false,
false, false,
true true
] ]
}, },
"hash": "ccffe61c27508d32cf43556a8bffa465f24fec8416a4884ead4eafd324feea72" "hash": "059162eba48cf5f519d0d8b6ce63575ced91941b8c55c986b8c5591c7d9b09e4"
} }

View File

@@ -0,0 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "\n DELETE FROM idempotency\n WHERE created_at < NOW() - INTERVAL '1 hour'\n ",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "1e1a90042e89bd8662df3bae15bc7506146cff102034664c77ab0fc68b9480f5"
}

View File

@@ -1,6 +1,6 @@
{ {
"db_name": "PostgreSQL", "db_name": "PostgreSQL",
"query": "\n SELECT p.author_id, u.username as author,\n p.post_id, p.title, p.content, p.published_at, p.last_modified\n FROM posts p\n INNER JOIN users u ON p.author_id = u.user_id\n WHERE p.author_id = $1\n ORDER BY p.published_at DESC\n ", "query": "\n SELECT p.author_id, u.username as author, u.full_name,\n p.post_id, p.title, p.content, p.published_at, p.last_modified\n FROM posts p\n INNER JOIN users u ON p.author_id = u.user_id\n WHERE p.author_id = $1\n ORDER BY p.published_at DESC\n ",
"describe": { "describe": {
"columns": [ "columns": [
{ {
@@ -15,26 +15,31 @@
}, },
{ {
"ordinal": 2, "ordinal": 2,
"name": "full_name",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "post_id", "name": "post_id",
"type_info": "Uuid" "type_info": "Uuid"
}, },
{ {
"ordinal": 3, "ordinal": 4,
"name": "title", "name": "title",
"type_info": "Text" "type_info": "Text"
}, },
{ {
"ordinal": 4, "ordinal": 5,
"name": "content", "name": "content",
"type_info": "Text" "type_info": "Text"
}, },
{ {
"ordinal": 5, "ordinal": 6,
"name": "published_at", "name": "published_at",
"type_info": "Timestamptz" "type_info": "Timestamptz"
}, },
{ {
"ordinal": 6, "ordinal": 7,
"name": "last_modified", "name": "last_modified",
"type_info": "Timestamptz" "type_info": "Timestamptz"
} }
@@ -47,6 +52,7 @@
"nullable": [ "nullable": [
false, false,
false, false,
true,
false, false,
false, false,
false, false,
@@ -54,5 +60,5 @@
true true
] ]
}, },
"hash": "c545267390019d45c5b4b32caf6c46928ffc7bdac46828cf7f1104ef67f42391" "hash": "1fc92c14786c21d24951341e3a8149964533b7627d2d073eeac7b7d3230513ce"
} }

View File

@@ -0,0 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "\n DELETE FROM subscriptions\n WHERE status = 'pending_confirmation'\n AND subscribed_at < NOW() - INTERVAL '24 hours'\n ",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "7eccf0027753bc1c42897aef12c9350eca023f3be52e24530127d06c3c449104"
}

View File

@@ -1,6 +1,6 @@
{ {
"db_name": "PostgreSQL", "db_name": "PostgreSQL",
"query": "\n SELECT p.post_id, p.author_id, u.username AS author,\n p.title, p.content, p.published_at, p.last_modified\n FROM posts p\n LEFT JOIN users u ON p.author_id = u.user_id\n ORDER BY p.published_at DESC\n LIMIT $1\n OFFSET $2\n ", "query": "\n SELECT p.post_id, p.author_id, u.username AS author, u.full_name,\n p.title, p.content, p.published_at, p.last_modified\n FROM posts p\n LEFT JOIN users u ON p.author_id = u.user_id\n ORDER BY p.published_at DESC\n LIMIT $1\n OFFSET $2\n ",
"describe": { "describe": {
"columns": [ "columns": [
{ {
@@ -20,21 +20,26 @@
}, },
{ {
"ordinal": 3, "ordinal": 3,
"name": "title", "name": "full_name",
"type_info": "Text" "type_info": "Text"
}, },
{ {
"ordinal": 4, "ordinal": 4,
"name": "content", "name": "title",
"type_info": "Text" "type_info": "Text"
}, },
{ {
"ordinal": 5, "ordinal": 5,
"name": "content",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "published_at", "name": "published_at",
"type_info": "Timestamptz" "type_info": "Timestamptz"
}, },
{ {
"ordinal": 6, "ordinal": 7,
"name": "last_modified", "name": "last_modified",
"type_info": "Timestamptz" "type_info": "Timestamptz"
} }
@@ -49,11 +54,12 @@
false, false,
false, false,
false, false,
true,
false, false,
false, false,
false, false,
true true
] ]
}, },
"hash": "836bd296bffff9a2ec14e43ea6aa64a468aaf0914bd95297431320621b42e396" "hash": "dc3c1b786b4f4bd65f625922ce05eab4cb161f3de6c6e676af778f7749af5710"
} }