public class SQLSerializer extends SerializerBase<SQLSerializer>
SqlSerializer
serializes SQL clauses into SQLModifier and Type | Class and Description |
---|---|
protected static class |
SQLSerializer.Stage |
Modifier and Type | Field and Description |
---|---|
protected SQLSerializer.Stage |
stage |
Constructor and Description |
---|
SQLSerializer(Configuration conf) |
SQLSerializer(Configuration conf,
boolean dml) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendAsColumnName(Path<?> path,
boolean precededByDot) |
protected void |
appendSchemaName(String schema) |
protected void |
appendTableName(String table,
boolean precededByDot) |
List<Path<?>> |
getConstantPaths() |
List<Object> |
getConstants() |
protected SQLTemplates |
getTemplates() |
void |
handle(String template,
Object... args) |
protected void |
handleJoinTarget(JoinExpression je) |
protected void |
handleOrderBy(List<OrderSpecifier<?>> orderBy) |
void |
serialize(QueryMetadata metadata,
boolean forCountRow) |
void |
serializeDelete(QueryMetadata metadata,
RelationalPath<?> entity) |
void |
serializeInsert(QueryMetadata metadata,
RelationalPath<?> entity,
List<Path<?>> columns,
List<Expression<?>> values,
SubQueryExpression<?> subQuery) |
void |
serializeMerge(QueryMetadata metadata,
RelationalPath<?> entity,
List<Path<?>> keys,
List<Path<?>> columns,
List<Expression<?>> values,
SubQueryExpression<?> subQuery) |
void |
serializeUnion(Expression<?> union,
QueryMetadata metadata,
boolean unionAll) |
void |
serializeUpdate(QueryMetadata metadata,
RelationalPath<?> entity,
Map<Path<?>,Expression<?>> updates) |
protected void |
setDmlWithSchema(boolean b) |
protected void |
setSkipParent(boolean b) |
void |
setUseLiterals(boolean useLiterals) |
Void |
visit(ParamExpression<?> param,
Void context)
Visit a ParamExpression instance with the given context
|
Void |
visit(Path<?> path,
Void context)
Visit a Path instance with the given context
|
Void |
visit(SubQueryExpression<?> query,
Void context)
Visit a SubQueryExpression instance with the given context
|
Void |
visit(TemplateExpression<?> expr,
Void context)
Visit a TemplateExpression instance with the given context
|
void |
visitConstant(Object constant) |
protected void |
visitOperation(Class<?> type,
Operator operator,
List<? extends Expression<?>> args) |
append, getConstantPrefix, getConstantToLabel, getLength, getTemplate, handle, handle, handle, handle, handle, handleTemplate, insert, prepend, serialize, serialize, setAnonParamPrefix, setConstantPrefix, setNormalize, setParamPrefix, setStrict, toString, visit, visit, visit
protected SQLSerializer.Stage stage
public SQLSerializer(Configuration conf)
public SQLSerializer(Configuration conf, boolean dml)
protected void appendAsColumnName(Path<?> path, boolean precededByDot)
protected void appendSchemaName(String schema)
protected void appendTableName(String table, boolean precededByDot)
protected SQLTemplates getTemplates()
protected void handleJoinTarget(JoinExpression je)
public void serialize(QueryMetadata metadata, boolean forCountRow)
protected void handleOrderBy(List<OrderSpecifier<?>> orderBy)
public void serializeDelete(QueryMetadata metadata, RelationalPath<?> entity)
public void serializeMerge(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values, @Nullable SubQueryExpression<?> subQuery)
public void serializeInsert(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> columns, List<Expression<?>> values, @Nullable SubQueryExpression<?> subQuery)
public void serializeUpdate(QueryMetadata metadata, RelationalPath<?> entity, Map<Path<?>,Expression<?>> updates)
public void serializeUnion(Expression<?> union, QueryMetadata metadata, boolean unionAll)
public void visitConstant(Object constant)
visitConstant
in class SerializerBase<SQLSerializer>
public Void visit(ParamExpression<?> param, Void context)
Visitor
visit
in interface Visitor<Void,Void>
visit
in class SerializerBase<SQLSerializer>
param
- expression to visitcontext
- context of the visit or null, if not usedpublic Void visit(Path<?> path, Void context)
Visitor
visit
in interface Visitor<Void,Void>
visit
in class SerializerBase<SQLSerializer>
path
- expression to visitcontext
- context of the visit or null, if not usedpublic Void visit(SubQueryExpression<?> query, Void context)
Visitor
query
- expression to visitcontext
- context of the visit or null, if not usedpublic Void visit(TemplateExpression<?> expr, Void context)
Visitor
visit
in interface Visitor<Void,Void>
visit
in class SerializerBase<SQLSerializer>
expr
- expression to visitcontext
- context of the visit or null, if not usedprotected void visitOperation(Class<?> type, Operator operator, List<? extends Expression<?>> args)
visitOperation
in class SerializerBase<SQLSerializer>
public void setUseLiterals(boolean useLiterals)
protected void setSkipParent(boolean b)
protected void setDmlWithSchema(boolean b)
Copyright © 2007–2015 Mysema Ltd. All rights reserved.