public final class Query extends Object
| Constructor and Description |
|---|
Query() |
| Modifier and Type | Method and Description |
|---|---|
static CreateTable |
createTable(@NonNull String tableName) |
static CreateTable |
createTable(@NonNull String database,
@NonNull String tableName) |
static Delete |
deleteFrom(@NonNull String tableName) |
static Delete |
deleteFrom(@NonNull String database,
@NonNull String tableName) |
static Insert |
insertInto(@NonNull String tableName) |
static Insert |
insertInto(@NonNull String database,
@NonNull String tableName) |
static AbstractQuery |
of(@NonNull String sql,
Object... params)
Creates a raw query from arbitrary SQL text.
|
static Select |
select(String... columns) |
static Update |
update(@NonNull String tableName) |
static Update |
update(@NonNull String database,
@NonNull String tableName) |
public static CreateTable createTable(@NonNull @NonNull String tableName)
tableName - Name of the table to be created.CREATE TABLE query.public static Insert insertInto(@NonNull @NonNull String tableName)
tableName - Name of the table to be updated.INSERT query.public static Update update(@NonNull @NonNull String tableName)
tableName - Name of the table to be updated.UPDATE query.public static Delete deleteFrom(@NonNull @NonNull String tableName)
tableName - Name of the table to be updated.DELETE query.public static Select select(@NonNull String... columns)
columns - Names of the columns to select. If empty, caller then must
specify selected columns or expressions itself.SELECT query.public static CreateTable createTable(@NonNull @NonNull String database, @NonNull @NonNull String tableName)
database - Name of the database containing the table.tableName - Name of the table to be created.CREATE TABLE query.public static Insert insertInto(@NonNull @NonNull String database, @NonNull @NonNull String tableName)
database - Name of the database containing the table.tableName - Name of the table to be updated.INSERT query.public static Update update(@NonNull @NonNull String database, @NonNull @NonNull String tableName)
database - Name of the database containing the table.tableName - Name of the table to be updated.UPDATE query.public static Delete deleteFrom(@NonNull @NonNull String database, @NonNull @NonNull String tableName)
database - Name of the database containing the table.tableName - Name of the table to be updated.DELETE query.public static AbstractQuery of(@NonNull @NonNull String sql, @NonNull Object... params)
sql - SQL query.params - Parameters (for filling in ? placeholders).Copyright © 2021. All rights reserved.