本文整理匯總了Java中org.skife.jdbi.v2.Handle.update方法的典型用法代碼示例。如果您正苦於以下問題:Java Handle.update方法的具體用法?Java Handle.update怎麽用?Java Handle.update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.skife.jdbi.v2.Handle
的用法示例。
在下文中一共展示了Handle.update方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: deleteJsonRecords
import org.skife.jdbi.v2.Handle; //導入方法依賴的package包/類
private int deleteJsonRecords(Handle dbi, String baseDBPath, String like) {
Deque<String> params = getAllParentPaths(baseDBPath);
StringBuilder sql = new StringBuilder("DELETE from jsondb where path LIKE ?");
if( !params.isEmpty() ) {
sql.append(" OR path in ( ")
.append(String.join(", ", Collections.nCopies(params.size(), "?")))
.append(" )");
}
params.addFirst(like);
return dbi.update(sql.toString(), params.toArray());
}
示例2: deleteJsonRecords
import org.skife.jdbi.v2.Handle; //導入方法依賴的package包/類
private int deleteJsonRecords(Handle dbi, String baseDBPath, String like) {
LinkedList<String> params = getAllParentPaths(baseDBPath);
StringBuilder sql = new StringBuilder("DELETE from jsondb where path LIKE ?");
if( !params.isEmpty() ) {
sql.append(" OR path in ( ")
.append(String.join(", ", Collections.nCopies(params.size(), "?")))
.append(" )");
}
params.addFirst(like);
return dbi.update(sql.toString(), params.toArray());
}
示例3: doDelete
import org.skife.jdbi.v2.Handle; //導入方法依賴的package包/類
private boolean doDelete(Handle h, String id) {
return h.update("DELETE FROM icon_filestore WHERE id=?", id) > 0;
}
示例4: doDelete
import org.skife.jdbi.v2.Handle; //導入方法依賴的package包/類
private boolean doDelete(Handle h, String path) {
return h.update("DELETE FROM filestore WHERE path=?", path) > 0;
}