Do you like Lombok? Ohh! You might think it changed the way Java programming, but it makes your programming efficient.
Now, It can become an ORM framework, Improve your efficiency in SQL programming.
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.
Github
https://github.com/braisdom/ObjectiveSql
Features
- With one annotation your Class has fully featured capabilities of SQL programming
- Easy to relational(has_one, has_many, beglongs_to) querying and paged querying
- Java expressions(arithmetic, comparison and logical) can be converted into SQL expression directly
Simple SQL programming without coding
You just define a JavaBean with one annotation your Class has fully capabilities of featured database access
@DomainModel
public class Member {
private String no;
@Queryable
private String name;
private Integer gender;
private String mobile;
private String otherInfo;
@Relation(relationType = RelationType.HAS_MANY)
private List<Order> orders;
}
Querying
Member.countAll();
Member.count("id > ?", 1);
Member.queryByPrimaryKey(1);
Member.queryFirst("id = ?", 1);
Member.query("id > ?", 1);
Member.queryAll();
Relation querying
Member.queryAll(Member.HAS_MANY_ORDERS);
Member.queryByPrimary(1, Member.HAS_MANY_ORDERS);
Member.queryByName("demo", Member.HAS_MANY_ORDERS);
Top comments (13)
oh!今天剛加入dev 就讓我看到這麽好玩的框架,很是期待啊!
同是中国人,感谢支持
必須的,現在就打開idea折騰一下ObjectiveSQL
有问题可以提 issues
👌
That annotation belong to Jparepostory?
Okay sorry objectivesql is it orm first time heard about that is it same as hibernate or ibatis ?
Yes, but its goal is to go beyond the existing ORM framework,
1) Dynamical code generation(querying, updating, etc)
2) Easy to relation query and paged query
3) Java operator can convert to SQL expression directly
Above are basic features, you can visit github.com/braisdom/ObjectiveSql
Please share it to your friend if you like. Thanks.
No, it's ObjectiveSQL's, but it's much more expressive
Okay thanks for useful information going to implement soon
You are welcome
I hope more people will support me