Libraries.Data.Database.DatabaseTypeConstants Documentation

This is a shared class containing the supported type constants for use in the Database Library. These names correspond to the constants in Java's JDBC. The names have been changed and the system can detect how everything maps to Quorum.

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer TIMEThis returns true if the type maps to the Quorum Text type.
integer TEXTVARCH
integer INTEGER32This returns whether or not the value is an 8-bit, 16-bit, or 32-bit integer. For 64-bit integers, this does not count.
integer NUMBER_EXACT_PRECISIONNUMERIC: Must have number of digits (precision) and scale (digits after the decimal poin
integer INTEGER16SMALLI
integer UNDEFINEDNU
integer TIMESTAMPThis action returns true if the type is a Date, Time, or a Timestamp. In practice text can be used and will be parsed by the system but Quorum has DateTime calss that will handle getting times and using them in a database easier.
integer NUMBER_EXTRA_PRECISIONDECIMAL: Must have at least the number of digits (precision) and scale (digits after the decimal poin
integer NUMBER32RE
integer NUMBER64DOUB
integer DATEThis returns true if the type maps to the Quorum Text type.
integer INTEGER64BIGI
integer BYTE_FIXED_SIZEBINA
integer BITIf the value given is of Type BIT this will return true
integer BYTEVARBINA
integer NUMBERThis returns true if the type constant maps to a number
integer TEXT_FIXED_SIZECHAR: A text value of a fixed length, up to 254 in most implementatio
integer INTEGERSMALLI
integer INTEGER8TINYI

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetHashCode()This action gets the hash code for an object.
IsBoolean(integer value)If the value given is of Type BIT this will return true
IsByteArray(integer value)Returns true if the type is a Byte Array.
IsDateTime(integer value)This action returns true if the type is a Date, Time, or a Timestamp.
IsInteger(integer value)This returns whether or not the value is an 8-bit, 16-bit, or 32-bit integer.
IsInteger64(integer value)This returns true if the value is a 64-bit Integer.
IsNumber(integer value)This returns true if the type constant maps to a number
IsText(integer value)This returns true if the type maps to the Quorum Text type.
IsUndefined(integer value)in SQL there can be columns with a NULL value and this maps to Quorum's undefined.

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.

Example Code

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

Parameters

Return

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

Equals(Libraries.Language.Object object)

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

Example Code

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

Parameters

Return

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

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

IsBoolean(integer value)

If the value given is of Type BIT this will return true

Parameters

Return

boolean:

IsByteArray(integer value)

Returns true if the type is a Byte Array. A byte array is a string of binary characters. It is similar to VARCHAR and text but instead of a string of characters it is a string of binary data.

Parameters

Return

boolean:

IsDateTime(integer value)

This action returns true if the type is a Date, Time, or a Timestamp. In practice text can be used and will be parsed by the system but Quorum has DateTime calss that will handle getting times and using them in a database easier.

Parameters

Return

boolean:

IsInteger(integer value)

This returns whether or not the value is an 8-bit, 16-bit, or 32-bit integer. For 64-bit integers, this does not count.

Parameters

Return

boolean:

IsInteger64(integer value)

This returns true if the value is a 64-bit Integer. In Quorum this would map to the BigInteger Class,

Parameters

Return

boolean:

IsNumber(integer value)

This returns true if the type constant maps to a number

Parameters

Return

boolean:

IsText(integer value)

This returns true if the type maps to the Quorum Text type.

Parameters

Return

boolean:

IsUndefined(integer value)

in SQL there can be columns with a NULL value and this maps to Quorum's undefined.

Parameters

Return

boolean: