mura

Class queryTool

lucee.Component
    extended by mura.queryTool

This provides the ability to transforms a query into other data types.

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init(query inQuery)
    Method Summary
    any QueryAppend(query QueryOne, query QueryTwo, string Filter='page')
         This takes two queries and appends the second one to the first one.
    array toArray()
         Transforms a query into an array of structures.
    any toDelimited([string delimiter='[runtime expression]'], [string linefeed='[runtime expression]'])
         Transforms a query into a delimited string using the given delimiter and linefeed characters.
    struct toStruct(string primaryKey)
         Transforms a query into a structure, using a designated column as the key.
    any toXml()
         Transforms a query into an XML recordset.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(query inQuery)

    Parameters:
    inQuery - The query to transform.

    Method Detail

    QueryAppend

    public any QueryAppend(query QueryOne, query QueryTwo, string Filter='page')

    This takes two queries and appends the second one to the first one. This actually updates the first query and does not return anything.

    Parameters:
    QueryOne
    QueryTwo
    Filter

    toArray

    public array toArray()

    Transforms a query into an array of structures.


    toDelimited

    public any toDelimited([string delimiter='[runtime expression]'], [string linefeed='[runtime expression]'])

    Transforms a query into a delimited string using the given delimiter and linefeed characters.

    Parameters:
    delimiter - Default column delimiter (default is TAB).
    linefeed - Default linefeed (default is chr(10)).

    toStruct

    public struct toStruct(string primaryKey)

    Transforms a query into a structure, using a designated column as the key.

    Parameters:
    primaryKey - The name of the column to be used as the key for the structure. Should be a unique identifier or rows will be lost!

    toXml

    public any toXml()

    Transforms a query into an XML recordset.