method add [line 555]
A add(
$p1, [mixed
$value = null], [string
$comparison = null], string
$critOrColumn)
|
|
This method adds a new criterion to the list of criterias.
If a criterion for the requested column already exists, it is replaced. If is used as follow:
<p>
$crit->add("column",
"value"
Any comparison can be used.
The name of the table must be used implicitly in the column name, so the Column name must be something like 'TABLE.id'. If you don't like this, you can use the add(table, column, value) method.
Tags:
Parameters:
method addAlias [line 274]
void addAlias(
string
$alias, string
$table)
|
|
Allows one to specify an alias for a table that can be used in various parts of the SQL.
Tags:
Parameters:
method addAnd [line 996]
Criteria addAnd(
$p1, [
$p2 = null], [
$p3 = null])
|
|
This method adds a new criterion to the list of criterias.
If a criterion for the requested column already exists, it is "AND"ed to the existing criterion.
addAnd(column, value, comparison)
$crit =
$orig_crit->addAnd("column",
"value"
addAnd(column, value)
$crit =
$orig_crit->addAnd("column", "value");
addAnd(Criterion)
Any comparison can be used, of course.
Tags:
Parameters:
method addAscendingOrderByColumn [line 773]
A addAscendingOrderByColumn(
name
$name)
|
|
Add order by column name, explicitly specifying ascending.
Tags:
Parameters:
method addAsColumn [line 236]
Criteria addAsColumn(
string
$name, string
$clause)
|
|
Add an AS clause to the select columns. Usage:
Tags:
Parameters:
method addDescendingOrderByColumn [line 785]
Criteria addDescendingOrderByColumn(
string
$name)
|
|
Add order by column name, explicitly specifying descending.
Tags:
Parameters:
method addGroupByColumn [line 761]
A addGroupByColumn(
string
$groupBy)
|
|
Add group by column name.
Tags:
Parameters:
method addHaving [line 961]
This method adds a prepared Criterion object to the Criteria as a having clause.
You can get a new, empty Criterion object with the getNewCriterion() method.
<p>
Tags:
Parameters:
method addJoin [line 581]
Criteria addJoin(
string
$left, string
$right, [string
$operator = null])
|
|
This is the way that you should add a straight (inner) join of two tables. For example:
AND PROJECT.PROJECT_ID=FOO.PROJECT_ID
left = PROJECT.PROJECT_ID right = FOO.PROJECT_ID
Tags:
Parameters:
method addOr [line 1052]
Criteria addOr(
$p1, [
$p2 = null], [
$p3 = null])
|
|
This method adds a new criterion to the list of criterias.
If a criterion for the requested column already exists, it is "OR"ed to the existing criterion.
Any comparison can be used.
Supports a number of different signatures:
addOr(column, value, comparison)
$crit =
$orig_crit->addOr("column",
"value"
addOr(column, value)
$crit =
$orig_crit->addOr("column", "value");
addOr(Criterion)
Tags:
Parameters:
method addSelectColumn [line 718]
Add select column.
Tags:
Parameters:
method clear [line 201]
Brings this criteria back to its initial state, so that it can be reused as if it was new. Except if the criteria has grown in capacity, it is left at the current capacity.
Tags:
method clearGroupByColumns [line 817]
Clear the group-by columns.
Tags:
method clearOrderByColumns [line 806]
Clear the order-by columns.
Tags:
method clearSelectColumns [line 740]
Clears current select columns.
Tags:
method containsKey [line 307]
boolean containsKey(
string
$column)
|
|
Does this Criteria object contain the specified key?
Tags:
Parameters:
method equals [line 904]
This method checks another Criteria to see if they contain the same attributes and hashtable entries.
Tags:
Parameters:
method get [line 468]
An alias to getValue() -- exposing a Hashtable-like interface.
Tags:
Parameters:
method getAsColumns [line 248]
Get the column aliases.
Tags:
method getColumnForAs [line 259]
string getColumnForAs(
$as, string
$alias)
|
|
Returns the column name associated with an alias (AS-column).
Tags:
Parameters:
method getColumnName [line 372]
string getColumnName(
string
$name)
|
|
Method to return a String table name.
Tags:
Parameters:
method getComparison [line 404]
string getComparison(
string
$key)
|
|
Method to return a comparison String.
Tags:
Parameters:
method getCriterion [line 343]
Method to return criteria related to columns in a table.
Tags:
Parameters:
method getDbName [line 417]
Get the Database(Map) name.
Tags:
method getGroupByColumns [line 828]
array getGroupByColumns(
)
|
|
Get group by columns.
Tags:
method getHaving [line 838]
Get Having Criterion.
Tags:
method getIterator [line 181]
Implementing SPL IteratorAggregate interface. This allows you to foreach () over a Criteria object.
Tags:
Implementation of:
- IteratorAggregate::getIterator
method getJoins [line 591]
Get the array of Joins.
Tags:
method getLimit [line 684]
method getMap [line 190]
Get the criteria map.
Tags:
method getNewCriterion [line 361]
Criterion getNewCriterion(
string
$column, mixed
$value, [string
$comparison = null])
|
|
Method to return criterion that is not added automatically to this Criteria. This can be used to chain the Criterions to form a more complex where clause.
Tags:
Parameters:
method getOffset [line 707]
method getOrderByColumns [line 796]
array getOrderByColumns(
)
|
|
Get order by columns.
Tags:
method getSelectColumns [line 730]
array getSelectColumns(
)
|
|
Get select columns.
Tags:
method getSelectModifiers [line 750]
Get select modifiers.
Tags:
method getTableForAlias [line 285]
string getTableForAlias(
string
$alias)
|
|
Returns the table name associated with an alias.
Tags:
Parameters:
method getTableName [line 440]
string getTableName(
string
$name)
|
|
Method to return a String table name.
Tags:
Parameters:
method getTablesColumns [line 384]
array getTablesColumns(
)
|
|
Shortcut method to get an array of columns indexed by table.
Tags:
method getValue [line 454]
mixed getValue(
string
$name)
|
|
Method to return the value that was added to Criteria.
Tags:
Parameters:
method isIgnoreCase [line 633]
Is ignore case on or off?
Tags:
method isSingleRecord [line 661]
boolean isSingleRecord(
)
|
|
Is single record?
Tags:
method isUseTransaction [line 332]
boolean isUseTransaction(
)
|
|
Whether the sql command specified by this criteria must be wrapped in a transaction.
Tags:
method keys [line 296]
Get the keys for the criteria map.
Tags:
method put [line 487]
Instance put(
string
$key, mixed
$value)
|
|
Overrides Hashtable put, so that this object is returned instead of the value previously in the Criteria object.
The reason is so that it more closely matches the behavior of the add() methods. If you want to get the previous value then you should first Criteria.get() it yourself. Note, if you attempt to pass in an Object that is not a String, it will throw a NPE. The reason for this is that none of the add() methods support adding anything other than a String as a key.
Tags:
Parameters:
method putAll [line 502]
Copies all of the mappings from the specified Map to this Criteria These mappings will replace any mappings that this Criteria had for any of the keys currently in the specified Map.
if the map was another Criteria, its attributes are copied to this Criteria, overwriting previous settings.
Tags:
Parameters:
method remove [line 849]
mixed remove(
string
$key)
|
|
Remove an object from the criteria.
Tags:
Parameters:
constructor __construct [line 171]
Criteria __construct(
[dbName
$dbName = null])
|
|
Creates a new instance with the default capacity which corresponds to the specified database.
Tags:
Parameters:
method setAll [line 600]
Adds "ALL" modifier to the SQL statement.
Tags:
method setDbName [line 429]
void setDbName(
[string
$dbName = null])
|
|
Set the DatabaseMap name. If
null
is supplied, uses value provided by
.
Tags:
Parameters:
method setDistinct [line 610]
Adds "DISTINCT" modifier to the SQL statement.
Tags:
method setIgnoreCase [line 622]
Sets ignore case.
Tags:
Parameters:
method setLimit [line 672]
Set limit.
Tags:
Parameters:
method setOffset [line 696]
Set offset.
Tags:
Parameters:
method setSingleRecord [line 650]
Set single record? Set this to
true
if you expect the query
to result in only a single result record (the default behaviour is to throw a PropelException if multiple records are returned when the query is executed). This should be used in situations where returning multiple rows would indicate an error of some sort. If your query might return multiple records but you are only interested in the first one then you should be using setLimit(1).
Tags:
Parameters:
method setUseTransaction [line 321]
void setUseTransaction(
$v)
|
|
Will force the sql represented by this criteria to be executed within a transaction. This is here primarily to support the oid type in postgresql. Though it can be used to require any single sql statement to use a transaction.
Tags:
Parameters:
method size [line 894]
Returns the size (count) of this criteria.
Tags:
method toString [line 866]
Build a string representation of the Criteria.
Tags: