4 ms·
Class.filter(insurance_end_date < today_date) Which ORM is that? It would be cool to compare some approaches to common problems.
by TekMol 8y ago
Class.filter(insurance_end_date < today_date)
Which ORM is that? It would be cool to compare some approaches to common problems.
- blowski 8y agoLooks similar to Laravel’s Eloquent, which is inspired by Rails.
- irishsultan 8y agoDiesel has something similar (except that it can't overload < (you can overload < in Rust, but the type doesn't match what's needed), so you need to specify it as insurance_end_date.lt(today_date))
- brobdingnagians 8y agoC++ has a similar thing with sqlpp11: https://github.com/rbock/sqlpp11 https://github.com/rbock/sqlpp11
- funkydata 8y agoThe Django ORM for example. You can ever traverse relations and still use the same syntax: https://docs.djangoproject.com/en/2.0/topics/db/queries/#lookups-that-span-relationships https://docs.djangoproject.com/en/2.0/topics/db/queries/#loo...
- manicdee 8y agoASP.NET MVC4 also has Linq so you can do stuff like Class.All(x => x.attribute == value).ForEach(foo => foo.method()) Django has similar functionality through Q and F expressions. Most ORMs have this functionality of specific language constructs to allow complex queries to be expressed without writing SQL, just with slightly different semantics.