ObjectiveSQL is an ORM framework in Java based on ActiveRecord pattern, which encourages rapid development and clean, codes with the least, and convention over configuration.
Features:
1. With one annotation your Class has fully featured capabilities of SQL programming
2. Easy to relational(has_one, has_many and beglongs_to) query and paged query
3. Writing SQL expressions(arithmetic, comparison and logical) using Java syntax
Member.execute(String.format("DELETE FROM %s WHERE name = 'Mary'", Member.TABLE_NAME));
That String.format looks dangerous, especially in a DELETE. Sure, it's a constant in this instance, but other examples use a parameterized ?, so this String.format jumps out.
Just wondering, why use this over Spring + JPA? Does this support reactive data patterns or something? I don't see much in the way of differences. Just not sure what makes this different to what's out there
13 comments
[ 3.1 ms ] story [ 53.7 ms ] threadFeatures:
1. With one annotation your Class has fully featured capabilities of SQL programming
2. Easy to relational(has_one, has_many and beglongs_to) query and paged query
3. Writing SQL expressions(arithmetic, comparison and logical) using Java syntax
https://en.wikipedia.org/wiki/Enterprise_Objects_Framework
How does this work? I thought Java didn't have operator overloading. Are expressions represented as numbers somehow??
They are rarely used in java ecosystem and have a reputation for being fragile - I haven't tested whether this particular one for edge cases though.
[1] https://github.com/braisdom/ObjectiveSql/blob/master/core/sr...
A way to look at Graal is, "better Java compiler plugins."
Some stuff, like using checked exceptions as a function type system, is fragile.
Code weaving was always sort of the future. Look at the Javascript ecosystem. It's unavoidable. Not necessarily bad.
Anyway ObjectiveSQL should probably use an annotationProcessor to achieve the code weaving goals. Similar to Dagger.