Prepare sqlx queries and add content dir

This commit is contained in:
Tyler Hallada 2023-10-19 23:12:31 -04:00
parent 1305cf490a
commit f8a717d92f
45 changed files with 3063 additions and 4 deletions

1
.fdignore Normal file
View File

@ -0,0 +1 @@
.sqlx

View File

@ -15,17 +15,26 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release --verbose
- name: Check sqlx prepare files
run: cargo sqlx prepare --check
- name: Run tests
run: cargo test --verbose
- name: Build
run: cargo build --release --verbose
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy with rsync
run: rsync -avz ./target/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/crawlnicle/crawlnicle/target/

2
.gitignore vendored
View File

@ -5,4 +5,4 @@
/static/css/*
/static/img/*
.frontend-built
/content
/content/*

1
.rgignore Normal file
View File

@ -0,0 +1 @@
.sqlx

View File

@ -0,0 +1,131 @@
{
"db_name": "PostgreSQL",
"query": "insert into feed (\n title, url, type, description\n ) values (\n $1, $2, COALESCE($3, 'unknown'::feed_type), $4\n ) on conflict (url) do update set\n title = excluded.title,\n url = excluded.url,\n type = COALESCE(excluded.type, feed.type),\n description = excluded.description\n returning\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Varchar",
{
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
},
"Text"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "039d63754fc6bf841f95cff20eab23521458314055015463ef073a9e20dcd7ea"
}

View File

@ -0,0 +1,116 @@
{
"db_name": "PostgreSQL",
"query": "insert into feed (\n title, url, description\n ) values (\n $1, $2, $3\n ) returning\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Varchar",
"Text"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "03c01f02a2108f311e853ac15325165f080b27f3fd084047d40c4dee5ace21e2"
}

View File

@ -0,0 +1,65 @@
{
"db_name": "PostgreSQL",
"query": "update users set\n password_hash = $2\n where\n user_id = $1\n returning\n user_id,\n email,\n email_verified,\n password_hash,\n name,\n created_at,\n updated_at,\n deleted_at\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "email",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "email_verified",
"type_info": "Bool"
},
{
"ordinal": 3,
"name": "password_hash",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 7,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Text"
]
},
"nullable": [
false,
false,
false,
false,
true,
false,
true,
true
]
},
"hash": "0ced6acfff7af4999d2d607b6c23a5db9362ebc35a462cb9393f251929441d24"
}

View File

@ -0,0 +1,62 @@
{
"db_name": "PostgreSQL",
"query": "insert into user_password_reset_token (\n token_id, user_id, request_user_agent, request_ip, expires_at\n ) values (\n $1, $2, $3, $4, $5\n ) returning *",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "token_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "request_user_agent",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "request_ip",
"type_info": "Inet"
},
{
"ordinal": 4,
"name": "expires_at",
"type_info": "Timestamptz"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Uuid",
"Text",
"Inet",
"Timestamptz"
]
},
"nullable": [
false,
false,
true,
false,
false,
false,
true
]
},
"hash": "0e03d49283d0790f85c9c1eb34018ffccb720a7664ff2e4c1da5450448306e2a"
}

View File

@ -0,0 +1,86 @@
{
"db_name": "PostgreSQL",
"query": "insert into entry (\n title, url, description, feed_id, published_at\n ) values (\n $1, $2, $3, $4, $5\n ) returning *",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Varchar",
"Text",
"Uuid",
"Timestamptz"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "1670455a6480cc09cbdf3b53af094c11964afc16d04b90e18d4ac9f0389815df"
}

View File

@ -0,0 +1,84 @@
{
"db_name": "PostgreSQL",
"query": "select * from entry\n where deleted_at is null\n and feed_id = $1\n and published_at < $2\n order by published_at desc\n limit $3\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Timestamptz",
"Int8"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "1efa8f235c7a72393a3b123508fe50cb65ecd10bee38fd416a349ae9cb6e4130"
}

View File

@ -0,0 +1,83 @@
{
"db_name": "PostgreSQL",
"query": "select * from entry\n where deleted_at is null\n and feed_id = $1\n order by published_at desc\n limit $2\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Int8"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "2110d7dc98e68a69b1cb60a74e429dd5383aab005fde05b3f0c6725ab211b4f0"
}

View File

@ -0,0 +1,116 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n and (created_at, feed_id) < ($1, $2)\n order by created_at desc, feed_id desc\n limit $3\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Uuid",
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "258f24351475ae041eb679f966978ea066e467530a5ba2e07ad8feb5f91d5422"
}

View File

@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "update feed set\n last_crawl_error = $2\n where feed_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid",
"Text"
]
},
"nullable": []
},
"hash": "307f05655ef49bede83b238c76bfe7ae97bb3d0e56c18706b57ee5349afcac64"
}

View File

@ -0,0 +1,89 @@
{
"db_name": "PostgreSQL",
"query": "update entry set\n title = $2,\n url = $3,\n description = $4,\n feed_id = $5,\n etag_header = $6,\n last_modified_header = $7,\n published_at = $8\n where entry_id = $1\n returning *\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Text",
"Varchar",
"Text",
"Uuid",
"Text",
"Text",
"Timestamptz"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "37eb6575e1d8489a3e707ee6aebe3fbce3da3dc9e395c7dd7f1e976ace664b22"
}

View File

@ -0,0 +1,58 @@
{
"db_name": "PostgreSQL",
"query": "select\n *\n from user_password_reset_token\n where token_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "token_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "request_user_agent",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "request_ip",
"type_info": "Inet"
},
{
"ordinal": 4,
"name": "expires_at",
"type_info": "Timestamptz"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
false,
true,
false,
false,
false,
true
]
},
"hash": "3d83816c9487af5578fe7a16a7be18190ba95397c747845e61ec6f5e54d2f74c"
}

View File

@ -0,0 +1,114 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n order by title asc, feed_id asc\n limit $1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "5229da92b613d41dfb2cef196e7f61e2b1440f9b8b89cbb306cf4cddbf50edbd"
}

View File

@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "delete from user_password_reset_token\n where token_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": []
},
"hash": "5962737114347504d6f19c321347178b34f36ea1e44787338c1103d247229d67"
}

View File

@ -0,0 +1,114 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed where feed_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "5cc76572a565bdefd3ac7ae62ea3a3870ce2a09f1ca496ec3a9f1584d729bb19"
}

View File

@ -0,0 +1,64 @@
{
"db_name": "PostgreSQL",
"query": "update users set\n email_verified = true\n where user_id = $1\n returning *\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "password_hash",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "email",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "email_verified",
"type_info": "Bool"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 7,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
false,
false,
false,
true,
false,
true,
true
]
},
"hash": "5f494624456e2a223f06485aacda32f3bdd35f1c60f86fa67bb72e111d2ec10d"
}

View File

@ -0,0 +1,86 @@
{
"db_name": "PostgreSQL",
"query": "insert into entry (\n title, url, description, feed_id, published_at\n ) select * from unnest($1::text[], $2::text[], $3::text[], $4::uuid[], $5::timestamptz[])\n returning *",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"TextArray",
"TextArray",
"TextArray",
"UuidArray",
"TimestamptzArray"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "62d33e535e4bc1413965f87c61d24fb7111ddd573be1ed2ce65cbca87819a202"
}

View File

@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "update entry set deleted_at = now() where entry_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": []
},
"hash": "654f9be2cfd906c47e5399ee9050f61ae78d9eb55e61546b6b4a3edcb31a19e8"
}

View File

@ -0,0 +1,114 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n order by last_entry_published_at desc, feed_id desc\n limit $1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "67d6c8a5f4e1dfa3886db65884df28ee24f6441bc498a3069fa265d37c1b0f56"
}

View File

@ -0,0 +1,82 @@
{
"db_name": "PostgreSQL",
"query": "select * from entry where entry_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "7af46c16a829bbe50ec9a23092a374f429f5aa72d000284cff974e719557c817"
}

View File

@ -0,0 +1,84 @@
{
"db_name": "PostgreSQL",
"query": "select * from entry\n where deleted_at is null\n and (published_at, entry_id) < ($1, $2)\n order by published_at desc, entry_id desc\n limit $3\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Uuid",
"Int8"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "7effebe55f31a26345be951284e7a213a6703c66dd5d0133690eeba6a38f8b0b"
}

View File

@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "update feed set deleted_at = now() where feed_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": []
},
"hash": "90e98a593dc2ba0a0634bebd3a5b8ca105704203a11012ec8c2bbcdcfbd34703"
}

View File

@ -0,0 +1,47 @@
{
"db_name": "PostgreSQL",
"query": "insert into user_email_verification_token (\n user_id, expires_at\n ) values (\n $1, $2\n ) returning *",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "token_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "expires_at",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 4,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Timestamptz"
]
},
"nullable": [
false,
false,
false,
false,
true
]
},
"hash": "a0cc35aef1e381f89744a6143e39aaaac9830941460f2ee7d26996d426d0448d"
}

View File

@ -0,0 +1,64 @@
{
"db_name": "PostgreSQL",
"query": "select\n *\n from users\n where user_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "password_hash",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "email",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "email_verified",
"type_info": "Bool"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 7,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
false,
false,
false,
true,
false,
true,
true
]
},
"hash": "a579aea134790654217b8d0c1e87c152a5cc84b33e646d845dd8fb8d8bab7ec1"
}

View File

@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "delete from user_email_verification_token\n where token_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": []
},
"hash": "aa3826ef55bd3e982c3cc1870e4d96b43f4993b944c3de85e92bad4b4fcf63a2"
}

View File

@ -0,0 +1,66 @@
{
"db_name": "PostgreSQL",
"query": "insert into users (\n email, password_hash, name\n ) values (\n $1, $2, $3\n ) returning\n user_id,\n email,\n email_verified,\n password_hash,\n name,\n created_at,\n updated_at,\n deleted_at\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "email",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "email_verified",
"type_info": "Bool"
},
{
"ordinal": 3,
"name": "password_hash",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 7,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Text",
"Text"
]
},
"nullable": [
false,
false,
false,
false,
true,
false,
true,
true
]
},
"hash": "b0ef7733b668049750819dd6861f934b439226cc2a5359c146fc0fc4fa70461a"
}

View File

@ -0,0 +1,83 @@
{
"db_name": "PostgreSQL",
"query": "select * from entry\n where deleted_at is null\n and published_at < $1\n order by published_at desc\n limit $2\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Int8"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "b4ce3e4f17266d81dc8acb159ddb57498cdceeee3e29f2d80f5e47667e3c5c0b"
}

View File

@ -0,0 +1,114 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n order by created_at desc, feed_id desc\n limit $1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "ba8e86553ca1ac9bdf5b825ab1a88391b706e9e3611fcf866d973216e8ec01f2"
}

View File

@ -0,0 +1,138 @@
{
"db_name": "PostgreSQL",
"query": "update feed set\n title = $2,\n url = $3,\n type = $4,\n description = $5,\n crawl_interval_minutes = $6,\n last_crawl_error = $7,\n etag_header = $8,\n last_modified_header = $9,\n last_crawled_at = $10,\n last_entry_published_at = $11\n where feed_id = $1\n returning\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Text",
"Varchar",
{
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
},
"Text",
"Int4",
"Text",
"Text",
"Text",
"Timestamptz",
"Timestamptz"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "c1e9dbbfd19ca050e0fdd5c44d35ff43a274773ce92456bdc3d5e407f4adef9a"
}

View File

@ -0,0 +1,86 @@
{
"db_name": "PostgreSQL",
"query": "insert into entry (\n title, url, description, feed_id, published_at\n ) values (\n $1, $2, $3, $4, $5\n ) on conflict (url, feed_id) do update set\n title = excluded.title,\n description = excluded.description,\n published_at = excluded.published_at\n returning *",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Varchar",
"Text",
"Uuid",
"Timestamptz"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "c440ded56d4076b743f6911a76daf1d8113c0dba236049b81db08c9e65c6c962"
}

View File

@ -0,0 +1,116 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n and (title, feed_id) > ($1, $2)\n order by title asc, feed_id asc\n limit $3\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Uuid",
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "ca0b636b59baf64619a510b849a29523f2f648da278c07af2bbdc3ebd71d969e"
}

View File

@ -0,0 +1,46 @@
{
"db_name": "PostgreSQL",
"query": "select\n *\n from user_email_verification_token\n where token_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "token_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 2,
"name": "expires_at",
"type_info": "Timestamptz"
},
{
"ordinal": 3,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 4,
"name": "updated_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid"
]
},
"nullable": [
false,
false,
false,
false,
true
]
},
"hash": "d05fcc90a3125fcf44b843a245a0d3665bb6cec75e441dab59d814d77b8cf8c0"
}

View File

@ -0,0 +1,82 @@
{
"db_name": "PostgreSQL",
"query": "select * from entry\n where deleted_at is null\n order by published_at desc\n limit $1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "d5e390e2191e062eb84ee9556294681bbcc876cfbdecb5a57032a6cdc687bfbb"
}

View File

@ -0,0 +1,85 @@
{
"db_name": "PostgreSQL",
"query": "select * from entry\n where deleted_at is null\n and feed_id = $1\n and (published_at, entry_id) < ($2, $3)\n order by published_at desc, entry_id desc\n limit $4\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Uuid",
"Timestamptz",
"Uuid",
"Int8"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "dbcba66aeae9ace8acc46f4ba28efea16a3e6eae3fdc1f81cd110fbf031efb1b"
}

View File

@ -0,0 +1,116 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n and (last_entry_published_at, feed_id) < ($1, $2)\n order by last_entry_published_at desc, feed_id desc\n limit $3\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Uuid",
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "dd6cc087c8d242522bf6c452cf937498a43411bb1c0b79f34f5e8443f5859bbf"
}

View File

@ -0,0 +1,116 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n and (last_crawled_at, feed_id) < ($1, $2)\n order by last_crawled_at desc, feed_id desc\n limit $3\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Uuid",
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "ddcdd3083cef9ed17a1bc5f59fd183625fa3e69e8627b7a2f59842de3db7ae88"
}

View File

@ -0,0 +1,114 @@
{
"db_name": "PostgreSQL",
"query": "select\n feed_id,\n title,\n url,\n type as \"feed_type: FeedType\",\n description,\n crawl_interval_minutes,\n last_crawl_error,\n etag_header,\n last_modified_header,\n last_crawled_at,\n last_entry_published_at,\n created_at,\n updated_at,\n deleted_at\n from feed\n where deleted_at is null\n order by last_crawled_at desc, feed_id desc\n limit $1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "feed_type: FeedType",
"type_info": {
"Custom": {
"name": "feed_type",
"kind": {
"Enum": [
"atom",
"json",
"rss0",
"rss1",
"rss2",
"unknown"
]
}
}
}
},
{
"ordinal": 4,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "crawl_interval_minutes",
"type_info": "Int4"
},
{
"ordinal": 6,
"name": "last_crawl_error",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 9,
"name": "last_crawled_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "last_entry_published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 11,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 12,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 13,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
false,
true,
false,
false,
true,
false,
true,
true,
true,
true,
true,
false,
true,
true
]
},
"hash": "ebd8e2939c0397823bdc5242128029fdbec035325f30fd20c21a706c555f0e2b"
}

View File

@ -0,0 +1,86 @@
{
"db_name": "PostgreSQL",
"query": "insert into entry (\n title, url, description, feed_id, published_at\n ) select * from unnest($1::text[], $2::text[], $3::text[], $4::uuid[], $5::timestamptz[])\n on conflict (url, feed_id) do update set\n title = excluded.title,\n description = excluded.description,\n published_at = excluded.published_at\n returning *",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "entry_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "title",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "url",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "description",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "feed_id",
"type_info": "Uuid"
},
{
"ordinal": 5,
"name": "etag_header",
"type_info": "Text"
},
{
"ordinal": 6,
"name": "last_modified_header",
"type_info": "Text"
},
{
"ordinal": 7,
"name": "published_at",
"type_info": "Timestamptz"
},
{
"ordinal": 8,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"TextArray",
"TextArray",
"TextArray",
"UuidArray",
"TimestamptzArray"
]
},
"nullable": [
false,
true,
false,
true,
false,
true,
true,
false,
false,
true,
true
]
},
"hash": "f42725f8e764ce690095f4e31c274ecab6662da1301c74c4e19a700747e15989"
}

View File

@ -0,0 +1,64 @@
{
"db_name": "PostgreSQL",
"query": "select\n *\n from users\n where email = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "user_id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "password_hash",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "email",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "email_verified",
"type_info": "Bool"
},
{
"ordinal": 4,
"name": "name",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 7,
"name": "deleted_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false,
false,
false,
false,
true,
false,
true,
true
]
},
"hash": "f62aef5af0edf4702342f8e37cb7a17d0a31d866347b552ec36764e3f0e6fbc6"
}

View File

@ -61,3 +61,6 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
uuid = { version = "1.4", features = ["serde"] }
url = "2.4"
validator = { version = "0.16", features = ["derive"] }
[profile.dev.package.sqlx-macros]
opt-level = 3

0
content/.gitkeep Normal file
View File

View File

@ -41,7 +41,7 @@ watch-frontend: install-frontend
-s 'just build-dev-frontend'
watch-backend:
cargo watch \
mold -run cargo watch \
--ignore 'logs/*' \
--ignore 'static/*' \
--ignore 'frontend/*' \
@ -58,3 +58,6 @@ reset:
migrate:
sqlx migrate run
prepare:
cargo sqlx prepare