ColumnTarget

Package: Libraries.Data.Database.Support · Inherits from: Libraries.Language.Object, Libraries.Data.Database.Support.RemappableName

This class is used mainly by the Find class to hold information related to the columns internal to a query. This class is used internally in the Library and is not exposed directly to the user. Typically when referencing a column the minimum needed is the name of the column and this class holds that and other information such as the table it belongs to and the type. This class also has an action that outputs the target to text for use directly in a query.

Actions

GetFunction()

Returns the function that this column will be in. Examples are SUM, AVG, and MIN.

Returns

text

GetName()

Returns the name of the column

Returns

text

GetRawType()

Returns the raw type of the column. If -1 then the type has not been found yet. This can only be calculated with the use of meta data that is populated when the query is being generated with an active database connection.

Returns

integer

GetTable()

Returns the name of the table that should contain the column.

Returns

text

GetType()

Returns a Type object corresponding to the mapping of the raw type to a Quorum type. Used when type checking the target.

Returns

Libraries.Language.Compile.Symbol.Type

IsDistinct()

Returns if this is a Distinct column. Useful for Find query with distinct aggregation functions.

Returns

boolean

SetDistinct(boolean distinct)

Sets if this is a Distinct column. Useful for Find query with distinct aggregation functions.

Parameters

  • distinct boolean

SetFunction(text function)

Sets the function that this column will be in. Examples are SUM, AVG, and MIN.

Parameters

  • function text

SetName(text name)

Sets the name of the column

Parameters

  • name text

SetPrintTable(boolean printTable)

When converting this target to text the table portion is sometimes not necessary to have and can even cause issues so setting this to false will remove that portion.

Parameters

  • printTable boolean

SetRawType(integer rawType)

Sets the raw type of the column which is calculated with the meta data given to the query.

Parameters

  • rawType integer

SetTable(text table)

Sets the name of the table that should contain the column.

Parameters

  • table text

ToText()

returns FUNCTION ( TABLE.COLUMN ) AS REMAPPED_NAME

Returns

text

Inherited Actions

2 actions from Libraries.Data.Database.Support.RemappableName
3 actions from Libraries.Language.Object