Encapsulates a native Coldfusion query.
Methods of this class primarily wrap those of CFXQuery in Macromedia's CFX API.
This allows direct access and ensures performance on par with native Coldfusion queries.
Macromedia's CFX API allows CFX tags to be passed a single query. This is accessed
via the Request object's "query" field. Additionally, developers can create as many
query objects as they like, and all of them will subsequently be available by name in CFML.
However, the tableexport and tableimport methods act as a gateway between a native Coldfusion
Query and a FlareScript table. In some cases FlareScript tables may be beneficial alternatives
for performance or utility.
Query( name:string, columns:table )
» Creates a ColdFusion query, accessible after the ImageFlare call ends.
( SEE :
Coldfusion <-> ImageFlare )
eg. q = Query( 'people', { 'firstname', 'lastname' } )
name:string
» get only, name
rowcount:number
» get only, rowcount
colcount:number
» get only, colcount
columns:table
» get only, integer indexed column names
addrow( ):number
» adds a row to the query and returns the index of that row
get( row:number, col:number ):string
» get query data
set(row,col,value)
» set cell at row and col to value
tableexport( ):table
» export query to table, integer indexed table[row][col]
tableimport( data:table )
»
import data from table into query, table is integer indexed table[row][col]
query schema is the master, columns in the table which do not exist in the query are ignored
table can add more rows than the query originally had, the same is not exactly true when the table removes (does not define) rows
if the table has less rows than the query did originally, the existing data unspecified by table is left in query, data is pasted into the existing query, leaving some records on the end, you can create a new query