mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-11-25 02:12:22 -05:00
Forgot to run genPrestoPersonDAO.sh
This commit is contained in:
parent
220a26c334
commit
8079ae6aa7
@ -8,6 +8,7 @@ import com.moparisthebest.jdbc.dto.Person;
|
|||||||
import com.moparisthebest.jdbc.util.ResultSetIterable;
|
import com.moparisthebest.jdbc.util.ResultSetIterable;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Time;
|
import java.sql.Time;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
@ -29,6 +30,12 @@ import java.time.*;
|
|||||||
)
|
)
|
||||||
public interface PrestoPersonDAO extends PersonDAO {
|
public interface PrestoPersonDAO extends PersonDAO {
|
||||||
|
|
||||||
|
@JdbcMapper.SQL("CREATE TABLE person (person_no NUMERIC, first_name VARCHAR(40), last_name VARCHAR(40), birth_date TIMESTAMP)")
|
||||||
|
void createTablePerson();
|
||||||
|
|
||||||
|
@JdbcMapper.SQL("INSERT INTO person (person_no, birth_date, last_name, first_name) VALUES ({personNo}, {birthDate}, {firstName}, {lastName})")
|
||||||
|
int insertPerson(long personNo, Date birthDate, String firstName, String lastName);
|
||||||
|
|
||||||
@JdbcMapper.SQL("UPDATE person SET first_name = {firstName} WHERE last_name = {lastName}")
|
@JdbcMapper.SQL("UPDATE person SET first_name = {firstName} WHERE last_name = {lastName}")
|
||||||
int setFirstName(String firstName, String lastName);
|
int setFirstName(String firstName, String lastName);
|
||||||
|
|
||||||
@ -41,15 +48,21 @@ public interface PrestoPersonDAO extends PersonDAO {
|
|||||||
@JdbcMapper.SQL("UPDATE person SET first_name = {firstName} WHERE person_no = {personNo}")
|
@JdbcMapper.SQL("UPDATE person SET first_name = {firstName} WHERE person_no = {personNo}")
|
||||||
void setFirstNameBlob(@JdbcMapper.Blob String firstName, long personNo) throws SQLException;
|
void setFirstNameBlob(@JdbcMapper.Blob String firstName, long personNo) throws SQLException;
|
||||||
|
|
||||||
|
@JdbcMapper.SQL("SELECT first_name, last_name FROM person WHERE last_name = {lastName}")
|
||||||
|
ResultSet getPeopleResultSet(String lastName) throws SQLException;
|
||||||
|
|
||||||
|
@JdbcMapper.SQL(value = "SELECT first_name, last_name FROM person WHERE last_name = {lastName}", cachePreparedStatement = JdbcMapper.OptionalBool.TRUE)
|
||||||
|
ResultSet getPeopleResultSetCached(String lastName) throws SQLException;
|
||||||
|
|
||||||
@JdbcMapper.SQL("SELECT first_name FROM person WHERE person_no = {personNo}")
|
@JdbcMapper.SQL("SELECT first_name FROM person WHERE person_no = {personNo}")
|
||||||
String getFirstName(long personNo) throws SQLException;
|
String getFirstName(long personNo) throws SQLException;
|
||||||
|
|
||||||
@JdbcMapper.SQL("SELECT first_name, last_name, birth_date FROM person WHERE person_no = {personNo}")
|
|
||||||
FieldPerson getPerson(long personNo, Calendar cal) throws SQLException;
|
|
||||||
|
|
||||||
@JdbcMapper.SQL(value = "SELECT person_no, first_name, last_name, birth_date FROM person WHERE person_no = {personNo}")
|
@JdbcMapper.SQL(value = "SELECT person_no, first_name, last_name, birth_date FROM person WHERE person_no = {personNo}")
|
||||||
FieldPerson getPerson(long personNo) throws SQLException;
|
FieldPerson getPerson(long personNo) throws SQLException;
|
||||||
|
|
||||||
|
@JdbcMapper.SQL("SELECT first_name, last_name, birth_date FROM person WHERE person_no = {personNo}")
|
||||||
|
FieldPerson getPerson(long personNo, Calendar cal) throws SQLException;
|
||||||
|
|
||||||
@JdbcMapper.SQL("SELECT first_name, last_name FROM person WHERE last_name = {lastName}")
|
@JdbcMapper.SQL("SELECT first_name, last_name FROM person WHERE last_name = {lastName}")
|
||||||
List<FieldPerson> getPeople(String lastName) throws SQLException;
|
List<FieldPerson> getPeople(String lastName) throws SQLException;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user