method add [line 607]
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 285]
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 1122]
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 898]
A addAscendingOrderByColumn(
name
$name)
|
|
Add order by column name, explicitly specifying ascending.
Tags:
Parameters:
method addAsColumn [line 247]
Criteria addAsColumn(
string
$name, string
$clause)
|
|
Add an AS clause to the select columns. Usage:
Tags:
Parameters:
method addDescendingOrderByColumn [line 910]
Criteria addDescendingOrderByColumn(
string
$name)
|
|
Add order by column name, explicitly specifying descending.
Tags:
Parameters:
method addGroupByColumn [line 886]
A addGroupByColumn(
string
$groupBy)
|
|
Add group by column name.
Tags:
Parameters:
method addHaving [line 1087]
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 634]
Criteria addJoin(
mixed
$left, mixed
$right, [mixed
$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 addJoinObject [line 689]
Add a join object to the Criteria
Tags:
Parameters:
method addMultipleJoin [line 671]
Criteria addMultipleJoin(
array
$conditions, [string
$joinType = null])
|
|
Add a join with multiple conditions see http://propel.phpdb.org/trac/ticket/167, http://propel.phpdb.org/trac/ticket/606
Example usage: $c->addMultipleJoin(array( array(LeftPeer::LEFT_COLUMN, RightPeer::RIGHT_COLUMN), // if no third argument, defaults to Criteria::EQUAL array(FoldersPeer::alias( 'fo', FoldersPeer::LFT ), FoldersPeer::alias( 'parent', FoldersPeer::RGT ), Criteria::LESS_EQUAL ) ), Criteria::LEFT_JOIN );
Tags:
Parameters:
method addOr [line 1178]
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 829]
Add select column.
Tags:
Parameters:
method clear [line 212]
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 942]
Clear the group-by columns.
Tags:
method clearOrderByColumns [line 931]
Clear the order-by columns.
Tags:
method clearSelectColumns [line 865]
Clears current select columns.
Tags:
method containsKey [line 318]
boolean containsKey(
string
$column)
|
|
Does this Criteria object contain the specified key?
Tags:
Parameters:
constructor __construct [line 182]
Criteria __construct(
[dbName
$dbName = null])
|
|
Creates a new instance with the default capacity which corresponds to the specified database.
Tags:
Parameters:
method equals [line 1029]
This method checks another Criteria to see if they contain the same attributes and hashtable entries.
Tags:
Parameters:
method get [line 520]
An alias to getValue() -- exposing a Hashtable-like interface.
Tags:
Parameters:
method getAsColumns [line 259]
Get the column aliases.
Tags:
method getColumnForAs [line 270]
string getColumnForAs(
$as, string
$alias)
|
|
Returns the column name associated with an alias (AS-column).
Tags:
Parameters:
method getColumnName [line 396]
string getColumnName(
string
$name)
|
|
Method to return a String table name.
Tags:
Parameters:
method getComparison [line 428]
string getComparison(
string
$key)
|
|
Method to return a comparison String.
Tags:
Parameters:
method getCriterion [line 367]
Method to return criteria related to columns in a table.
Tags:
Parameters:
method getDbName [line 441]
Get the Database(Map) name.
Tags:
method getGroupByColumns [line 953]
array getGroupByColumns(
)
|
|
Get group by columns.
Tags:
method getHaving [line 963]
Get Having Criterion.
Tags:
method getIterator [line 192]
Implementing SPL IteratorAggregate interface. This allows you to foreach () over a Criteria object.
Tags:
Implementation of:
- IteratorAggregate::getIterator
method getJoins [line 702]
Get the array of Joins.
Tags:
method getLimit [line 795]
method getMap [line 201]
Get the criteria map.
Tags:
method getNewCriterion [line 385]
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 818]
method getOrderByColumns [line 921]
array getOrderByColumns(
)
|
|
Get order by columns.
Tags:
method getPrimaryTableName [line 467]
string getPrimaryTableName(
)
|
|
Get the primary table for this Criteria.
This is useful for cases where a Criteria may not contain any SELECT columns or WHERE columns. This must be explicitly set, of course, in order to be useful.
Tags:
method getSelectColumns [line 855]
array getSelectColumns(
)
|
|
Get select columns.
Tags:
method getSelectModifiers [line 875]
Get select modifiers.
Tags:
method getTableForAlias [line 296]
string getTableForAlias(
string
$alias)
|
|
Returns the table name associated with an alias.
Tags:
Parameters:
method getTableName [line 492]
string getTableName(
string
$name)
|
|
Method to return a String table name.
Tags:
Parameters:
method getTablesColumns [line 408]
array getTablesColumns(
)
|
|
Shortcut method to get an array of columns indexed by table.
Tags:
method getValue [line 506]
mixed getValue(
string
$name)
|
|
Method to return the value that was added to Criteria.
Tags:
Parameters:
method hasSelectClause [line 844]
boolean hasSelectClause(
)
|
|
Whether this Criteria has any select columns.
This will include columns added with addAsColumn() method.
Tags:
method isIgnoreCase [line 744]
Is ignore case on or off?
Tags:
method isSingleRecord [line 772]
boolean isSingleRecord(
)
|
|
Is single record?
Tags:
method isUseTransaction [line 356]
boolean isUseTransaction(
)
|
|
Whether the sql command specified by this criteria must be wrapped in a transaction.
Tags:
method keyContainsValue [line 331]
boolean keyContainsValue(
string
$column)
|
|
Does this Criteria object contain the specified key and does it have a value set for the key
Tags:
Parameters:
method keys [line 307]
Get the keys for the criteria map.
Tags:
method put [line 539]
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 554]
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 974]
mixed remove(
string
$key)
|
|
Remove an object from the criteria.
Tags:
Parameters:
method setAll [line 711]
Adds "ALL" modifier to the SQL statement.
Tags:
method setDbName [line 453]
void setDbName(
[string
$dbName = null])
|
|
Set the DatabaseMap name. If
null
is supplied, uses value provided by
.
Tags:
Parameters:
method setDistinct [line 721]
Adds "DISTINCT" modifier to the SQL statement.
Tags:
method setIgnoreCase [line 733]
Sets ignore case.
Tags:
Parameters:
method setLimit [line 783]
Set limit.
Tags:
Parameters:
method setOffset [line 807]
Set offset.
Tags:
Parameters:
method setPrimaryTableName [line 481]
void setPrimaryTableName(
$tableName, string
$v)
|
|
Sets the primary table for this Criteria.
This is useful for cases where a Criteria may not contain any SELECT columns or WHERE columns. This must be explicitly set, of course, in order to be useful.
Tags:
Parameters:
method setSingleRecord [line 761]
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 345]
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 1019]
Returns the size (count) of this criteria.
Tags:
method toString [line 991]
Build a string representation of the Criteria.
Tags: