本文整理了Java中org.skife.jdbi.v2.Query.define
方法的一些代码示例,展示了Query.define
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.define
方法的具体详情如下:
包路径:org.skife.jdbi.v2.Query
类名称:Query
方法名:define
暂无
代码示例来源:origin: io.kazuki/kazuki-db
public static Query<Map<String, Object>> getBoundQuery(Handle handle, String dbPrefix,
String tableParameterName, String tableName, String queryName) {
return handle.createQuery(dbPrefix + queryName).define(tableParameterName, tableName);
}
代码示例来源:origin: com.nesscomputing.migratory/migratory-core
private static Query<MetadataInfo> getStatusQuery(final Handle handle, final String personality, final MigratoryOption [] options)
{
final Query<MetadataInfo> query = handle.createQuery(METADATA_PREFIX + "query_status")
.define("include_internal", MigratoryOption.containsOption(MigratoryOption.INCLUDE_INTERNAL, options))
.define("include_failed", MigratoryOption.containsOption(MigratoryOption.INCLUDE_FAILED, options))
.define("personality_name", personality)
.bind("personality_name", personality)
.map(MetadataInfo.MAPPER);
return query;
}
}
代码示例来源:origin: com.nesscomputing.migratory/migratory-core
private static Query<MetadataInfo> getHistoryQuery(final Handle handle, final String personality, final MigratoryOption [] options)
{
final Query<MetadataInfo> query = handle.createQuery(METADATA_PREFIX + "query_history")
.define("include_internal", MigratoryOption.containsOption(MigratoryOption.INCLUDE_INTERNAL, options))
.define("personality_name", personality)
.bind("personality_name", personality)
.map(MetadataInfo.MAPPER);
return query;
}
}
代码示例来源:origin: com.ning.billing/killbill-meter
.bind("endTime", DateTimeUtils.unixSeconds(endTime))
.bind("tenantRecordId", context.getTenantRecordId())
.define("sourceIds", JOINER.join(sourceIdList));
query.define("metricIds", JOINER.join(metricIdList));
代码示例来源:origin: io.kazuki/kazuki-db
(sortDirection == null || SortDirection.ASCENDING.equals(sortDirection)) ? "ASC" : "DESC";
select.define("order", order);
代码示例来源:origin: org.kill-bill.commons/killbill-jdbi
@Override
public Object withHandle(final Handle h) throws Exception {
h.execute("createSomethingTable");
int numCreated = h.createStatement("insertSomething")
.bind("0", 0)
.bind("1", "Jan")
.execute();
assertThat(numCreated).as("number of rows inserted").isEqualTo(1);
String name = h.createQuery("findById")
.bind("0", 0)
.define("columns", "name")
.mapTo(String.class)
.first();
assertThat(name).as("Jan's Name").isEqualTo("Jan");
return null;
}
});
代码示例来源:origin: org.kill-bill.commons/killbill-jdbi
.define("template", "select() ::= <% select id from something %>")
.map(new IntegerMapper())
.list();
内容来源于网络,如有侵权,请联系作者删除!