[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
Base static class for performing query and update operations on the '<?php echo $table->getName() ?>' table. <?php echo $table->getDescription() ?>
Poids: | 1501 lignes (50 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
getMapBuilder() X-Ref |
return: MapBuilder the map builder for this peer |
getPhpNameMap() X-Ref |
Gets a map (hash) of PHP names to DB column names. return: array The PHP to DB name map for this peer |
alias($alias, $column) X-Ref |
Convenience method which changes table.column to alias.column. Using this method you can maintain SQL abstraction while using column aliases. <code> $c->addAlias("alias1", TablePeer::TABLE_NAME); $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); </code> param: string $alias The alias for the current table. param: string $column The column name for current table. (i.e. <?php echo $table->getPhpName() ?>Peer::COLUMN_NAME). return: string |
addSelectColumns(Criteria $criteria) X-Ref |
Add all the columns needed to create a new object. Note: any columns that were marked with lazyLoad="true" in the XML schema will not be added to the select list and only loaded on demand. param: criteria object containing the columns to add. |
doCount(Criteria $criteria, $distinct = false, $con = null) X-Ref |
Returns the number of rows matching criteria. param: Criteria $criteria param: boolean $distinct Whether to select only distinct columns. param: Connection $con return: int Number of matching rows. |
doSelectOne(Criteria $criteria, $con = null) X-Ref |
Method to select one object from the DB. param: Criteria $criteria object used to create the SELECT statement. param: Connection $con return: <?php echo $table->getPhpName() ?> |
doSelect(Criteria $criteria, $con = null) X-Ref |
Method to do selects. param: Criteria $criteria The Criteria object used to build the SELECT statement. param: Connection $con return: array Array of selected Objects |
doSelectRS(Criteria $criteria, $con = null) X-Ref |
Prepares the Criteria object and uses the parent doSelect() method to get a ResultSet. Use this method directly if you want to just get the resultset (instead of an array of objects). param: Criteria $criteria The Criteria object used to build the SELECT statement. param: Connection $con the connection to use return: ResultSet The resultset object with numerically-indexed fields. |
populateObjects(ResultSet $rs) X-Ref |
The returned array will contain objects of the default type or objects that inherit from the default. |
getOMClass(ResultSet $rs, $colnum) X-Ref |
The returned Class will contain objects of the default type or objects that inherit from the default. param: ResultSet $rs ResultSet with pointer to record containing om class. param: int $colnum Column to examine for OM class information (first is 1). |
getOMClass() X-Ref |
The class that the Peer will make instances of. If the BO is abstract then you must implement this method in the BO. |
doInsert($values, $con = null) X-Ref |
Method perform an INSERT on the database, given a <?php echo $table->getPhpName() ?> or Criteria object. param: mixed $values Criteria or <?php echo $table->getPhpName() ?> object containing data that is used to create the INSERT statement. param: Connection $con the connection to use return: mixed The new primary key. |
doUpdate($values, $con = null) X-Ref |
Method perform an UPDATE on the database, given a <?php echo $table->getPhpName() ?> or Criteria object. param: mixed $values Criteria or <?php echo $table->getPhpName() ?> object containing data that is used to create the UPDATE statement. param: Connection $con The connection to use (specify Connection object to exert more control over transactions). return: int The number of affected rows (if supported by underlying database driver). |
doDeleteAll($con = null) X-Ref |
Method to DELETE all rows from the <?php echo $table->getName() ?> table. return: int The number of affected rows (if supported by underlying database driver). |
doDelete($values, $con = null) X-Ref |
Method perform a DELETE on the database, given a <?php echo $table->getPhpName() ?> or Criteria object OR a primary key value. param: mixed $values Criteria or <?php echo $table->getPhpName() ?> object or primary key which is used to create the DELETE statement param: Connection $con the connection to use return: int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows |
doOnDeleteCascade(Criteria $criteria, Connection $con) X-Ref |
This is a method for emulating ON DELETE CASCADE for DBs that don't support this feature (like MySQL or SQLite). This method is not very speedy because it must perform a query first to get the implicated records and then perform the deletes by calling those Peer classes. This method should be used within a transaction if possible. param: Criteria $criteria param: Connection $con return: int The number of affected rows (if supported by underlying database driver). |
doOnDeleteSetNull(Criteria $criteria, Connection $con) X-Ref |
This is a method for emulating ON DELETE SET NULL DBs that don't support this feature (like MySQL or SQLite). This method is not very speedy because it must perform a query first to get the implicated records and then perform the deletes by calling those Peer classes. This method should be used within a transaction if possible. param: Criteria $criteria param: Connection $con return: void |
doValidate(<?php echo $table->getPhpName() X-Ref |
Validates all modified columns of given <?php echo $table->getPhpName()?> object. If parameter $columns is either a single column name or an array of column names than only those columns are validated. NOTICE: This does not apply to primary or foreign keys for now. param: <?php echo $table->getPhpName()?> $obj The object to validate. param: mixed $cols Column name or array of column names. return: mixed TRUE if all columns are valid or the error message of the first invalid column. |
doSelectJoin({if ($c->getDbName() X-Ref |
Pas de description |
doSelectJoinAll(Criteria $c, $con = null) X-Ref |
Selects a collection of <?php echo $className ?> objects pre-filled with all related objects. return: array Array of <?php echo $className ?> objects. |
doSelectJoinAllExcept({if ($c->getDbName() X-Ref |
Selects a collection of <?php echo $className ?> objects pre-filled with all related objects except <?php echo $excludeString ?>. return: array Array of <?php echo $className ?> objects. |
getTableMap() X-Ref |
Returns the TableMap related to this peer. This method is not needed for general use but a specific application could have a need. return: TableMap |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |