@SqlUpdate("CREATE TABLE IF NOT EXISTS resource_groups_global_properties (\n" + " name VARCHAR(128) NOT NULL PRIMARY KEY,\n" + " value VARCHAR(512) NULL,\n" + " CHECK (name in ('cpu_quota_period'))\n" + ")") void createResourceGroupsGlobalPropertiesTable();
@SqlUpdate("CREATE TABLE IF NOT EXISTS selectors (\n" + " resource_group_id BIGINT NOT NULL,\n" + " priority BIGINT NOT NULL,\n" + " user_regex VARCHAR(512),\n" + " source_regex VARCHAR(512),\n" + " query_type VARCHAR(512),\n" + " client_tags VARCHAR(512),\n" + " selector_resource_estimate VARCHAR(1024),\n" + " FOREIGN KEY (resource_group_id) REFERENCES resource_groups (resource_group_id)\n" + ")") void createSelectorsTable();
@SqlUpdate("CREATE TABLE IF NOT EXISTS exact_match_source_selectors(\n" + " environment VARCHAR(128),\n" + " source VARCHAR(512) NOT NULL,\n" + " query_type VARCHAR(512),\n" + " update_time DATETIME NOT NULL,\n" + " resource_group_id VARCHAR(256) NOT NULL,\n" + " PRIMARY KEY (environment, source, query_type),\n" + " UNIQUE (source, environment, query_type, resource_group_id)\n" + ")") void createExactMatchSelectorsTable();
@SqlUpdate("CREATE TABLE IF NOT EXISTS resource_groups (\n" + " resource_group_id BIGINT NOT NULL AUTO_INCREMENT,\n" + " name VARCHAR(250) NOT NULL,\n" + " soft_memory_limit VARCHAR(128) NOT NULL,\n" + " max_queued INT NOT NULL,\n" + " soft_concurrency_limit INT NULL,\n" + " hard_concurrency_limit INT NOT NULL,\n" + " scheduling_policy VARCHAR(128) NULL,\n" + " scheduling_weight INT NULL,\n" + " jmx_export BOOLEAN NULL,\n" + " soft_cpu_limit VARCHAR(128) NULL,\n" + " hard_cpu_limit VARCHAR(128) NULL,\n" + " parent BIGINT NULL,\n" + " environment VARCHAR(128) NULL,\n" + " PRIMARY KEY (resource_group_id),\n" + " FOREIGN KEY (parent) REFERENCES resource_groups (resource_group_id)\n" + ")") void createResourceGroupsTable();
@SqlUpdate("DROP TABLE selectors") void dropSelectorsTable(); }
@Override @SqlUpdate("INSERT INTO uniq (id) VALUES(:value)") void insert(Integer value); }
@SqlUpdate(I_INSERT) void insertIntList(List<Integer> ints); }
@SqlUpdate void delete(ID id); }
@SqlUpdate("insert into something(something_id,name,code) values (19, :name, ?)") void insertWithMixedPositionalAndNamedParams(String name, int code); }
@SqlUpdate("DELETE FROM resource_groups WHERE resource_group_id = :resource_group_id") void deleteResourceGroup(@Bind("resource_group_id") long resourceGroupId);
@SqlUpdate("UPDATE resource_groups_global_properties SET name = :name") void updateResourceGroupsGlobalProperties(@Bind("name") String name);
@SqlUpdate("DELETE FROM selectors WHERE resource_group_id = :resource_group_id") void deleteSelectors(@Bind("resource_group_id") long resourceGroup);
@SqlUpdate("delete from something where id = id") void deleteSomething(@Bind("id") int id); }
@Override @SqlUpdate("insert into something (id, name) values (:id, :name)") void insert(@BindBean Something something);
@SqlQuery @SqlUpdate void bogus(); }
@SqlUpdate("INSERT INTO USERS (name) VALUES (:name)") @Transaction(TransactionIsolationLevel.READ_COMMITTED) void insertUser(String name); // end::sqlObjectTransactionIsolation[]
@SqlUpdate("insert into serialized_types (string_value) values (?)") @RegisterObjectArgumentFactory(StringValue.class) void insertStringValue(StringValue value);
@SqlUpdate("insert into something (id, name) values (:id, :name)") int insert(@BindBean Something something); }
@SqlUpdate("INSERT INTO resource_groups_global_properties\n" + "(name, value) VALUES (:name, :value)") void insertResourceGroupsGlobalProperties( @Bind("name") String name, @Bind("value") String value);
@GetGeneratedKeys @SqlUpdate("insert into bind_local_date_test(date_column) values (:date)") long insert(@Bind("date") LocalDate date); }