Libraries.Data.Database.QueryExpressionListener Documentation

This class is Expression Listener that takes an expression that has been passed through both the Quorum Lexer and Parser and tranverses it. As it traverses it different logic is applied to take the existing expression and convert the expression into an expression that would be valid in SQL.

Inherits from: Libraries.Language.Compile.Parsing.DefaultExpressionListener, Libraries.Language.Compile.Parsing.UnifiedSourceListener, Libraries.Language.Object, Libraries.Language.Compile.QuorumSourceListener

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

DoAndOr(Libraries.Language.Compile.Context.AndOrContext context)

pop the text of the right and the left

Parameters

Enter(Libraries.Language.Compile.Context.ParseContext context)

EnterAccessModifier(Libraries.Language.Compile.Context.AccessModifierContext context)

EnterAction(Libraries.Language.Compile.Context.ActionContext context)

EnterActionCall(Libraries.Language.Compile.Context.ActionCallContext context)

EnterActionExpressionList(Libraries.Language.Compile.Context.ActionExpressionListContext context)

EnterActionHeader(Libraries.Language.Compile.Context.ActionContext context)

EnterActionsNoClass(Libraries.Language.Compile.Context.ActionsNoClassContext context)

EnterAddition(Libraries.Language.Compile.Context.AdditionContext context)

EnterAlertStatement(Libraries.Language.Compile.Context.AlertContext context)

EnterAlwaysStatement(Libraries.Language.Compile.Context.AlwaysStatementContext context)

EnterAnd(Libraries.Language.Compile.Context.AndOrContext context)

EnterAssignmentDeclaration(Libraries.Language.Compile.Context.AssignmentDeclaractionContext context)

EnterBlock(Libraries.Language.Compile.Context.BlockContext context)

EnterBlueprintAction(Libraries.Language.Compile.Context.ActionContext context)

EnterBoolean(Libraries.Language.Compile.Context.BooleanContext context)

EnterCast(Libraries.Language.Compile.Context.CastContext context)

EnterCheckStatement(Libraries.Language.Compile.Context.CheckContext context)

EnterClassStatements(Libraries.Language.Compile.Context.ClassStatementsContext context)

EnterClassType(Libraries.Language.Compile.Context.ClassTypeContext context)

EnterConstructor(Libraries.Language.Compile.Context.ConstructorContext context)

EnterDetectStatement(Libraries.Language.Compile.Context.DetectStatementContext context)

EnterDocumentation(Libraries.Language.Compile.Context.DocumentationContext context)

EnterElseIfStatement(Libraries.Language.Compile.Context.IfContext context)

EnterElseStatement(Libraries.Language.Compile.Context.IfContext context)

EnterEquals(Libraries.Language.Compile.Context.EqualsContext context)

EnterFormalParameter(Libraries.Language.Compile.Context.FormalParameterContext context)

EnterFullClassDeclaration(Libraries.Language.Compile.Context.FullClassDeclarationContext context)

EnterGenericDeclaration(Libraries.Language.Compile.Context.GenericDeclarationContext context)

EnterGenericStatement(Libraries.Language.Compile.Context.GenericContext context)

EnterIfStatement(Libraries.Language.Compile.Context.IfContext context)

EnterInequality(Libraries.Language.Compile.Context.InequalityContext context)

EnterInheritStatement(Libraries.Language.Compile.Context.InheritStatementContext context)

EnterInheritStatements(Libraries.Language.Compile.Context.InheritStatementsContext context)

EnterInitialParentActionCall(Libraries.Language.Compile.Context.ActionCallContext context)

EnterInput(Libraries.Language.Compile.Context.InputContext context)

EnterInputNoParameters(Libraries.Language.Compile.Context.InputContext context)

EnterInteger(Libraries.Language.Compile.Context.IntegerContext context)

EnterIs(Libraries.Language.Compile.Context.IsContext context)

EnterLoopStatement(Libraries.Language.Compile.Context.LoopContext context)

EnterMe(Libraries.Language.Compile.Context.MeContext context)

EnterMeVariableAccess(Libraries.Language.Compile.Context.MeVariableAccessContext context)

EnterMinus(Libraries.Language.Compile.Context.UnaryMinusContext context)

EnterMultiplication(Libraries.Language.Compile.Context.MultiplicationContext context)

EnterNoActionsNoClass(Libraries.Language.Compile.Context.NoActionsNoClassContext context)

EnterNoClassDeclaration(Libraries.Language.Compile.Context.NoClassDeclarationContext context)

EnterNoTypeAssignment(Libraries.Language.Compile.Context.NoTypeAssignmentContext context)

EnterNormalAssignment(Libraries.Language.Compile.Context.NormalAssignmentContext context)

EnterNot(Libraries.Language.Compile.Context.NotContext context)

EnterNumber(Libraries.Language.Compile.Context.NumberContext context)

EnterObjectAssignment(Libraries.Language.Compile.Context.ObjectAssignmentContext context)

EnterOr(Libraries.Language.Compile.Context.AndOrContext context)

EnterOutputStatement(Libraries.Language.Compile.Context.OutputContext context)

EnterPackageRule(Libraries.Language.Compile.Context.PackageContext context)

EnterParentAssignment(Libraries.Language.Compile.Context.ParentAssignmentContext context)

EnterParentFieldAccess(Libraries.Language.Compile.Context.ParentFieldAccessContext context)

EnterParentVariableFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

EnterParentVariableSoloFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

EnterParenthesisExpression(Libraries.Language.Compile.Context.ParenthesisContext context)

EnterQualifiedName(Libraries.Language.Compile.Context.QualifiedNameContext context)

EnterReturnStatement(Libraries.Language.Compile.Context.ReturnContext context)

EnterSayStatement(Libraries.Language.Compile.Context.SayContext context)

EnterStart(Libraries.Language.Compile.Context.StartContext context)

EnterStatement(Libraries.Language.Compile.Context.StatementContext context)

EnterSystemAction(Libraries.Language.Compile.Context.ActionContext context)

EnterText(Libraries.Language.Compile.Context.TextContext context)

EnterUndefined(Libraries.Language.Compile.Context.UndefinedContext context)

EnterUse(Libraries.Language.Compile.Context.UseContext context)

EnterVariableFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

EnterVariableSoloFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

Exit(Libraries.Language.Compile.Context.ParseContext context)

ExitAccessModifier(Libraries.Language.Compile.Context.AccessModifierContext context)

ExitAction(Libraries.Language.Compile.Context.ActionContext context)

ExitActionCall(Libraries.Language.Compile.Context.ActionCallContext context)

ExitActionExpressionList(Libraries.Language.Compile.Context.ActionExpressionListContext context)

ExitActionHeader(Libraries.Language.Compile.Context.ActionContext context)

ExitActionsNoClass(Libraries.Language.Compile.Context.ActionsNoClassContext context)

ExitAddition(Libraries.Language.Compile.Context.AdditionContext context)

pop the text of the right and the left

Parameters

ExitAlertStatement(Libraries.Language.Compile.Context.AlertContext context)

ExitAlwaysStatement(Libraries.Language.Compile.Context.AlwaysStatementContext context)

ExitAnd(Libraries.Language.Compile.Context.AndOrContext context)

ExitAssignmentDeclaration(Libraries.Language.Compile.Context.AssignmentDeclaractionContext context)

ExitBlock(Libraries.Language.Compile.Context.BlockContext context)

ExitBlueprintAction(Libraries.Language.Compile.Context.ActionContext context)

ExitBoolean(Libraries.Language.Compile.Context.BooleanContext context)

ExitCast(Libraries.Language.Compile.Context.CastContext context)

ExitCheckStatement(Libraries.Language.Compile.Context.CheckContext context)

ExitClassStatements(Libraries.Language.Compile.Context.ClassStatementsContext context)

ExitClassType(Libraries.Language.Compile.Context.ClassTypeContext context)

ExitConstructor(Libraries.Language.Compile.Context.ConstructorContext context)

ExitDetectStatement(Libraries.Language.Compile.Context.DetectStatementContext context)

ExitDocumentation(Libraries.Language.Compile.Context.DocumentationContext context)

ExitElseIfStatement(Libraries.Language.Compile.Context.IfContext context)

ExitElseStatement(Libraries.Language.Compile.Context.IfContext context)

ExitEquals(Libraries.Language.Compile.Context.EqualsContext context)

ExitFormalParameter(Libraries.Language.Compile.Context.FormalParameterContext context)

ExitFullClassDeclaration(Libraries.Language.Compile.Context.FullClassDeclarationContext context)

ExitGenericDeclaration(Libraries.Language.Compile.Context.GenericDeclarationContext context)

ExitGenericStatement(Libraries.Language.Compile.Context.GenericContext context)

ExitIfStatement(Libraries.Language.Compile.Context.IfContext context)

ExitInequality(Libraries.Language.Compile.Context.InequalityContext context)

pop the text of the right and the left

Parameters

ExitInheritStatement(Libraries.Language.Compile.Context.InheritStatementContext context)

ExitInheritStatements(Libraries.Language.Compile.Context.InheritStatementsContext context)

ExitInitialParentActionCall(Libraries.Language.Compile.Context.ActionCallContext context)

ExitInput(Libraries.Language.Compile.Context.InputContext context)

ExitInputNoParameters(Libraries.Language.Compile.Context.InputContext context)

ExitInteger(Libraries.Language.Compile.Context.IntegerContext context)

ExitIs(Libraries.Language.Compile.Context.IsContext context)

ExitLoopStatement(Libraries.Language.Compile.Context.LoopContext context)

ExitMe(Libraries.Language.Compile.Context.MeContext context)

ExitMeVariableAccess(Libraries.Language.Compile.Context.MeVariableAccessContext context)

ExitMinus(Libraries.Language.Compile.Context.UnaryMinusContext context)

pop the text of the right and the left

Parameters

ExitMultiplication(Libraries.Language.Compile.Context.MultiplicationContext context)

ExitNoActionsNoClass(Libraries.Language.Compile.Context.NoActionsNoClassContext context)

ExitNoClassDeclaration(Libraries.Language.Compile.Context.NoClassDeclarationContext context)

ExitNoTypeAssignment(Libraries.Language.Compile.Context.NoTypeAssignmentContext context)

ExitNormalAssignment(Libraries.Language.Compile.Context.NormalAssignmentContext context)

ExitNot(Libraries.Language.Compile.Context.NotContext context)

pop the text of the right and the left

Parameters

ExitNumber(Libraries.Language.Compile.Context.NumberContext context)

ExitObjectAssignment(Libraries.Language.Compile.Context.ObjectAssignmentContext context)

ExitOr(Libraries.Language.Compile.Context.AndOrContext context)

ExitOutputStatement(Libraries.Language.Compile.Context.OutputContext context)

ExitPackageRule(Libraries.Language.Compile.Context.PackageContext context)

ExitParentAssignment(Libraries.Language.Compile.Context.ParentAssignmentContext context)

ExitParentFieldAccess(Libraries.Language.Compile.Context.ParentFieldAccessContext context)

ExitParentVariableFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

ExitParentVariableSoloFunctionCall(Libraries.Language.Compile.Context.ParentVariableFunctionCallContext context)

ExitParenthesisExpression(Libraries.Language.Compile.Context.ParenthesisContext context)

ExitQualifiedName(Libraries.Language.Compile.Context.QualifiedNameContext context)

ExitReturnStatement(Libraries.Language.Compile.Context.ReturnContext context)

ExitSayStatement(Libraries.Language.Compile.Context.SayContext context)

ExitStart(Libraries.Language.Compile.Context.StartContext context)

ExitStatement(Libraries.Language.Compile.Context.StatementContext context)

ExitSystemAction(Libraries.Language.Compile.Context.ActionContext context)

ExitText(Libraries.Language.Compile.Context.TextContext context)

ExitUndefined(Libraries.Language.Compile.Context.UndefinedContext context)

ExitUse(Libraries.Language.Compile.Context.UseContext context)

ExitVariableFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

ExitVariableSoloFunctionCall(Libraries.Language.Compile.Context.VariableFunctionCallContext context)

Finish()

GetConversion()

Return

text

GetDatabaseMetaData()

pop the text of the right and the left

Return

Libraries.Data.Database.DatabaseMetaData:

GetFile()

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetOpcodeStack()

GetOriginalQuery()

table has been found

Return

text:

GetQuery()

only referencing a table

Return

Libraries.Data.Database.Query:

GetSource()

Return

text

HasConversion()

Return

boolean

HasError()

Return

boolean

SetCompilerErrorManager(Libraries.Language.Compile.CompilerErrorManager errors)

SetDatabaseMetaData(Libraries.Data.Database.DatabaseMetaData meta)

processes this in order to manage the strange case of NULL in SQL

Parameters

SetFile(Libraries.System.File file)

SetLexer(Libraries.Language.Compile.Lexer lexer)

SetOriginalQuery(text originalQuery)

aliased table

Parameters

  • text originalQuery

SetQuery(Libraries.Data.Database.Query query)

now if the table exists, get the type and type check it.

Parameters

SetSource(text source)

Parameters

  • text source

SetSymbolTable(Libraries.Language.Compile.Symbol.SymbolTable table)

SetTypeChecker(Libraries.Language.Compile.Symbol.TypeChecker checker)

SyntaxError(Libraries.Language.Compile.CompilerError error)

This action is called only under the condition that we are receiving error message events from the underlying parser technology (e.g., ANTLR). If we are, the messages will be propogated. Generally, this action does not need to be overriden.

Parameters