| Package | Description |
|---|---|
| com.feedzai.commons.sql.abstraction.ddl |
Contains classes that aid on DDL creation.
|
| com.feedzai.commons.sql.abstraction.dml |
Contains classes to build DML statements.
|
| com.feedzai.commons.sql.abstraction.dml.dialect |
Contains an SQL builder.
|
| com.feedzai.commons.sql.abstraction.engine |
Contains the database engine core.
|
| com.feedzai.commons.sql.abstraction.engine.impl |
Database specific implementations.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AlterColumn
Expression to translate {@code ALTER TABLE...
|
class |
DropPrimaryKey
Translates to a statement that allows to drop the primary key of a table.
|
| Constructor and Description |
|---|
AlterColumn(Expression table,
DbColumn column)
Creates a new instance of
AlterColumn. |
DropPrimaryKey(Expression table)
Creates a new instance of
DropPrimaryKey. |
| Modifier and Type | Class and Description |
|---|---|
class |
All
Translates into * or environment.*.
|
class |
Between
The BETWEEN operator.
|
class |
Coalesce
The Coalesce operator.
|
class |
Delete
The DELETE operator.
|
class |
Function
Represents SQL functions.
|
class |
Join
Represents a SQL join.
|
class |
K
An SQL constant.
|
class |
Literal
A literal to introduce in the SQL statement.
|
class |
Modulo
The MOD operator.
|
class |
Name
An object name.
|
class |
Query
A Query representation.
|
class |
Rename
Expression to rename tables.
|
class |
RepeatDelimiter
Utility to repeat an expression with a certain delimiter.
|
class |
Truncate
The Truncate operator.
|
class |
Update
The UPDATE SQL keyword.
|
class |
View
Represents a SQL view.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
Expression.alias(String alias)
Alias this expression.
|
Expression |
Expression.asc()
Sets ordering to ascendent.
|
Expression |
Expression.desc()
Sets ordering to descendent.
|
Expression |
Expression.enclose()
Enclose this expression with parenthesis.
|
Expression |
Expression.fullOuterJoin(Expression table,
Expression expr)
Sets a full outer join with the current table.
|
Expression |
Expression.innerJoin(Expression table,
Expression expr)
Sets an inner join with the current table.
|
Expression |
Expression.leftOuterJoin(Expression table,
Expression expr)
Sets a left outer join with the current table.
|
Expression |
Expression.rightOuterJoin(Expression table,
Expression expr)
Sets a right outer join with the current table.
|
Expression |
Expression.unquote()
Remove quotes for this expression.
|
Expression |
Expression.withNoLock()
Sets no lock keyword on SQL Server tables.
|
| Modifier and Type | Method and Description |
|---|---|
Query |
Query.andWhere(Expression where)
The where clause.
|
View |
View.as(Expression as)
Sets the as expression.
|
Query |
Query.from(Expression... fromColumns)
The from clause.
|
Expression |
Expression.fullOuterJoin(Expression table,
Expression expr)
Sets a full outer join with the current table.
|
Query |
Query.groupby(Expression... groupbyColumns)
The group by clause.
|
Query |
Query.having(Expression having)
The having clause.
|
Expression |
Expression.innerJoin(Expression table,
Expression expr)
Sets an inner join with the current table.
|
Expression |
Expression.leftOuterJoin(Expression table,
Expression expr)
Sets a left outer join with the current table.
|
Query |
Query.orderby(Expression... orderbyColumns)
The order by clause.
|
Expression |
Expression.rightOuterJoin(Expression table,
Expression expr)
Sets a right outer join with the current table.
|
Query |
Query.select(Expression... selectColumns)
The select clause.
|
Update |
Update.set(Expression... exps)
The set keyword.
|
Update |
Update.where(Expression where)
The where clause.
|
Delete |
Delete.where(Expression where)
Sets the where expression.
|
Query |
Query.where(Expression where)
The where clause.
|
| Modifier and Type | Method and Description |
|---|---|
Query |
Query.from(Collection<? extends Expression> fromColumns)
The from clause.
|
Query |
Query.groupby(Collection<? extends Expression> groupbyColumns)
The group by clause.
|
Query |
Query.orderby(Collection<? extends Expression> orderbyColumns)
The order by clause.
|
Query |
Query.select(Collection<? extends Expression> selectColumns)
The select clause.
|
Update |
Update.set(Collection<? extends Expression> exps)
The set keyword.
|
| Constructor and Description |
|---|
Between(Expression column,
Expression exp)
Creates a new instance of
Between. |
Coalesce(Expression exp,
Expression... alternative)
Creates a new instance of
Coalesce. |
Coalesce(Expression exp,
Expression... alternative)
Creates a new instance of
Coalesce. |
Delete(Expression table)
Creates a new instance of
Delete. |
Function(String function,
Expression exp)
Creates a new instance of
Function. |
Join(String join,
Expression joinTable,
Expression joinExpr)
Creates a new instance of
Join. |
Modulo(Expression dividend,
Expression divisor)
Creates a new instance of
Modulo. |
Rename(Expression oldName,
Expression newName)
Creates a new instance of
Rename. |
RepeatDelimiter(String delimiter,
Expression... dbe)
Creates a new instance of
RepeatDelimiter. |
Truncate(Expression table)
Creates a new instance of
Truncate. |
Update(Expression table)
Creates a new instance of
Update. |
| Constructor and Description |
|---|
RepeatDelimiter(String delimiter,
Collection<? extends Expression> dbe)
Creates a new instance of
RepeatDelimiter. |
| Modifier and Type | Method and Description |
|---|---|
static Expression |
SqlBuilder.all()
Selects all columns in a row.
|
static Expression |
SqlBuilder.all(String tableName)
Selects all columns in a table.
|
static Expression |
SqlBuilder.and(Collection<? extends Expression> exps)
The AND operator.
|
static Expression |
SqlBuilder.and(Expression... exps)
The AND operator.
|
static Expression |
SqlBuilder.avg(Expression exp)
The AVG operator.
|
static Expression |
SqlBuilder.count(Expression exp)
The COUNT operator.
|
static Expression |
SqlBuilder.div(Collection<? extends Expression> exps)
The DIV operator.
|
static Expression |
SqlBuilder.div(Expression... exps)
The DIV operator.
|
static Expression |
SqlBuilder.eq(Collection<? extends Expression> e1)
The equals expression.
|
static Expression |
SqlBuilder.eq(Expression... e1)
The equals expression.
|
static Expression |
SqlBuilder.gt(Collection<? extends Expression> exps)
The GT operator.
|
static Expression |
SqlBuilder.gt(Expression... exps)
The GT operator.
|
static Expression |
SqlBuilder.gteq(Collection<? extends Expression> exps)
The GTEQ operator.
|
static Expression |
SqlBuilder.gteq(Expression... exps)
The GTEQ operator.
|
static Expression |
SqlBuilder.in(Expression e1,
Expression e2)
The IN expression.
|
static Expression |
SqlBuilder.join(Expression e1,
Expression e2)
The same of making eq(e1, e2).
|
static Expression |
SqlBuilder.k(Object o)
A constant.
|
static Expression |
SqlBuilder.L(Collection<? extends Expression> exps)
A list of expression enclosed.
|
static Expression |
SqlBuilder.L(Expression... exps)
A list of expression enclosed.
|
static Expression |
SqlBuilder.like(Collection<? extends Expression> exps)
The LIKE operator.
|
static Expression |
SqlBuilder.like(Expression... exps)
The LIKE operator.
|
static Expression |
SqlBuilder.lt(Collection<? extends Expression> exps)
The LT operator.
|
static Expression |
SqlBuilder.lt(Expression... exps)
The LT operator.
|
static Expression |
SqlBuilder.lteq(Collection<? extends Expression> exps)
The LTEQ operator.
|
static Expression |
SqlBuilder.lteq(Expression... exps)
The LTEQ operator.
|
static Expression |
SqlBuilder.max(Expression exp)
The MAX operator.
|
static Expression |
SqlBuilder.min(Expression exp)
The MIN operator.
|
static Expression |
SqlBuilder.minus(Collection<? extends Expression> exps)
The MINUS operator.
|
static Expression |
SqlBuilder.minus(Expression... exps)
The MINUS operator.
|
static Expression |
SqlBuilder.mod(Expression exp1,
Expression exp2)
The MOD operator.
|
static Expression |
SqlBuilder.mult(Collection<? extends Expression> exps)
The MULT operator.
|
static Expression |
SqlBuilder.mult(Expression... exps)
The MULT operator.
|
static Expression |
SqlBuilder.neq(Collection<? extends Expression> exps)
The not equal expression.
|
static Expression |
SqlBuilder.neq(Expression... exps)
The not equal expression.
|
static Expression |
SqlBuilder.notIn(Expression e1,
Expression e2)
The NOT IN expression.
|
static Expression |
SqlBuilder.or(Collection<? extends Expression> exps)
The OR operator.
|
static Expression |
SqlBuilder.or(Expression... exps)
The OR operator.
|
static Expression |
SqlBuilder.plus(Collection<? extends Expression> exps)
The PLUS operator.
|
static Expression |
SqlBuilder.plus(Expression... exps)
The PLUS operator.
|
static Expression |
SqlBuilder.stddev(Expression exp)
The STDDEV operator.
|
static Expression |
SqlBuilder.sum(Expression exp)
The SUM operator.
|
static Expression |
SqlBuilder.udf(String udf)
The Used Defined Function operator.
|
static Expression |
SqlBuilder.udf(String udf,
Expression exp)
The Used Defined Function operator.
|
| Modifier and Type | Method and Description |
|---|---|
static AlterColumn |
SqlBuilder.alterColumn(Expression table,
DbColumn dbColumn)
Alter column operator.
|
static AlterColumn |
SqlBuilder.alterColumn(Expression table,
Name column,
DbColumnType dbColumnType,
DbColumnConstraint... constraints)
Alter column operator.
|
static Expression |
SqlBuilder.and(Expression... exps)
The AND operator.
|
static Expression |
SqlBuilder.avg(Expression exp)
The AVG operator.
|
static Between |
SqlBuilder.between(Expression exp1,
Expression exp2,
Expression exp3)
The BETWEEN operator.
|
static Coalesce |
SqlBuilder.coalesce(Expression exp,
Expression... alternative)
The coalesce operator.
|
static Coalesce |
SqlBuilder.coalesce(Expression exp,
Expression... alternative)
The coalesce operator.
|
static Expression |
SqlBuilder.count(Expression exp)
The COUNT operator.
|
static Delete |
SqlBuilder.delete(Expression table)
The DELETE keyword.
|
static Expression |
SqlBuilder.div(Expression... exps)
The DIV operator.
|
static DropPrimaryKey |
SqlBuilder.dropPK(Expression table)
Drop primary key table operator.
|
static Expression |
SqlBuilder.eq(Expression... e1)
The equals expression.
|
static Expression |
SqlBuilder.gt(Expression... exps)
The GT operator.
|
static Expression |
SqlBuilder.gteq(Expression... exps)
The GTEQ operator.
|
static Expression |
SqlBuilder.in(Expression e1,
Expression e2)
The IN expression.
|
static Expression |
SqlBuilder.join(Expression e1,
Expression e2)
The same of making eq(e1, e2).
|
static Expression |
SqlBuilder.L(Expression... exps)
A list of expression enclosed.
|
static Expression |
SqlBuilder.like(Expression... exps)
The LIKE operator.
|
static Expression |
SqlBuilder.lt(Expression... exps)
The LT operator.
|
static Expression |
SqlBuilder.lteq(Expression... exps)
The LTEQ operator.
|
static Expression |
SqlBuilder.max(Expression exp)
The MAX operator.
|
static Expression |
SqlBuilder.min(Expression exp)
The MIN operator.
|
static Expression |
SqlBuilder.minus(Expression... exps)
The MINUS operator.
|
static Expression |
SqlBuilder.mod(Expression exp1,
Expression exp2)
The MOD operator.
|
static Expression |
SqlBuilder.mult(Expression... exps)
The MULT operator.
|
static Expression |
SqlBuilder.neq(Expression... exps)
The not equal expression.
|
static Between |
SqlBuilder.notBetween(Expression exp1,
Expression exp2,
Expression exp3)
The NOT BETWEEN operator.
|
static Expression |
SqlBuilder.notIn(Expression e1,
Expression e2)
The NOT IN expression.
|
static Expression |
SqlBuilder.or(Expression... exps)
The OR operator.
|
static Expression |
SqlBuilder.plus(Expression... exps)
The PLUS operator.
|
static Rename |
SqlBuilder.rename(Expression oldName,
Expression newName)
Rename table operator.
|
static Query |
SqlBuilder.select(Expression... select)
Starts a new query.
|
static Expression |
SqlBuilder.stddev(Expression exp)
The STDDEV operator.
|
static Expression |
SqlBuilder.sum(Expression exp)
The SUM operator.
|
static Truncate |
SqlBuilder.truncate(Expression table)
The TRUNCATE keyword.
|
static Expression |
SqlBuilder.udf(String udf,
Expression exp)
The Used Defined Function operator.
|
static Update |
SqlBuilder.update(Expression table)
The UPDATE operator.
|
| Modifier and Type | Method and Description |
|---|---|
static Expression |
SqlBuilder.and(Collection<? extends Expression> exps)
The AND operator.
|
static Expression |
SqlBuilder.div(Collection<? extends Expression> exps)
The DIV operator.
|
static Expression |
SqlBuilder.eq(Collection<? extends Expression> e1)
The equals expression.
|
static Expression |
SqlBuilder.gt(Collection<? extends Expression> exps)
The GT operator.
|
static Expression |
SqlBuilder.gteq(Collection<? extends Expression> exps)
The GTEQ operator.
|
static Expression |
SqlBuilder.L(Collection<? extends Expression> exps)
A list of expression enclosed.
|
static Expression |
SqlBuilder.like(Collection<? extends Expression> exps)
The LIKE operator.
|
static Expression |
SqlBuilder.lt(Collection<? extends Expression> exps)
The LT operator.
|
static Expression |
SqlBuilder.lteq(Collection<? extends Expression> exps)
The LTEQ operator.
|
static Expression |
SqlBuilder.minus(Collection<? extends Expression> exps)
The MINUS operator.
|
static Expression |
SqlBuilder.mult(Collection<? extends Expression> exps)
The MULT operator.
|
static Expression |
SqlBuilder.neq(Collection<? extends Expression> exps)
The not equal expression.
|
static Expression |
SqlBuilder.or(Collection<? extends Expression> exps)
The OR operator.
|
static Expression |
SqlBuilder.plus(Collection<? extends Expression> exps)
The PLUS operator.
|
static Query |
SqlBuilder.select(Collection<? extends Expression> select)
Starts a new query.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DatabaseEngineImpl.createPreparedStatement(String name,
Expression query) |
void |
DatabaseEngine.createPreparedStatement(String name,
Expression query)
Creates a prepared statement.
|
void |
DatabaseEngineImpl.createPreparedStatement(String name,
Expression query,
int timeout) |
void |
DatabaseEngine.createPreparedStatement(String name,
Expression query,
int timeout)
Creates a prepared statement.
|
int |
DatabaseEngineImpl.executeUpdate(Expression query)
Executes the given update.
|
int |
DatabaseEngine.executeUpdate(Expression query)
Executes the given update.
|
Map<String,DbColumnType> |
DatabaseEngineImpl.getQueryMetadata(Expression query)
Gets the query metadata.
|
Map<String,DbColumnType> |
DatabaseEngine.getQueryMetadata(Expression query)
Gets the query metadata.
|
ResultIterator |
DatabaseLocal.iterator(Expression query)
Creates an iterator for the given SQL expression.
|
ResultIterator |
DatabaseEngineImpl.iterator(Expression query) |
List<Map<String,ResultColumn>> |
DatabaseEngineImpl.query(Expression query)
Executes the given query.
|
List<Map<String,ResultColumn>> |
DatabaseEngine.query(Expression query)
Executes the given query.
|
String |
DatabaseEngineImpl.translate(Expression query)
Translates the given expression to the current dialect.
|
String |
DatabaseEngine.translate(Expression query)
Translates the given expression to the current dialect.
|
| Modifier and Type | Method and Description |
|---|---|
int |
SqlServerEngine.executeUpdate(Expression query) |
Copyright © 2013. All Rights Reserved.