Skip to content

Commit 8fa5d6d

Browse files
authored
Update README.md
1 parent d8817da commit 8fa5d6d

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# AdvancedSQLClient
55
Ultimate SQL client with intuitive query builders, Json support and more!<br>
6-
Before documentation is done, here is a <a href="https://github.com/ZorTik/AdvancedSQLClient/blob/master/examples/src/main/java/me/zort/sqllib/Example.java">small example</a>.
6+
Head to new <a href="https://github.com/ZorTik/AdvancedSQLClient/wiki">wiki</a> for usage tutorial & quickstart!
77

88
![Badge](https://img.shields.io/jitpack/version/com.github.ZorTik/AdvancedSQLClient?style=for-the-badge) ![Badge](https://img.shields.io/github/license/ZorTik/AdvancedSQLClient?style=for-the-badge)
99
</div>
@@ -14,6 +14,24 @@ Before documentation is done, here is a <a href="https://github.com/ZorTik/Advan
1414
<img src="https://user-images.githubusercontent.com/67344817/183105393-af39026f-b059-4096-a880-1fe0e93eeeee.png" width="100%"></img>
1515
</p>-->
1616

17+
```java
18+
@Table("users")
19+
public interface UserRepository {
20+
@Save
21+
QueryResult save(User user);
22+
23+
@Select
24+
@Where(@Where.Condition(column = "name", value = "{Name}"))
25+
User findUser(@Placeholder("Name") String name);
26+
}
27+
28+
SQLDatabaseConnection connection = ...;
29+
UserRepository repository = connection.createGate(UserRepository.class);
30+
if (repository.save(new User("User1")).isSuccessful()) {
31+
User user = repository.findUser("User1");
32+
}
33+
```
34+
1735
## Installation
1836
You can add AdvancedSQLClient to your build path using Maven or Gradle. You can also shade&relocate it using shade plugin to have it's unique build path.
1937

0 commit comments

Comments
 (0)