org.skife.jdbi.v2.Query.define()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(165)

本文整理了Java中org.skife.jdbi.v2.Query.define方法的一些代码示例,展示了Query.define的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.define方法的具体详情如下:
包路径:org.skife.jdbi.v2.Query
类名称:Query
方法名:define

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();

相关文章