Libraries.Data.Database.Support.Parameter Documentation

This is a support class mainly used for Inserts and Updates. This is used internally and not exposed to the user. This class holds a value that would typically be used to set to a row in a column. For example if a column needs to be set to 4, a parameter object will be created with the value 4 as an integer stored and the type of this parameter is set to Integer. Then the queries can grab that value as text for when it's written out and then use this class to check if the type is compatible to the type of the column this needs to be set to.

Inherits from: Libraries.Language.Object

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)

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)

GetBigIntegerValue()

GetBooleanValue()

Return

boolean

GetExpressionType()

Returns the value as text no matter what type the value actually is

Return

Libraries.Language.Compile.Symbol.Type:

GetExpressionValue()

Sets the function that this parameter will be inside of. Not called by the user the actual functions being called will be set internally

Return

boolean:

GetFunction()

Returns the function that this parameter will be inside of. Not called by the user the actual functions being called will used to build the sql string.

Return

text:

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()

GetIntegerValue()

Return

integer

GetNumberValue()

Return

number

GetTextValue()

Return

text

GetType()

Returns the name of type of this parameter

Return

text:

GetValueAsText()

Returns the value as text no matter what type the value actually is

Return

text:

IsBigInteger()

Return

boolean

IsBoolean()

Return

boolean

IsExpression()

NOT FINAL

Return

boolean:

IsInteger()

Return

boolean

IsNumber()

Return

boolean

IsText()

Return

boolean

IsTypeCompatible(integer rawType)

Given a raw type this will check if the internal type here is compatible with the raw type as mapped to Quorum.

Parameters

  • integer rawType

Return

boolean:

IsUndefined()

set the value, and a function to check what type it is

Return

boolean:

SetExpressionType(Libraries.Language.Compile.Symbol.Type type)

Returns the name of type of this parameter

Parameters

SetFunction(text function)

Sets the function that this parameter will be inside of. Not called by the user the actual functions being called will be set internally

Parameters

  • text function

SetToBigInteger(Libraries.Compute.BigInteger value)

SetToBoolean(boolean value)

Given a raw type this will check if the internal type here is compatible with the raw type as mapped to Quorum.

Parameters

  • boolean value

SetToExpression(text value)

Returns the function that this parameter will be inside of. Not called by the user the actual functions being called will used to build the sql string.

Parameters

  • text value

SetToInteger(integer value)

Parameters

  • integer value

SetToNumber(number value)

Parameters

  • number value

SetToText(text value)

Parameters

  • text value

SetToUndefined()

set the value, and a function to check what type it is