Package org.apache.cayenne.dba.firebird
Class FirebirdQualifierTranslator
java.lang.Object
org.apache.cayenne.access.translator.select.QueryAssemblerHelper
org.apache.cayenne.access.translator.select.QualifierTranslator
org.apache.cayenne.dba.firebird.FirebirdQualifierTranslator
- All Implemented Interfaces:
TraversalHandler
public class FirebirdQualifierTranslator extends QualifierTranslator
-
Field Summary
Fields inherited from class org.apache.cayenne.access.translator.select.QualifierTranslator
caseInsensitive, matchingObject, objectMatchTranslator, qualifier, useAliasForExpressions, waitingForEndNodeFields inherited from class org.apache.cayenne.access.translator.select.QueryAssemblerHelper
out, queryAssembler, strategy -
Constructor Summary
Constructors Constructor Description FirebirdQualifierTranslator(QueryAssembler queryAssembler) -
Method Summary
Modifier and Type Method Description protected voidappendExtractFunction(ASTExtract functionExpression)Special case for extract date/time parts functions as they have many variantsprotected voidappendFunction(ASTFunctionCall functionExpression)Append function name to result SQL Override this method to rename or skip function if generic name isn't supported on target DB.protected voidappendFunctionArg(Object value, ASTFunctionCall functionExpression)A little bit ugly code that wraps String scalars to CAST(? AS VARCHAR(length)) because otherwise derby don't know what type will be at the placeholder and use LONG VARCHAR that isn't comparable what leads to statement preparation failure.protected voidappendFunctionArgDivider(ASTFunctionCall functionExpression)Append divider between function arguments.protected voidclearLastFunctionArgDivider(ASTFunctionCall functionExpression)Clear last divider as we currently don't now position of argument until parent element is ended.protected voiddoAppendPart(Expression rootNode)Translates query qualifier to SQL WHERE clause.protected booleanparenthesisNeeded(Expression node, Expression parentNode)Methods inherited from class org.apache.cayenne.access.translator.select.QualifierTranslator
appendLiteral, appendObjectMatch, detectObjectMatch, doAppendPart, endNode, extractQualifier, finishedChild, objectNode, operandForBitwiseAnd, operandForBitwiseLeftShift, operandForBitwiseNot, operandForBitwiseOr, operandForBitwiseRightShift, operandForBitwiseXor, processRelTermination, setCaseInsensitive, setQualifier, setUseAliasForExpressions, startNodeMethods inherited from class org.apache.cayenne.access.translator.select.QueryAssemblerHelper
appendDbPath, appendLikeEscapeCharacter, appendLiteralDirect, appendObjPath, appendPart, getDbEntity, getObjEntity, paramsDbType, processColumn, processColumnWithQuoteSqlIdentifiers, processRelTermination, setForceJoinForRelations
-
Constructor Details
-
FirebirdQualifierTranslator
-
-
Method Details
-
doAppendPart
Description copied from class:QualifierTranslatorTranslates query qualifier to SQL WHERE clause. Qualifier is a method parameter.- Overrides:
doAppendPartin classQualifierTranslator
-
appendFunction
Description copied from class:QualifierTranslatorAppend function name to result SQL Override this method to rename or skip function if generic name isn't supported on target DB.- Overrides:
appendFunctionin classQualifierTranslator- Since:
- 4.0
-
appendFunctionArg
protected void appendFunctionArg(Object value, ASTFunctionCall functionExpression) throws IOExceptionA little bit ugly code that wraps String scalars to CAST(? AS VARCHAR(length)) because otherwise derby don't know what type will be at the placeholder and use LONG VARCHAR that isn't comparable what leads to statement preparation failure.- Overrides:
appendFunctionArgin classQualifierTranslator- Throws:
IOException- Since:
- 4.0
-
appendFunctionArgDivider
Description copied from class:QualifierTranslatorAppend divider between function arguments. In overriding methods can be replaced e.g. for " || " for CONCAT operation- Overrides:
appendFunctionArgDividerin classQualifierTranslator- Since:
- 4.0
-
clearLastFunctionArgDivider
Description copied from class:QualifierTranslatorClear last divider as we currently don't now position of argument until parent element is ended.- Overrides:
clearLastFunctionArgDividerin classQualifierTranslator- Since:
- 4.0
-
parenthesisNeeded
- Overrides:
parenthesisNeededin classQualifierTranslator
-
appendExtractFunction
Description copied from class:QualifierTranslatorSpecial case for extract date/time parts functions as they have many variants- Overrides:
appendExtractFunctionin classQualifierTranslator
-