Skip to content
This repository was archived by the owner on Apr 1, 2021. It is now read-only.

Latest commit

 

History

History
61 lines (42 loc) · 1.69 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.69 KB

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.