dr3fty / krynn-sql

Simple java framework like ORM to build sql requests, based on annotations.

Home Page:https://sql.krynn.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Krynn-SQL CodeFactor

About

Simple java framework like ORM to build sql requests, based on annotations.

TODO

  • Create documentation friendly for new developers.
  • Implement cache system.

For the full list check Projects.

Example

@Table("users")
public class User {
    
    @Column
    @PrimaryKey
    private UUID uuid; 
    
    @Column
    private String name;

    public User(UUID uuid, String name) {
        this.uuid = uuid;
        this.name = name;
    }
}
KrynnSQL krynnSQL = new KrynnSQL(yourHikariConfig);

Database database = krynnSQL.getDatabase("krynn");
Table<User> table = database.table(User.class);

User user = new User(UUID.randomUUID(), "testuser");

//Insert / Update user
table.update(user);

//Query users
List<User> users = table.query("SELECT * FROM {table}");

License

The Krynn-SQL is released under version 2.0 of the Apache License.

Ideas and bugs

If you have any issues or suggestions, please submit them here.

About

Simple java framework like ORM to build sql requests, based on annotations.

https://sql.krynn.dev

License:Apache License 2.0


Languages

Language:Java 100.0%