Doctrine 1.2.4
Doctrine_Sequence Class Reference

Inherits Doctrine_Connection_Module.

Inherited by Doctrine_Sequence_Db2, Doctrine_Sequence_Mssql, Doctrine_Sequence_Mysql, Doctrine_Sequence_Oracle, Doctrine_Sequence_Pgsql, and Doctrine_Sequence_Sqlite.

Public Member Functions

 currId ($seqName)
 
 getConnection ()
 
 getModuleName ()
 
 lastInsertId ($table=null, $field=null)
 
 nextId ($seqName, $ondemand=true)
 

Detailed Description

Definition at line 34 of file Sequence.php.

Member Function Documentation

Doctrine_Sequence::currId (   $seqName)

Returns the current id of a sequence

Parameters
string$seqNamename of the sequence
Returns
integer current id in the given sequence

Definition at line 69 of file Sequence.php.

{
$this->warnings[] = 'database does not support getting current
sequence value, the sequence value was incremented';
return $this->nextId($seqName);
}
Doctrine_Connection_Module::getConnection ( )
inherited

getConnection returns the connection object this module uses

Returns
Doctrine_Connection

Definition at line 68 of file Module.php.

{
return $this->conn;
}
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 
)

Returns the autoincrement ID if supported or $id or fetches the current ID in a sequence called: $table.(empty($field) ? '' : '_'.$field)

Parameters
stringname of the table into which a new row was inserted
stringname of the field into which a new row was inserted

Definition at line 57 of file Sequence.php.

{
throw new Doctrine_Sequence_Exception('method not implemented');
}
Doctrine_Sequence::nextId (   $seqName,
  $ondemand = true 
)

Returns the next free id of a sequence

Parameters
string$seqNamename of the sequence
boolwhen true missing sequences are automatic created
Returns
integer next id in the given sequence
Exceptions
Doctrine_Sequence_Exception

Definition at line 45 of file Sequence.php.

{
throw new Doctrine_Sequence_Exception('method not implemented');
}

The documentation for this class was generated from the following file: