diff --git a/README.md b/README.md index 0eb8707..e00f69c 100644 --- a/README.md +++ b/README.md @@ -1 +1,25 @@ -## Storm ## +## Storm - Object-Relational Mapper ## + +Interface + +```java + @Connection(context = "H2") + private interface UserRepository { + + @Select(sql = "select * from users order by id") + public List fetchAll(); + + @Select(sql = "select * from users where id = ?") + public User findById(int id); + + } +``` + +Use + +```java + UserRepository repository = StormRepository.newInstance(UserRepository.class); + List users = repository.fetchAll(); + User user = repository.findById(12); + +``` \ No newline at end of file