org.jdbi.v3.sqlobject.customizer.Define Java Examples
The following examples show how to use
org.jdbi.v3.sqlobject.customizer.Define.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>arena (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #2
Source File: GuildSQLiteProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>guild (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #3
Source File: ChallengeSQLiteProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>challenge (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #4
Source File: ChallengeMySQLProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>challenge (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #5
Source File: ChallengeMariaDBProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>challenge (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #6
Source File: ArenaMySQLProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>arena (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #7
Source File: GuildMariaDBProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>guild (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #8
Source File: CooldownMariaDBProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>cooldowns (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `type` VARCHAR(36) NOT NULL,\n" + " `owner` VARCHAR(36) NOT NULL,\n" + " `expiry` TIMESTAMP NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #9
Source File: CooldownSQLiteProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>cooldowns (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `type` VARCHAR(36) NOT NULL,\n" + " `owner` VARCHAR(36) NOT NULL,\n" + " `expiry` TIMESTAMP NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #10
Source File: CooldownMySQLProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>cooldowns (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `type` VARCHAR(36) NOT NULL,\n" + " `owner` VARCHAR(36) NOT NULL,\n" + " `expiry` TIMESTAMP NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #11
Source File: GuildMySQLProvider.java From Guilds with MIT License | 5 votes |
@Override @SqlUpdate( "CREATE TABLE IF NOT EXISTS <prefix>guild (\n" + " `id` VARCHAR(36) NOT NULL,\n" + " `data` JSON NOT NULL,\n" + " PRIMARY KEY (`id`),\n" + " UNIQUE (`id`));" ) void createContainer(@Define("prefix") @NotNull String prefix);
Example #12
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("UPDATE <prefix>arena SET data = :data WHERE id = :id") void updateArena(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id, @Bind("data") @NotNull String data) throws IOException;
Example #13
Source File: ArenaMySQLProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("UPDATE <prefix>arena SET data = :data WHERE id = :id") void updateArena(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id, @Bind("data") @NotNull String data) throws IOException;
Example #14
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("DELETE FROM <prefix>arena WHERE id = :id") void deleteArena(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id) throws IOException;
Example #15
Source File: CooldownMySQLProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT * FROM <prefix>cooldowns") @RegisterRowMapper(CooldownRowMapper.class) List<Cooldown> getAllCooldowns(@Define("prefix") @NotNull String prefix);
Example #16
Source File: CooldownSQLiteProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT * FROM <prefix>cooldowns") @RegisterRowMapper(CooldownRowMapper.class) List<Cooldown> getAllCooldowns(@Define("prefix") @NotNull String prefix);
Example #17
Source File: ArenaSQLiteProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT EXISTS(SELECT 1 FROM <prefix>arena WHERE id = :id)") boolean arenaExists(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id) throws IOException;
Example #18
Source File: ArenaSQLiteProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT id FROM <prefix>arena") List<String> getAllArenaIds(@Define("prefix") @NotNull String tablePrefix) throws IOException;
Example #19
Source File: CooldownMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("DELETE FROM <prefix>cooldowns WHERE type = :type AND owner = :owner") void deleteCooldown(@Define("prefix") @NotNull String prefix, @NotNull @Bind("type") String type, @NotNull @Bind("owner") String owner) throws IOException;
Example #20
Source File: ArenaMySQLProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("INSERT INTO <prefix>arena(id, data) VALUES (:id, :data)") void createArena(@Define("prefix") @NotNull String prefix, @Bind("id") String id, @Bind("data") String data);
Example #21
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("INSERT INTO <prefix>arena(id, data) VALUES (:id, :data)") void createArena(@Define("prefix") @NotNull String prefix, @Bind("id") String id, @Bind("data") String data);
Example #22
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT * FROM <prefix>arena WHERE id = :id") @RegisterRowMapper(ArenaRowMapper.class) Arena getArena(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id) throws IOException;
Example #23
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT * FROM <prefix>arena") @RegisterRowMapper(ArenaRowMapper.class) List<Arena> getAllArenas(@Define("prefix") @NotNull String prefix);
Example #24
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT id FROM <prefix>arena") List<String> getAllArenaIds(@Define("prefix") @NotNull String tablePrefix) throws IOException;
Example #25
Source File: CooldownMySQLProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("INSERT INTO <prefix>cooldowns(id, type, owner, expiry) VALUES (:id, :type, :owner, :expiry)") void createCooldown(@Define("prefix") @NotNull String prefix, @NotNull @Bind("id") String id, @NotNull @Bind("type") String type, @NotNull @Bind("owner") String owner, @NotNull @Bind("expiry") Timestamp expiry);
Example #26
Source File: ArenaMariaDBProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT EXISTS(SELECT 1 FROM <prefix>arena WHERE id = :id)") boolean arenaExists(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id) throws IOException;
Example #27
Source File: CooldownMySQLProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("DELETE FROM <prefix>cooldowns WHERE type = :type AND owner = :owner") void deleteCooldown(@Define("prefix") @NotNull String prefix, @NotNull @Bind("type") String type, @NotNull @Bind("owner") String owner) throws IOException;
Example #28
Source File: ChallengeSQLiteProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT * FROM <prefix>challenge") @RegisterRowMapper(ChallengeRowMapper.class) List<GuildChallenge> getAllChallenges(@Define("prefix") @NotNull String prefix);
Example #29
Source File: ChallengeSQLiteProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlUpdate("DELETE FROM <prefix>challenge WHERE id = :id") void deleteChallenge(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id) throws IOException;
Example #30
Source File: ArenaSQLiteProvider.java From Guilds with MIT License | 4 votes |
@Override @SqlQuery("SELECT * FROM <prefix>arena WHERE id = :id") @RegisterRowMapper(ArenaRowMapper.class) Arena getArena(@Define("prefix") @NotNull String prefix, @Bind("id") @NotNull String id) throws IOException;