hugsql

2019-05-04T18:16:07.024500Z

@rgm I find that the case for hugsql oriented programs I focus on writing tests to ensure data accessed conform to a schema or spec. ORMs have lifecycles and hooks which we need to validate. This leads into your follow up question: can the specs be put insides hugsql file. I’ve always put the specs outside because it’s a contract that i want the hugsql queries to conform to, and this pattern goes well with tests that mock database functions and returns an object that matches the schema/spec. Arguably you could also put the specs in the hugsql file and still have the same benefits though :P