public abstract class AbstractTranslator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.google.inject.Injector |
injector
The Guice injector.
|
protected PdbProperties |
properties
The properties in place.
|
| Constructor and Description |
|---|
AbstractTranslator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
inject(Collection<? extends Expression> objs)
Injects dependencies on the given objects.
|
protected void |
inject(Expression... objs)
Injects dependencies on the given objects.
|
protected String |
join(Collection<?> list,
String delimiter)
Joins a collection of objects given the delimiter.
|
protected Union |
rowsToUnion(List<Expression> rows)
Transform values' rows into a union.
|
abstract String |
translate(AlterColumn ac)
Translates
Name. |
String |
translate(Between b)
Translates
Between. |
String |
translate(Case aCase)
Translates Case.
|
abstract String |
translate(Cast cast)
Translates Cast.
|
String |
translate(Coalesce c)
Translates
Coalesce. |
String |
translate(Concat concat)
Transform the concat keyword.
|
abstract String |
translate(DbColumn dc)
Translates
DbColumn. |
String |
translate(Delete d)
Translates
Delete. |
abstract String |
translate(DropPrimaryKey dpk)
Translates
DropPrimaryKey. |
abstract String |
translate(Function f)
Translates
Function. |
String |
translate(Join j)
Translates
Join. |
String |
translate(K k)
Translates
K. |
String |
translate(Literal l)
Translates
Literal. |
String |
translate(Modulo m)
Translates
Modulo. |
String |
translate(Name n)
Translates
Name. |
abstract String |
translate(Query q)
Translates
Query. |
abstract String |
translate(Rename r)
Translates
Rename. |
abstract String |
translate(RepeatDelimiter rd)
Translates
RepeatDelimiter. |
abstract String |
translate(StringAgg stringAgg)
Translates
StringAgg. |
String |
translate(SubString subString)
Translates
SubString SQL function. |
String |
translate(Truncate t)
Translates
Truncate. |
String |
translate(Union union)
Translates
Union. |
String |
translate(Update u)
Translates
Update. |
String |
translate(Values.Row row)
Translates Values.Row.
|
String |
translate(Values values)
Translates Values.
|
abstract String |
translate(View v)
Translates
View. |
String |
translate(When when)
Translates When.
|
String |
translate(With with) |
abstract String |
translateEscape()
Translates the escape character.
|
abstract String |
translateFalse()
Translates the boolean false.
|
abstract String |
translateTrue()
Translates the boolean true.
|
protected String |
translateUpdate(Update update)
Translates
Update. |
protected String |
translateUpdateFrom(Update update)
Translates
Update considering the FROM clause. |
protected String |
translateUpdateSetClause(Update update)
Translates
Update SET clause. |
@Inject protected PdbProperties properties
@Inject protected com.google.inject.Injector injector
protected void inject(Expression... objs)
objs - The objects to be injected.protected void inject(Collection<? extends Expression> objs)
objs - The objects to be injected.protected String join(Collection<?> list, String delimiter)
list - The collection of objects to join.delimiter - The delimiter.public String translate(Name n)
Name.n - The object to translate.public String translate(Between b)
Between.b - The object to translate.public String translate(Coalesce c)
Coalesce.c - The object to translate.public String translate(Delete d)
Delete.d - The object to translate.public String translate(Join j)
Join.j - The object to translate.public String translate(K k)
K.k - The object to translate.public String translate(Literal l)
Literal.l - The object to translate.public String translate(Truncate t)
Truncate.t - The object to translate.public String translate(Update u)
Update.u - The object to translate.protected String translateUpdate(Update update)
Update.update - The update to translate.protected String translateUpdateFrom(Update update)
Update considering the FROM clause.update - The update to translate.protected String translateUpdateSetClause(Update update)
Update SET clause.update - The update to translate.public String translate(When when)
when - a when.public String translate(Case aCase)
aCase - a case.public abstract String translate(Cast cast)
cast - a cast expression.public String translate(Union union)
Union.union - a union.public String translate(Values values)
values - a values.public String translate(Values.Row row)
row - a values.row.protected Union rowsToUnion(List<Expression> rows)
rows - the values' rowspublic String translate(Concat concat)
concat - the concat.public abstract String translateEscape()
public abstract String translateTrue()
public abstract String translateFalse()
public abstract String translate(AlterColumn ac)
Name.ac - The object to translate.public abstract String translate(DropPrimaryKey dpk)
DropPrimaryKey.dpk - The object to translate.public abstract String translate(Function f)
Function.f - The object to translate.public String translate(Modulo m)
Modulo.m - The object to translate.public abstract String translate(Rename r)
Rename.r - The object to translate.public abstract String translate(RepeatDelimiter rd)
RepeatDelimiter.rd - The object to translate.public abstract String translate(Query q)
Query.q - The object to translate.public abstract String translate(View v)
View.v - The object to translate.public abstract String translate(DbColumn dc)
DbColumn.dc - The object to translate.public abstract String translate(StringAgg stringAgg)
StringAgg.stringAgg - The object to translate.Copyright © 2023 Feedzai. All rights reserved.