Jeremy Woertink
Jeremy Woertink
in postgres, you can do this ``` # select interval '1 hour'; interval ---------- 01:00:00 (1 row) ``` and in Crystal `1.hour` gives you `01:00:00`.
If you make a migration using `add_belongs_to user : User`, and that user only `has_one` of this object, then it would make sense that you'd want to also make sure...
I had a chat with @paulcsmith on this, and he brought up a good point: > ... it can cause weird bugs where you’re not sure how to do a...
Looking at this code: ```crystal validate_numeric amount, greater_than: 0 ``` You'd assume that this is validating to ensure `amount > 0`, but it doesn't. You can actually set `amount` to...
Since Avram currently supports bulk updating on a query, if you add a join on to the query, it's technically a syntax error from postgres. Soft deletes are considered bulk...
https://github.com/luckyframework/avram/blob/9251a965372d319977558bcbe3d0696f60aeb45e/src/avram/errors.cr#L23-L31 You should be able to access these locals as properties so that way if you need to customize this error, you can. This is just one class, but there's...
https://dev.to/deepika_banoth/how-to-use-jsonbset-function-in-postgresql-35eo This function is pretty cool. I think we can utilize it to make updating JSON column data easier.
I get this every once in a while. I'll load a page, and it'll say that the model must be preloaded with X even though that query calls `preload_x`. Without...
https://github.com/luckyframework/avram/blob/519213e5c5f6a7a61766d16e815a2f6220500cae/src/avram/database.cr#L87-L123 Using these low-level crystal-db methods give a false sense of unified code in how they work. For example, it *looks* like you can do this, but you can't... ```crystal...
The query cache creates a new instance on each fiber. In the context of HTTP requests, that means each request gets its own query cache. However, [Mosquito](https://github.com/mosquito-cr/mosquito) runs all of...