diff --git a/.sqlx/query-ddf942e532d6f91537090cb5df10407334d0191507235fbc7214ebf03617b3b0.json b/.sqlx/query-2429350cbfa8820a0497e769ec7f59dc9b7ae91e6f8d4d65e4515786450d6fcf.json similarity index 94% rename from .sqlx/query-ddf942e532d6f91537090cb5df10407334d0191507235fbc7214ebf03617b3b0.json rename to .sqlx/query-2429350cbfa8820a0497e769ec7f59dc9b7ae91e6f8d4d65e4515786450d6fcf.json index 9deb841..de0c7ea 100644 --- a/.sqlx/query-ddf942e532d6f91537090cb5df10407334d0191507235fbc7214ebf03617b3b0.json +++ b/.sqlx/query-2429350cbfa8820a0497e769ec7f59dc9b7ae91e6f8d4d65e4515786450d6fcf.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT\n m.id, m.repository, m.about, m.changelog, m.featured, m.download_count as mod_download_count, m.created_at, m.updated_at,\n mv.id as version_id, mv.name, mv.description, mv.version, mv.download_link, mv.download_count as mod_version_download_count,\n mv.hash, mv.geode, mv.early_load, mv.api, mv.mod_id, mvs.status as \"status: _\"\n FROM mods m\n INNER JOIN mod_versions mv ON m.id = mv.mod_id\n INNER JOIN mod_version_statuses mvs ON mvs.mod_version_id = mv.id\n WHERE m.id = $1 AND mvs.status = 'accepted'", + "query": "SELECT\n m.id, m.repository, m.about, m.changelog, m.featured, m.download_count as mod_download_count, m.created_at, m.updated_at,\n mv.id as version_id, mv.name, mv.description, mv.version, mv.download_link, mv.download_count as mod_version_download_count,\n mv.hash, mv.geode, mv.early_load, mv.api, mv.mod_id, mvs.status as \"status: _\"\n FROM mods m\n INNER JOIN mod_versions mv ON m.id = mv.mod_id\n INNER JOIN mod_version_statuses mvs ON mvs.mod_version_id = mv.id\n WHERE m.id = $1 \n AND ($2 = false OR mvs.status = 'accepted')", "describe": { "columns": [ { @@ -118,7 +118,8 @@ ], "parameters": { "Left": [ - "Text" + "Text", + "Bool" ] }, "nullable": [ @@ -144,5 +145,5 @@ false ] }, - "hash": "ddf942e532d6f91537090cb5df10407334d0191507235fbc7214ebf03617b3b0" + "hash": "2429350cbfa8820a0497e769ec7f59dc9b7ae91e6f8d4d65e4515786450d6fcf" } diff --git a/.sqlx/query-2c96d39bcb71516be878d474b9f216b84d79565d670ab4e64df81165878ff25c.json b/.sqlx/query-2c96d39bcb71516be878d474b9f216b84d79565d670ab4e64df81165878ff25c.json new file mode 100644 index 0000000..b0f0470 --- /dev/null +++ b/.sqlx/query-2c96d39bcb71516be878d474b9f216b84d79565d670ab4e64df81165878ff25c.json @@ -0,0 +1,29 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT mod_id, version\n FROM mod_versions\n WHERE mod_id = ANY($1)\n AND version = ANY($2)", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "mod_id", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "version", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "TextArray", + "TextArray" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "2c96d39bcb71516be878d474b9f216b84d79565d670ab4e64df81165878ff25c" +} diff --git a/.sqlx/query-9dd0dec9b62fbb510c808dc254b5a168e27429f928bbf4ccaaa9ce0ffc224286.json b/.sqlx/query-9dd0dec9b62fbb510c808dc254b5a168e27429f928bbf4ccaaa9ce0ffc224286.json new file mode 100644 index 0000000..6459fe4 --- /dev/null +++ b/.sqlx/query-9dd0dec9b62fbb510c808dc254b5a168e27429f928bbf4ccaaa9ce0ffc224286.json @@ -0,0 +1,40 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT \n q.replaced,\n q.replacement,\n q.replacement_version,\n q.replacement_id\n FROM (\n SELECT \n replaced.incompatibility_id AS replaced, \n replacement.mod_id AS replacement, \n replacement.version AS replacement_version,\n replacement.id AS replacement_id,\n ROW_NUMBER() OVER(\n partition by replacement.mod_id \n order by replacement.version desc\n ) rn\n FROM incompatibilities replaced\n INNER JOIN mod_versions replacement ON replacement.id = replaced.mod_id\n INNER JOIN mod_version_statuses replacement_status \n ON replacement.status_id = replacement_status.id\n WHERE replaced.importance = 'superseded'\n AND replacement_status.status = 'accepted'\n AND replaced.incompatibility_id = ANY($1)\n ORDER BY replacement.id DESC, replacement.version DESC\n ) q\n WHERE q.rn = 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "replaced", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "replacement", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "replacement_version", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "replacement_id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "TextArray" + ] + }, + "nullable": [ + false, + false, + false, + false + ] + }, + "hash": "9dd0dec9b62fbb510c808dc254b5a168e27429f928bbf4ccaaa9ce0ffc224286" +}