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
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
distinctboolean
SetFunction(text function)
Sets the function that this column will be in. Examples are SUM, AVG, and MIN.
Parameters
functiontext
SetName(text name)
Sets the name of the column
Parameters
nametext
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
printTableboolean
SetRawType(integer rawType)
Sets the raw type of the column which is calculated with the meta data given to the query.
Parameters
rawTypeinteger
SetTable(text table)
Sets the name of the table that should contain the column.
Parameters
tabletext
ToText()
returns FUNCTION ( TABLE.COLUMN ) AS REMAPPED_NAME
Returns
text