|
DataFaucet 1.0 Beta | ||||
| FRAMES | |||||
WEB-INF.cftags.component
datafaucet.system.sql.duck
datafaucet.system.sql.simplefiltergroup
datafaucet.system.sql.filtergroup
datafaucet.system.sql.statement
datafaucet.system.sql.select
public class select
creates a sql select statement which can be unioned, joined and filtered
| Constructor Summary | |
|---|---|
init(string table, [string columns='*'], [string orderby=''], [string include='and'], [string groupby=''], [string having=''], [numeric maxrows='[runtime expression]'], [boolean sortLS='[runtime expression]'], [any datasource=''])
|
|
| Method Summary | |
|---|---|
any |
addColumns(string columnList, [string clause='select'], [boolean overwrite='false'], [boolean append='true'])
|
private any |
addLiquidJoin(string MissingMethodName, struct MissingMethodArguments)
|
private any |
addLiquidUnion(string MissingMethodName, struct MissingMethodArguments)
|
any |
addSourceTable(any table, [string column=''], [string references=''])
|
any |
cacheAfter(string cachename, string cachedafter)
enables caching for the query object after a specified date |
any |
cacheWithin(string cachename, [string cachedwithin='1'], [string datepart='n'])
enables caching for the query object within a specified period of time |
any |
clearJoinTables()
|
query |
execute()
|
struct |
getAllTables([struct tables='[runtime expression]'])
|
private any |
getCache()
|
private any |
getCacheManager()
|
private string |
getColumnList(string property)
|
private any |
getDataManager()
|
any |
getDatasource()
|
any |
getFirstJoin()
|
private any |
getForeignKey(string table, string source, string column)
|
any |
getJoin([string table=''])
searches join tables for a table matching a specified alias - returns 0 if no join table is found |
private string |
getQualifiedColumns(string property)
|
any |
getSourceTables()
|
string |
getSyntax()
|
private any |
getTableFromMethodName(string name)
|
private string |
get_alias()
|
private any |
get_cachedafter()
|
private string |
get_columns()
|
any |
get_distinct(string propertyname)
returns the distinct value for the current select statement - allows joined tables to reflect the value for the entire statement |
private string |
get_groupby()
|
private string |
get_having()
|
private string |
get_orderby()
|
private string |
get_select()
|
boolean |
hasJoinSource()
|
boolean |
hasJoinTables()
|
boolean |
isRequired()
|
any |
join(string table, [boolean required='false'], [string column=''], [string references=''], [string include='and'], [string select=''], [string orderby=''], [string groupby=''], [string having=''])
|
private any |
matchTable(any table, string isMatchFor)
|
any |
onMissingMethod(string MissingMethodName, struct MissingMethodArguments)
Handles missing method exceptions. |
any |
purge()
purges the cache for this statement |
private any |
setCache(query query)
|
any |
setCacheManager(any CacheManager)
|
any |
setFirstJoin(any join)
|
private void |
set_all(string propertyname, boolean propertyvalue)
|
private any |
set_cachedafter(string propertyname, string propertyvalue)
|
private any |
set_cachedwithin(string propertyname, string propertyvalue)
|
private any |
set_cachename(string propertyname, string propertyvalue)
|
private void |
set_columns(string propertyname, string propertyvalue)
|
private any |
set_datepart(string propertyname, string propertyvalue)
|
any |
set_distinct(string propertyname, boolean propertyvalue)
this method ensures that the distinct property is a boolean value |
private any |
set_maxrows(string propertyname, string propertyvalue)
|
private any |
set_sort(string propertyname, string propertyvalue)
|
any |
sort(string columns)
sets the sort property to override the default sort-order in the orderby property |
private query |
sortLS(query qry)
|
any |
union(string table, string columns, [boolean all='false'], [string include='and'], [string groupby=''], [string having=''])
|
| Methods inherited from class datafaucet.system.sql.statement |
|---|
addListener, bindFilters, broadcast, clearListeners, clearUnions, getColumns, getGroupSource, getListeners, getNewListener, getSQLAgent, getSource, getSourceName, getTable, hasFilters, hasGroupSource, hasListeners, initStatement, notifyListener, reset, setDatasource, set_datasource, set_table
|
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Constructor Detail |
|---|
public init(string table, [string columns='*'], [string orderby=''], [string include='and'], [string groupby=''], [string having=''], [numeric maxrows='[runtime expression]'], [boolean sortLS='[runtime expression]'], [any datasource=''])
table - the database table to insert a record intocolumns - the list of columns to retreive from the datasource - use || to concatenate column names in this select across all db server platformsorderby - a list of columns to order the query - WARNING: DO NOT allow users to provide this value -- allow users to provide the sort property insteadinclude - and / or -- determines whether the filters are cumulative or exclusivegroupby - a list of columns to group the query by -- required by the db server when aggregated columns are in the select select - a regular expression is applied to the default to eliminate "asc" and "desc" from the group by clausehaving - allows the application of a having clause in the sql syntaxmaxrows - allows the query to be limited to a specified number of recordssortLS - indicates if the result query should be locale-specific sorted after executiondatasource| Method Detail |
|---|
public any addColumns(string columnList, [string clause='select'], [boolean overwrite='false'], [boolean append='true'])
columnListclauseoverwriteappendprivate any addLiquidJoin(string MissingMethodName, struct MissingMethodArguments)
MissingMethodName - The name of the missing method.MissingMethodArguments - The arguments that were passed to the missing method. This might be a named argument set or a numerically indexed set.private any addLiquidUnion(string MissingMethodName, struct MissingMethodArguments)
MissingMethodName - The name of the missing method.MissingMethodArguments - The arguments that were passed to the missing method. This might be a named argument set or a numerically indexed set.public any addSourceTable(any table, [string column=''], [string references=''])
tablecolumn - the name of the target column in the joined tablereferences - the name of the source column in the table being adjoinedpublic any cacheAfter(string cachename, string cachedafter)
cachenamecachedafterpublic any cacheWithin(string cachename, [string cachedwithin='1'], [string datepart='n'])
cachenamecachedwithindatepartpublic any clearJoinTables()
clearJoinTables
in class
statement
public query execute()
execute
in class
statement
public struct getAllTables([struct tables='[runtime expression]'])
tablesprivate any getCache()
private any getCacheManager()
private string getColumnList(string property)
getColumnList
in class
statement
propertyprivate any getDataManager()
public any getDatasource()
getDatasource
in class
statement
public any getFirstJoin()
private any getForeignKey(string table, string source, string column)
tablesourcecolumnpublic any getJoin([string table=''])
tableprivate string getQualifiedColumns(string property)
propertypublic any getSourceTables()
public string getSyntax()
getSyntax
in class
statement
private any getTableFromMethodName(string name)
nameprivate string get_alias()
get_alias
in class
statement
private any get_cachedafter()
private string get_columns()
public any get_distinct(string propertyname)
propertynameprivate string get_groupby()
private string get_having()
private string get_orderby()
private string get_select()
public boolean hasJoinSource()
hasJoinSource
in class
simplefiltergroup
public boolean hasJoinTables()
hasJoinTables
in class
statement
public boolean isRequired()
public any join(string table, [boolean required='false'], [string column=''], [string references=''], [string include='and'], [string select=''], [string orderby=''], [string groupby=''], [string having=''])
table - the name of the table to join to theq ueryrequired - indicates if records in the joined table are required to return records in the source table
-- an outer join is created when false and an inner join is created when truecolumn - the name of the target column in the joined tablereferences - the name of the source column in the table being adjoinedinclude - and / or -- if multiple join tags are applied with the same table
this attribute determines if the joins are exclusive or inclusiveselect - allows select columns to be placed in the join table so that they are removed with the join if the join is removedorderby - allows order columns to be placed in the join table so that they are removed with the join if the join is removedgroupby - allows order columns to be placed in the join table so that they are removed with the join if the join is removedhaving - allows order columns to be placed in the join table so that they are removed with the join if the join is removedprivate any matchTable(any table, string isMatchFor)
tableisMatchForpublic any onMissingMethod(string MissingMethodName, struct MissingMethodArguments)
onMissingMethod
in class
filtergroup
MissingMethodName - The name of the missing method.MissingMethodArguments - The arguments that were passed to the missing method. This might be a named argument set or a numerically indexed set.public any purge()
private any setCache(query query)
querypublic any setCacheManager(any CacheManager)
CacheManagerpublic any setFirstJoin(any join)
joinprivate void set_all(string propertyname, boolean propertyvalue)
propertynamepropertyvalueprivate any set_cachedafter(string propertyname, string propertyvalue)
propertynamepropertyvalueprivate any set_cachedwithin(string propertyname, string propertyvalue)
propertynamepropertyvalueprivate any set_cachename(string propertyname, string propertyvalue)
propertynamepropertyvalueprivate void set_columns(string propertyname, string propertyvalue)
propertynamepropertyvalueprivate any set_datepart(string propertyname, string propertyvalue)
propertynamepropertyvaluepublic any set_distinct(string propertyname, boolean propertyvalue)
propertynamepropertyvalueprivate any set_maxrows(string propertyname, string propertyvalue)
propertynamepropertyvalueprivate any set_sort(string propertyname, string propertyvalue)
propertynamepropertyvaluepublic any sort(string columns)
columnsprivate query sortLS(query qry)
qrypublic any union(string table, string columns, [boolean all='false'], [string include='and'], [string groupby=''], [string having=''])
table - the database table to insert a record intocolumns - the list of columns to retreive from the datasource - use || to concatenate column names in this select across all db server platformsall - indicates if the all keyword should be used when the union is appliedinclude - and / or -- determines whether the filters are cumulative or exclusivegroupby - a list of columns to group the query by -- required by the db server when aggregated columns are in the select select - a regular expression is applied to the default to eliminate "asc" and "desc" from the group by clausehaving - allows the application of a having clause in the sql syntax
|
DataFaucet 1.0 Beta | ||||
| FRAMES | |||||