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

Variables Table

VariablesDescription
integer UNDEFINEDNULL
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 NUMBER32REAL
integer INTEGER16SMALLINT
integer BYTE_FIXED_SIZEBINARY
integer INTEGER8TINYINT
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 TEXTVARCHAR
integer BYTEVARBINARY
integer TEXT_FIXED_SIZECHAR: A text value of a fixed length, up to 254 in most implementations
integer TIMEThis returns true if the type maps to the Quorum Text type.
integer NUMBERThis returns true if the type constant maps to a number
integer INTEGER64BIGINT
integer NUMBER_EXACT_PRECISIONNUMERIC: Must have number of digits (precision) and scale (digits after the decimal point)
integer INTEGERSMALLINT
integer DATEThis returns true if the type maps to the Quorum Text type.
integer BITIf the value given is of Type BIT this will return true
integer NUMBER64DOUBLE
integer NUMBER_EXTRA_PRECISIONDECIMAL: Must have at least the number of digits (precision) and scale (digits after the decimal point)

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)

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

IsBoolean(integer value)

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

Parameters

  • integer value

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

  • integer value

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

  • integer value

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

  • integer value

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

  • integer value

Return

boolean:

IsNumber(integer value)

This returns true if the type constant maps to a number

Parameters

  • integer value

Return

boolean:

IsText(integer value)

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

Parameters

  • integer value

Return

boolean:

IsUndefined(integer value)

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

Parameters

  • integer value

Return

boolean: