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.
|
class |
Rename
Expression to rename tables.
|
Modifier and Type | Method and Description |
---|---|
Expression |
Rename.getNewName()
Gets the new name.
|
Expression |
Rename.getOldName()
Gets the old name.
|
Expression |
DropPrimaryKey.getTable()
Gets the table expression.
|
Expression |
AlterColumn.getTable()
Gets the table expression.
|
Constructor and Description |
---|
AlterColumn(Expression table,
DbColumn column)
Creates a new instance of
AlterColumn . |
DropPrimaryKey(Expression table)
Creates a new instance of
DropPrimaryKey . |
Rename(Expression oldName,
Expression newName)
Creates a new instance of
Rename . |
Modifier and Type | Class and Description |
---|---|
class |
All
Represents the * or environment.* operator.
|
class |
Between
Represents the BETWEEN operator.
|
class |
Coalesce
Represents the coalesce operator.
|
class |
Delete
Represents the DELETE operator.
|
class |
Function
Represents SQL functions.
|
class |
InternalFunction
Represents functions that are internal to the database engine in place.
|
class |
Join
Represents a SQL join operator.
|
class |
K
Represents a SQL constant.
|
class |
Literal
Represents a literal object that will have no specific translation.
|
class |
Modulo
The MOD operator.
|
class |
Name
Represents a named expression.
|
class |
Query
Represents a SQL Query.
|
class |
RepeatDelimiter
Represents expressions that ca be repeated.
|
class |
Truncate
Represents the TRUNCATE operator.
|
class |
Update
Represents the UPDATE operator.
|
class |
View
Represents a SQL view.
|
Modifier and Type | Method and Description |
---|---|
Expression |
Expression.alias(String alias)
Aliases this expression.
|
Expression |
Expression.asc()
Sets ordering to ascendant.
|
Expression |
Expression.desc()
Sets ordering to descendant.
|
Expression |
Expression.enclose()
Encloses this expression with parenthesis.
|
Expression |
Expression.fullOuterJoin(Expression table,
Expression expr)
Sets a full outer join with the current table.
|
Expression[] |
Coalesce.getAlternative()
Gets the alternative expressions.
|
Expression |
Between.getAnd()
Gets the AND expression.
|
Expression |
View.getAs()
Gets the AS expression.
|
Expression |
Between.getColumn()
Gets the column in the expression.
|
Expression |
Modulo.getDividend()
Gets the dividend.
|
Expression |
Modulo.getDivisor()
Gets the divisor.
|
Expression |
Function.getExp()
Gets the expression in the function.
|
Expression |
Coalesce.getExp()
Gets the expression to test.
|
Expression |
Query.getHaving()
Gets the HAVING expression.
|
Expression |
Join.getJoinExpr()
Gets the join expression.
|
Expression |
Join.getJoinTable()
Gets the join table.
|
Expression |
Update.getTable()
Gets the table.
|
Expression |
Truncate.getTable()
Gets the table to truncate.
|
Expression |
Delete.getTable()
Gets the TABLE expression.
|
Expression |
Query.getWhere()
Gets the WHERE expression.
|
Expression |
Update.getWhere()
Gets the WHERE expression.
|
Expression |
Delete.getWhere()
Gets the WHERE expression.
|
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()
Removes the quotes for this expression.
|
Expression |
Expression.withNoLock()
Sets no lock keyword on SQL Server tables.
|
Modifier and Type | Method and Description |
---|---|
List<Expression> |
Update.getColumns()
Gets the columns.
|
List<Expression> |
RepeatDelimiter.getExpressions()
Gets the expressions.
|
List<Expression> |
Query.getFromColumns()
Gets the FROM columns.
|
List<Expression> |
Query.getGroupbyColumns()
Gets the GROUP BY expressions.
|
List<Expression> |
Query.getOrderbyColumns()
Gets the ORDER BY expressions.
|
List<Expression> |
Query.getSelectColumns()
Gets the SELECT columns.
|
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)
Adds the FROM columns.
|
Expression |
Expression.fullOuterJoin(Expression table,
Expression expr)
Sets a full outer join with the current table.
|
Query |
Query.groupby(Expression... groupbyColumns)
Adds the GROUP BY columns.
|
Query |
Query.having(Expression having)
Adds the HAVING expression.
|
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)
Adds the ORDER BY columns.
|
Expression |
Expression.rightOuterJoin(Expression table,
Expression expr)
Sets a right outer join with the current table.
|
Query |
Query.select(Expression... selectColumns)
Adds the SELECT columns.
|
Update |
Update.set(Expression... exps)
The set keyword.
|
Query |
Query.where(Expression where)
The where clause.
|
Update |
Update.where(Expression where)
Adds the WHERE expression.
|
Delete |
Delete.where(Expression where)
Sets the where expression.
|
Modifier and Type | Method and Description |
---|---|
Query |
Query.from(Collection<? extends Expression> fromColumns)
Adds the FROM columns.
|
Query |
Query.groupby(Collection<? extends Expression> groupbyColumns)
Adds the GROUP BY columns.
|
Query |
Query.orderby(Collection<? extends Expression> orderbyColumns)
Adds the ORDER BY columns.
|
Query |
Query.select(Collection<? extends Expression> selectColumns)
Adds the SELECT columns.
|
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 . |
InternalFunction(String function,
Expression exp)
Creates a new instance of
InternalFunction . |
Join(String join,
Expression joinTable,
Expression joinExpr)
Creates a new instance of
Join . |
Modulo(Expression dividend,
Expression divisor)
Creates a new instance of
Modulo . |
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.f(String function)
An internal function (provided by the engine in place).
|
static Expression |
SqlBuilder.f(String function,
Expression exp)
An internal function (provided by the engine in place).
|
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 expressions enclosed.
|
static Expression |
SqlBuilder.like(Collection<? extends Expression> exps)
The LIKE operator.
|
static Expression |
SqlBuilder.like(Expression... exps)
The LIKE operator.
|
static Expression |
SqlBuilder.lower(Expression exp)
The LOWER 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.
|
static Expression |
SqlBuilder.upper(Expression exp)
The UPPER 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.f(String function,
Expression exp)
An internal function (provided by the engine in place).
|
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 expressions enclosed.
|
static Expression |
SqlBuilder.like(Expression... exps)
The LIKE operator.
|
static Expression |
SqlBuilder.lower(Expression exp)
The LOWER 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.
|
static Expression |
SqlBuilder.upper(Expression exp)
The UPPER 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 |
DatabaseEngine.createPreparedStatement(String name,
Expression query)
Creates a prepared statement.
|
void |
AbstractDatabaseEngine.createPreparedStatement(String name,
Expression query) |
void |
DatabaseEngine.createPreparedStatement(String name,
Expression query,
int timeout)
Creates a prepared statement.
|
void |
AbstractDatabaseEngine.createPreparedStatement(String name,
Expression query,
int timeout) |
int |
DatabaseEngine.executeUpdate(Expression query)
Executes the given update.
|
int |
AbstractDatabaseEngine.executeUpdate(Expression query)
Executes the given update.
|
Map<String,DbColumnType> |
DatabaseEngine.getQueryMetadata(Expression query)
Gets the query metadata.
|
Map<String,DbColumnType> |
AbstractDatabaseEngine.getQueryMetadata(Expression query)
Gets the query metadata.
|
protected void |
AbstractTranslator.inject(Expression... objs)
Injects dependencies on the given objects.
|
protected void |
AbstractDatabaseEngine.inject(Expression... objs) |
ResultIterator |
DatabaseEngine.iterator(Expression query)
Creates an iterator for the given SQL expression.
|
ResultIterator |
AbstractDatabaseEngine.iterator(Expression query) |
List<Map<String,ResultColumn>> |
DatabaseEngine.query(Expression query)
Executes the given query.
|
List<Map<String,ResultColumn>> |
AbstractDatabaseEngine.query(Expression query)
Executes the given query.
|
String |
DatabaseEngine.translate(Expression query)
Translates the given expression to the current dialect.
|
String |
AbstractDatabaseEngine.translate(Expression query)
Translates the given expression to the current dialect.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractTranslator.inject(Collection<? extends Expression> objs)
Injects dependencies on the given objects.
|
Modifier and Type | Method and Description |
---|---|
int |
SqlServerEngine.executeUpdate(Expression query) |
Copyright © 2014 Feedzai. All Rights Reserved.