mirror of
https://github.com/modrinth/code.git
synced 2026-09-02 13:05:50 +00:00
* Fix random project being stale, add project_type filter * Avoid full scan * Add comment * Run prepare, fix v2 * Trigger ci recheck --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
24 lines
730 B
JSON
24 lines
730 B
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "WITH random_id_point AS (\n SELECT POINT(RANDOM() * ((SELECT MAX(id) FROM mods) - (SELECT MIN(id) FROM mods) + 1) + (SELECT MIN(id) FROM mods), 0) AS point\n )\n SELECT id FROM mods\n WHERE status = ANY($1)\n ORDER BY POINT(id, 0) <-> (SELECT point FROM random_id_point)\n LIMIT $2",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "id",
|
|
"type_info": "Int8"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"TextArray",
|
|
"Int8"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false
|
|
]
|
|
},
|
|
"hash": "20da3e21ce6115bd80746be3f6e7273771aed45eea03e46c23ef74a0a59ecfe3"
|
|
}
|