dataflow/api
Paul Trowbridge 291c665ed1 Consolidate all SQL into database/queries/, switch to literal SQL in routes
- Add database/queries/{sources,rules,mappings,records}.sql — one file per
  route, all business logic in PostgreSQL functions
- Replace parameterized queries in all four route files with lit()/jsonLit()
  literal interpolation for debuggability
- Add api/lib/sql.js with lit(), jsonLit(), arr() helpers
- Fix get_view_data to use json_agg (preserves column order) with subquery
  (guarantees sort order is respected before aggregation)
- Fix jsonLit() for JSONB params so plain strings become valid JSON
- Update manage.py option 3 to deploy database/queries/ instead of functions.sql
- Add SPEC.md covering architecture, philosophy, and manage.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 22:36:53 -04:00
..
lib Consolidate all SQL into database/queries/, switch to literal SQL in routes 2026-04-05 22:36:53 -04:00
middleware Add login authentication with Basic Auth 2026-04-05 17:41:07 -04:00
routes Consolidate all SQL into database/queries/, switch to literal SQL in routes 2026-04-05 22:36:53 -04:00
server.js Add login authentication with Basic Auth 2026-04-05 17:41:07 -04:00