Class SqlSpec.Default
java.lang.Object
org.huiche.jdbc.SqlSpec.Default
- All Implemented Interfaces:
SqlSpec
- Enclosing interface:
SqlSpec
-
Nested Class Summary
Nested classes/interfaces inherited from interface SqlSpec
SqlSpec.Default -
Method Summary
Modifier and TypeMethodDescription<T> MappedQuery<T> 通过行转换器返回映射查询boolean查询是否存在intupdate()执行sql写操作intupdateAndPopulateKey(int keyCount, String keyColumn, Type keyType, Consumer<Object[]> keyConsumer) 执行sql写操作并填充自增字段(一般为主键)Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SqlSpec
query, query, query, updateAndPopulateKey, updateAndPopulateKeySingle, updateAndPopulateKeySingle
-
Method Details
-
query
Description copied from interface:SqlSpec通过行转换器返回映射查询 -
queryExists
public boolean queryExists()Description copied from interface:SqlSpec查询是否存在- Specified by:
queryExistsin interfaceSqlSpec- Returns:
- 是否存在
-
update
-
updateAndPopulateKey
public int updateAndPopulateKey(int keyCount, String keyColumn, Type keyType, Consumer<Object[]> keyConsumer) Description copied from interface:SqlSpec执行sql写操作并填充自增字段(一般为主键)- Specified by:
updateAndPopulateKeyin interfaceSqlSpec- Parameters:
keyCount- 生成key的条数keyColumn- 自增字段,oracle需要传入keyType- 自增字段类型keyConsumer- 自增属性值消费者,第一个参数为自增值,第二个参数为下标,base:0- Returns:
- 变动条数|执行结果
-