
605
DEVELOPING
COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Las
t
upda
te
d 8/5/2010
ORMEvictQueries
Description
This method is used to evict the data of all the queries from the default query cache of the specified data source. If cache
name is specified, then the data of all queries belonging to the cache region with the given cache name are evicted.
If no data source is specified, the default query cache of the default data source is evicted.
Syntax
ORMEvictQueries([cachename])
ORMEvictQueries([cachename], datasource)
ORMExecuteQuery
Description
Executes a Hibernate Query Language (HQL) query.
By default, this function works on ORM's default data source. To use this function for another data source, specify the
data source key-value pair within the
queryoptions
.
Syntax
ORMExecuteQuery(hql, [params] [,unique])
ORMExecuteQuery(hql, [,unique] [, queryoptions])
ORMExecuteQuery(hql, params [,unique] [,queryOptions])
Parameters
Example
<cfset artistArr = ORMExecuteQuery("from Artists where artistid=1", true,
{datasource="cfartgallery"})>
<cfset countArray = ORMExecuteQuery("select count(*) from Authors", [], false,
{datasource="cfbookclub"})>
Parameter
Description
cachename
Name of the cache region that you want to evict.
datasource
Name of the data source whose cache you want to evict. If you do not specify the cache, the default query cache is
evicted.
Parameter
Description
Hql
The HQL query that has to be executed.
Params
Object parameter for the entity.
Unique
Specifies if the object parameter is unique.
Queryoptions
Key-value pair of options for the query.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...