mirror of
https://github.com/Xevion/xevion.dev.git
synced 2026-01-31 06:26:44 -06:00
- Add tags, project_tags, and tag_cooccurrence tables with proper indexes - Implement full CRUD API endpoints for tag management - Add tag association endpoints for projects with automatic cooccurrence updates - Include related tags and project filtering by tag functionality
13 lines
644 B
JSON
13 lines
644 B
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n INSERT INTO tag_cooccurrence (tag_a, tag_b, count)\n SELECT \n LEAST(t1.tag_id, t2.tag_id) as tag_a,\n GREATEST(t1.tag_id, t2.tag_id) as tag_b,\n COUNT(*)::int as count\n FROM project_tags t1\n JOIN project_tags t2 ON t1.project_id = t2.project_id\n WHERE t1.tag_id < t2.tag_id\n GROUP BY tag_a, tag_b\n HAVING COUNT(*) > 0\n ",
|
|
"describe": {
|
|
"columns": [],
|
|
"parameters": {
|
|
"Left": []
|
|
},
|
|
"nullable": []
|
|
},
|
|
"hash": "d988a5efcea128fd29c9476b5ea995116e81b7f2b86dd39e33a90063130c4650"
|
|
}
|