Last active
June 24, 2020 17:50
-
-
Save nikhil3000/6265f3d44316f3d3752973c1c78b683a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface MyDAO { | |
@SqlUpdate("create table userData (id int primary key, name varchar(100))") | |
void createUserTable(); | |
@SqlUpdate("insert into userData (id, name) values (:id, :name)") | |
void insert(@Bind("id") int id, @Bind("name") String name); | |
@SqlQuery("select name from userData where id = :id") | |
String findNameById(@Bind("id") int id); | |
@SqlQuery("select name from userData") | |
List<String> getAllNames(); | |
@SqlQuery("select name from userData where id 1") | |
String testQuery(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment