IdGenerator Class Reference

Inherited by OCI8IdGenerator.

List of all members.

Public Member Functions

Public Attributes


Member Function Documentation

IdGenerator::__construct ( Connection $conn )

 

Creates a new IdGenerator class, saves passed connection for use later by getId() method.
Parameters
Connection $conn

Reimplemented in OCI8IdGenerator.

IdGenerator::isBeforeInsert ( )

 

See also IdGenerator::isBeforeInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::isAfterInsert ( )

 

See also IdGenerator::isAfterInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::getIdMethod ( )

 

See also IdGenerator::getIdMethod()

Reimplemented in OCI8IdGenerator.

IdGenerator::getId ( $unused = null )

 

See also IdGenerator::getId()

Reimplemented in OCI8IdGenerator.

IdGenerator::__construct ( Connection $conn )

 

Creates a new IdGenerator class, saves passed connection for use later by getId() method.
Parameters
Connection $conn

Reimplemented in OCI8IdGenerator.

IdGenerator::isBeforeInsert ( )

 

See also IdGenerator::isBeforeInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::isAfterInsert ( )

 

See also IdGenerator::isAfterInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::getIdMethod ( )

 

See also IdGenerator::getIdMethod()

Reimplemented in OCI8IdGenerator.

IdGenerator::getId ( $unused = null )

 

See also IdGenerator::getId()

Reimplemented in OCI8IdGenerator.

IdGenerator::__construct ( Connection $conn )

 

Creates a new IdGenerator class, saves passed connection for use later by getId() method.
Parameters
Connection $conn

Reimplemented in OCI8IdGenerator.

IdGenerator::isBeforeInsert ( )

 

See also IdGenerator::isBeforeInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::isAfterInsert ( )

 

See also IdGenerator::isAfterInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::getIdMethod ( )

 

See also IdGenerator::getIdMethod()

Reimplemented in OCI8IdGenerator.

IdGenerator::getId ( $name = null )

 

See also IdGenerator::getId()

Reimplemented in OCI8IdGenerator.

IdGenerator::__construct ( Connection $conn )

 

Creates a new IdGenerator class, saves passed connection for use later by getId() method.
Parameters
Connection $conn

Reimplemented in OCI8IdGenerator.

IdGenerator::isBeforeInsert ( )

 

See also IdGenerator::isBeforeInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::isAfterInsert ( )

 

See also IdGenerator::isAfterInsert()

Reimplemented in OCI8IdGenerator.

IdGenerator::getIdMethod ( )

 

See also IdGenerator::getIdMethod()

Reimplemented in OCI8IdGenerator.

IdGenerator::getId ( $unused = null )

 

See also IdGenerator::getId()

Reimplemented in OCI8IdGenerator.

boolean IdGenerator::isBeforeInsert ( )

 

Convenience method that returns TRUE if id is generated before an INSERT statement. This is the same as checking whether the generator type is SEQUENCE.
Returns boolean TRUE if gen id method is SEQUENCE
See also getIdMethod()

Reimplemented in OCI8IdGenerator.

boolean IdGenerator::isAfterInsert ( )

 

Convenience method that returns TRUE if id is generated after an INSERT statement. This is the same as checking whether the generator type is AUTOINCREMENT.
Returns boolean TRUE if gen id method is AUTOINCREMENT
See also getIdMethod()

Reimplemented in OCI8IdGenerator.

int IdGenerator::getIdMethod ( )

 

Get the preferred type / style for generating ids for RDBMS.
Returns int SEQUENCE or AUTOINCREMENT

Reimplemented in OCI8IdGenerator.

int IdGenerator::getId ( $ keyInfo = null )

 

Get the autoincrement or sequence id given the current connection and any additional needed info (e.g. sequence name for sequences).

Note: if you take advantage of the fact that $keyInfo may not be specified you should make sure that your code is setup in such a way that it will be portable if you change from an RDBMS that uses AUTOINCREMENT to one that uses SEQUENCE (i.e. in which case you would need to specify sequence name).

Parameters
mixed $keyInfo Any additional information (e.g. sequence name) needed to fetch the id.

Returns int The last id / next id.

Reimplemented in OCI8IdGenerator.


Member Data Documentation

const IdGenerator::SEQUENCE = 1

 

SEQUENCE id generator type

const IdGenerator::AUTOINCREMENT = 2

 

AUTO INCREMENT id generator type


This file is part of the Creole[php5] library.


Copyright © 2004 Hans Lellelid  
Creole[php5] CVS