org.jdbi.v3.sqlobject.customizer.Bind类的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(120)

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

Bind介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

/**
   * Returns the most specific exact-match selector for a given environment, source and query type.
   * NULL values in the environment and query type fields signify wildcards.
   */
  @SqlQuery("SELECT resource_group_id\n" +
      "FROM exact_match_source_selectors\n" +
      "WHERE source = :source\n" +
      "  AND (environment = :environment OR environment IS NULL)\n" +
      "  AND (query_type = :query_type OR query_type IS NULL)\n" +
      "ORDER BY environment IS NULL, query_type IS NULL\n" +
      "LIMIT 1")
  String getExactMatchResourceGroup(
      @Bind("environment") String environment,
      @Bind("source") String source,
      @Bind("query_type") String queryType);
}

代码示例来源:origin: prestodb/presto

@SqlUpdate("INSERT INTO selectors\n" +
    "(resource_group_id, priority, user_regex, source_regex, query_type, client_tags, selector_resource_estimate)\n" +
    "VALUES (:resource_group_id, :priority, :user_regex, :source_regex, :query_type, :client_tags, :selector_resource_estimate)")
void insertSelector(
    @Bind("resource_group_id") long resourceGroupId,
    @Bind("priority") long priority,
    @Bind("user_regex") String userRegex,
    @Bind("source_regex") String sourceRegex,
    @Bind("query_type") String queryType,
    @Bind("client_tags") String clientTags,
    @Bind("selector_resource_estimate") String selectorResourceEstimate);

代码示例来源:origin: prestodb/presto

@SqlUpdate("INSERT INTO exact_match_source_selectors (environment, source, query_type, update_time, resource_group_id)\n" +
    "VALUES (:environment, :source, :query_type, now(), :resourceGroupId)\n")
void insertExactMatchSelector(
    @Bind("environment") String environment,
    @Bind("source") String source,
    @Bind("query_type") String queryType,
    @Bind("resourceGroupId") String resourceGroupId);

代码示例来源:origin: prestodb/presto

@SqlUpdate("DELETE FROM selectors WHERE resource_group_id = :resource_group_id\n" +
    " AND ((user_regex IS NULL AND :user_regex IS NULL) OR user_regex = :user_regex)\n" +
    " AND ((source_regex IS NULL AND :source_regex IS NULL) OR source_regex = :source_regex)\n" +
    " AND ((client_tags IS NULL AND :client_tags IS NULL) OR client_tags = :client_tags)")
void deleteSelector(
    @Bind("resource_group_id") long resourceGroupId,
    @Bind("user_regex") String userRegex,
    @Bind("source_regex") String sourceRegex,
    @Bind("client_tags") String clientTags);

代码示例来源:origin: prestodb/presto

@SqlUpdate("INSERT INTO resource_groups\n" +
    "(resource_group_id, name, soft_memory_limit, max_queued, soft_concurrency_limit, hard_concurrency_limit, scheduling_policy, scheduling_weight, jmx_export, soft_cpu_limit, hard_cpu_limit, parent, environment)\n" +
    "VALUES (:resource_group_id, :name, :soft_memory_limit, :max_queued, :soft_concurrency_limit, :hard_concurrency_limit, :scheduling_policy, :scheduling_weight, :jmx_export, :soft_cpu_limit, :hard_cpu_limit, :parent, :environment)")
void insertResourceGroup(
    @Bind("resource_group_id") long resourceGroupId,
    @Bind("name") String name,
    @Bind("soft_memory_limit") String softMemoryLimit,
    @Bind("max_queued") int maxQueued,
    @Bind("soft_concurrency_limit") Integer softConcurrencyLimit,
    @Bind("hard_concurrency_limit") int hardConcurrencyLimit,
    @Bind("scheduling_policy") String schedulingPolicy,
    @Bind("scheduling_weight") Integer schedulingWeight,
    @Bind("jmx_export") Boolean jmxExport,
    @Bind("soft_cpu_limit") String softCpuLimit,
    @Bind("hard_cpu_limit") String hardCpuLimit,
    @Bind("parent") Long parent,
    @Bind("environment") String environment);

代码示例来源:origin: prestodb/presto

@SqlUpdate("UPDATE selectors SET\n" +
    " resource_group_id = :resource_group_id\n" +
    ", user_regex = :user_regex\n" +
    ", source_regex = :source_regex\n" +
    ", client_tags = :client_tags\n" +
    "WHERE resource_group_id = :resource_group_id\n" +
    " AND ((user_regex IS NULL AND :old_user_regex IS NULL) OR user_regex = :old_user_regex)\n" +
    " AND ((source_regex IS NULL AND :old_source_regex IS NULL) OR source_regex = :old_source_regex)\n" +
    " AND ((client_tags IS NULL AND :old_client_tags IS NULL) OR client_tags = :old_client_tags)")
void updateSelector(
    @Bind("resource_group_id") long resourceGroupId,
    @Bind("user_regex") String newUserRegex,
    @Bind("source_regex") String newSourceRegex,
    @Bind("client_tags") String newClientTags,
    @Bind("old_user_regex") String oldUserRegex,
    @Bind("old_source_regex") String oldSourceRegex,
    @Bind("old_client_tags") String oldClientTags);

代码示例来源:origin: prestodb/presto

@SqlQuery("" +
      "SELECT\n" +
      "  suite\n" +
      ", name\n" +
      ", test_catalog\n" +
      ", test_schema\n" +
      ", test_prequeries\n" +
      ", test_query\n" +
      ", test_postqueries\n" +
      ", test_username\n" +
      ", test_password\n" +
      ", control_catalog\n" +
      ", control_schema\n" +
      ", control_prequeries\n" +
      ", control_query\n" +
      ", control_postqueries\n" +
      ", control_username\n" +
      ", control_password\n" +
      ", session_properties_json\n" +
      "FROM verifier_queries\n" +
      "WHERE suite = :suite\n" +
      "ORDER BY id\n" +
      "LIMIT :limit")
  @UseRowMapper(QueryPairMapper.class)
  List<QueryPair> getQueriesBySuite(@Bind("suite") String suite, @Bind("limit") int limit);
}

代码示例来源:origin: jdbi/jdbi

default String broken(@Bind int wat) {
    return "foo";
  }
}

代码示例来源:origin: prestodb/presto

@SqlUpdate("INSERT INTO resource_groups_global_properties\n" +
    "(name, value) VALUES (:name, :value)")
void insertResourceGroupsGlobalProperties(
    @Bind("name") String name,
    @Bind("value") String value);

代码示例来源:origin: prestodb/presto

@SqlQuery("SELECT S.resource_group_id, S.priority, S.user_regex, S.source_regex, S.query_type, S.client_tags, S.selector_resource_estimate\n" +
    "FROM selectors S\n" +
    "JOIN resource_groups R ON (S.resource_group_id = R.resource_group_id)\n" +
    "WHERE R.environment = :environment\n" +
    "ORDER by priority DESC")
@UseRowMapper(SelectorRecord.Mapper.class)
List<SelectorRecord> getSelectors(@Bind("environment") String environment);

代码示例来源:origin: prestodb/presto

@SqlQuery("SELECT resource_group_id, name, soft_memory_limit, max_queued, soft_concurrency_limit, " +
    "  hard_concurrency_limit, scheduling_policy, scheduling_weight, jmx_export, soft_cpu_limit, " +
    "  hard_cpu_limit, parent\n" +
    "FROM resource_groups\n" +
    "WHERE environment = :environment\n")
@UseRowMapper(ResourceGroupSpecBuilder.Mapper.class)
List<ResourceGroupSpecBuilder> getResourceGroups(@Bind("environment") String environment);

代码示例来源:origin: prestodb/presto

@SqlUpdate("UPDATE resource_groups SET\n" +
    " resource_group_id = :resource_group_id\n" +
    ", name = :name\n" +
    ", soft_memory_limit = :soft_memory_limit\n" +
    ", max_queued = :max_queued\n" +
    ", soft_concurrency_limit = :soft_concurrency_limit\n" +
    ", hard_concurrency_limit = :hard_concurrency_limit\n" +
    ", scheduling_policy = :scheduling_policy\n" +
    ", scheduling_weight = :scheduling_weight\n" +
    ", jmx_export = :jmx_export\n" +
    ", soft_cpu_limit = :soft_cpu_limit\n" +
    ", hard_cpu_limit = :hard_cpu_limit\n" +
    ", parent = :parent\n" +
    ", environment = :environment\n" +
    "WHERE resource_group_id = :resource_group_id")
void updateResourceGroup(
    @Bind("resource_group_id") long resourceGroupId,
    @Bind("name") String resourceGroup,
    @Bind("soft_memory_limit") String softMemoryLimit,
    @Bind("max_queued") int maxQueued,
    @Bind("soft_concurrency_limit") Integer softConcurrencyLimit,
    @Bind("hard_concurrency_limit") int hardConcurrencyLimit,
    @Bind("scheduling_policy") String schedulingPolicy,
    @Bind("scheduling_weight") Integer schedulingWeight,
    @Bind("jmx_export") Boolean jmxExport,
    @Bind("soft_cpu_limit") String softCpuLimit,
    @Bind("hard_cpu_limit") String hardCpuLimit,
    @Bind("parent") Long parent,
    @Bind("environment") String environment);

代码示例来源:origin: jdbi/jdbi

@SqlBatch("insert into something (id, name) values (:id, :first || ' ' || :last)")
void insertFamily(@Bind("id") List<Integer> ids,
         @Bind("first") Iterator<String> firstNames,
         @Bind("last") String lastName);

代码示例来源:origin: prestodb/presto

@SqlUpdate("DELETE FROM resource_groups WHERE resource_group_id = :resource_group_id")
void deleteResourceGroup(@Bind("resource_group_id") long resourceGroupId);

代码示例来源:origin: jdbi/jdbi

@SqlQuery("select id, name from something where id = :id and :int + 1 > 0")
  @Override
  List<Topping<String>> getToppings(@Bind("id") int id, @Bind("int") Integer restrictions);
}

代码示例来源:origin: jdbi/jdbi

@SqlUpdate("insert into something (id, name) VALUES (:id, :name)")
  void insert(@Bind("id") int id, @Bind("name") String name);
}

代码示例来源:origin: jdbi/jdbi

@SqlUpdate("insert into something (id, name) values (:id, :name)")
  void insertWithVoidReturn(@Bind("id") long id, @Bind("name") String name);
}

代码示例来源:origin: jdbi/jdbi

@SqlQuery("select id, name from something where id = :id and char_length(:str) > 5")
  @Override
  List<Topping<String>> getToppings(@Bind("id") int id, @Bind("str") String restrictions);
}

代码示例来源:origin: prestodb/presto

@SqlUpdate("UPDATE resource_groups_global_properties SET name = :name")
void updateResourceGroupsGlobalProperties(@Bind("name") String name);

代码示例来源:origin: jdbi/jdbi

@SqlUpdate("insert into something (id, name) values (:id, :name)")
void insert(@Bind("id") int id, @Bind("name") String name);

相关文章