[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 945 lignes (32 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
BasePeer:: (14 méthodes):
getFieldnames()
translateFieldname()
doDelete()
doDeleteAll()
doInsert()
doUpdate()
doSelect()
doValidate()
getPrimaryKey()
createSelectSql()
buildParams()
populateStmtValues()
getValidator()
getMapBuilder()
getFieldnames($classname, $type = self::TYPE_PHPNAME) X-Ref |
num type simply the numerical array index, e.g. 4 |
translateFieldname($classname, $fieldname, $fromType, $toType) X-Ref |
Pas de description |
doDelete(Criteria $criteria, Connection $con) X-Ref |
Method to perform deletes based on values and keys in a Criteria. param: Criteria $criteria The criteria to use. param: Connection $con A Connection. return: int The number of rows affected by last statement execution. For most |
doDeleteAll($tableName, Connection $con) X-Ref |
Method to deletes all contents of specified table. This method is invoked from generated Peer classes like this: <code> public static function doDeleteAll($con = null) { if ($con === null) $con = Propel::getConnection(self::DATABASE_NAME); BasePeer::doDeleteAll(self::TABLE_NAME, $con); } </code> param: string $tableName The name of the table to empty. param: Connection $con A Connection. return: int The number of rows affected by the statement. Note |
doInsert(Criteria $criteria, Connection $con) X-Ref |
Method to perform inserts based on values and keys in a Criteria. <p> If the primary key is auto incremented the data in Criteria will be inserted and the auto increment value will be returned. <p> If the primary key is included in Criteria then that value will be used to insert the row. <p> If no primary key is included in Criteria then we will try to figure out the primary key from the database map and insert the row with the next available id using util.db.IDBroker. <p> If no primary key is defined for the table the values will be inserted as specified in Criteria and null will be returned. param: Criteria $criteria Object containing values to insert. param: Connection $con A Connection. return: mixed The primary key for the new row if (and only if!) the primary key |
doUpdate(Criteria $selectCriteria, Criteria $updateValues, Connection $con) X-Ref |
Method used to update rows in the DB. Rows are selected based on selectCriteria and updated using values in updateValues. <p> Use this method for performing an update of the kind: <p> WHERE some_column = some value AND could_have_another_column = another value AND so on. param: $selectCriteria A Criteria object containing values used in where param: $updateValues A Criteria object containing values used in set param: $con The Connection to use. return: int The number of rows affected by last update statement. For most |
doSelect(Criteria $criteria, $con = null) X-Ref |
Executes query build by createSelectSql() and returns ResultSet. param: Criteria $criteria A Criteria. param: Connection $con A connection to use. return: ResultSet The resultset. |
doValidate($dbName, $tableName, $columns) X-Ref |
Applies any validators that were defined in the schema to the specified columns. param: string $dbName The name of the database param: string $tableName The name of the table param: array $columns Array of column names as key and column values as value. |
getPrimaryKey(Criteria $criteria) X-Ref |
Helper method which returns the primary key contained in the given Criteria object. param: Criteria $criteria A Criteria. return: ColumnMap If the Criteria object contains a primary |
createSelectSql(Criteria $criteria, &$params) X-Ref |
Method to create an SQL query based on values in a Criteria. This method creates only prepared statement SQL (using ? where values will go). The second parameter ($params) stores the values that need to be set before the statement is executed. The reason we do it this way is to let the Creole layer handle all escaping & value formatting. param: Criteria $criteria Criteria for the SELECT query. param: array &$params Parameters that are to be replaced in prepared statement. return: string |
buildParams($columns, Criteria $values) X-Ref |
Builds a params array, like the kind populated by Criterion::appendPsTo(). This is useful for building an array even when it is not using the appendPsTo() method. param: array $columns param: Criteria $values return: array params array('column' => ..., 'table' => ..., 'value' => ...) |
populateStmtValues($stmt, $params, DatabaseMap $dbMap) X-Ref |
Populates values in a prepared statement. param: PreparedStatement $stmt param: array $params array('column' => ..., 'table' => ..., 'value' => ...) param: DatabaseMap $dbMap return: int The number of params replaced. |
getValidator($classname) X-Ref |
This function searches for the given validator $name under propel/validator/$name.php, imports and caches it. param: string $classname The dot-path name of class (e.g. myapp.propel.MyValidator) return: Validator object or null if not able to instantiate validator class (and error will be logged in this case) |
getMapBuilder($classname) X-Ref |
This method returns the MapBuilder specified in the name parameter. You should pass in the full dot-path path to the class, ie: myapp.propel.MyMapMapBuilder. The MapBuilder instances are cached in this class for speed. param: string $classname The dot-path name of class (e.g. myapp.propel.MyMapBuilder) return: MapBuilder or null (and logs the error) if the MapBuilder was not found. |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |