3 ms·
You couldn't share SQL statements between the backend and the frontend. It's for the same reason it was shot down: SQL implementations are incredibly varied.
by swsieber 8y ago
You couldn't share SQL statements between the backend and the frontend. It's for the same reason it was shot down: SQL implementations are incredibly varied.
- virtualwhys 8y agoLimited to a certain subset you most definitely could use the same statements (obviously not CTEs and the like). Ideally you'd have a translation layer, so instead of writing error prone string-y SQL, you'd have a type safe DSL in the vein of LINQ to SQL, Esqueleto, Slick, Quill, etc. that generates approriate SQL based on the target driver. That way you write the same query once, with the same model, and dispense with the inefficient square wheel that is IndexedDB + javascript.