Inherits Doctrine_Sequence.
Definition at line 33 of file Oracle.php.
| Doctrine_Sequence_Oracle::currId |
( |
|
$seqName | ) |
|
Returns the current id of a sequence
- Parameters
-
| string | $seqName | name of the sequence |
- Returns
- integer current id in the given sequence
Definition at line 89 of file Oracle.php.
{
$sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true);
$query = 'SELECT (last_number-1) FROM user_sequences';
$query .= ' WHERE sequence_name=' . $this->conn->quote($sequenceName, 'text');
$query .= ' OR sequence_name=' . $this->conn->quote(strtoupper($sequenceName), 'text');
return $this->conn->fetchOne($query);
}
| Doctrine_Connection_Module::getConnection |
( |
| ) |
|
|
inherited |
| Doctrine_Connection_Module::getModuleName |
( |
| ) |
|
|
inherited |
getModuleName returns the name of this module
- Returns
- string the name of this module
Definition at line 79 of file Module.php.
{
return $this->moduleName;
}
| Doctrine_Sequence::lastInsertId |
( |
|
$table = null, |
|
|
|
$field = null |
|
) |
| |
|
inherited |
Returns the autoincrement ID if supported or $id or fetches the current ID in a sequence called: $table.(empty($field) ? '' : '_'.$field)
- Parameters
-
| string | name of the table into which a new row was inserted |
| string | name of the field into which a new row was inserted |
Definition at line 57 of file Sequence.php.
| Doctrine_Sequence_Oracle::lastInsertID |
( |
|
$table = null, |
|
|
|
$field = null |
|
) |
| |
Returns the autoincrement ID if supported or $id or fetches the current ID in a sequence called: $table.(empty($field) ? '' : '_'.$field)
- Parameters
-
| string | name of the table into which a new row was inserted |
| string | name of the field into which a new row was inserted |
Definition at line 74 of file Oracle.php.
{
$seqName = $table . (empty($field) ? '' : '_'.$field);
$sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true);
return $this->conn->fetchOne('SELECT ' . $sequenceName . '.currval FROM DUAL');
}
| Doctrine_Sequence_Oracle::nextID |
( |
|
$seqName, |
|
|
|
$onDemand = true |
|
) |
| |
Returns the next free id of a sequence
- Parameters
-
| string | $seqName | name of the sequence |
| bool | onDemand when true missing sequences are automatic created |
- Returns
- integer next id in the given sequence
Definition at line 43 of file Oracle.php.
{
$sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true);
$query = 'SELECT ' . $sequenceName . '.nextval FROM DUAL';
try {
$result = $this->conn->fetchOne($query);
if ($onDemand && $e->
getPortableCode() == Doctrine_Core::ERR_NOSUCHTABLE) {
try {
$result = $this->conn->export->createSequence($seqName);
}
return $this->
nextId($seqName,
false);
} else {
}
}
return $result;
}
| Doctrine_Sequence::nextId |
( |
|
$seqName, |
|
|
|
$ondemand = true |
|
) |
| |
|
inherited |
Returns the next free id of a sequence
- Parameters
-
| string | $seqName | name of the sequence |
| bool | when true missing sequences are automatic created |
- Returns
- integer next id in the given sequence
- Exceptions
-
Definition at line 45 of file Sequence.php.
The documentation for this class was generated from the following file: