Public Member Functions | |
__construct (Connection $conn) | |
Creates a new IdGenerator class, saves passed connection for use later by getId() method. | |
isBeforeInsert () | |
isAfterInsert () | |
getIdMethod () | |
getId ($unused=null) | |
Private Attributes | |
$conn | |
Connection object that instantiated this class. |
Definition at line 12 of file MSSQLIdGenerator.php.
MSSQLIdGenerator::__construct | ( | Connection $ | conn | ) |
Creates a new IdGenerator class, saves passed connection for use later by getId() method.
Connection | $conn |
Definition at line 22 of file MSSQLIdGenerator.php.
00023 { 00024 $this->conn = $conn; 00025 }
MSSQLIdGenerator::getId | ( | $ | unused = null |
) |
Implements IdGenerator.
Definition at line 54 of file MSSQLIdGenerator.php.
References ResultSet::FETCHMODE_NUM.
00055 { 00056 $rs = $this->conn->executeQuery("SELECT SCOPE_IDENTITY()", ResultSet::FETCHMODE_NUM); 00057 $rs->next(); 00058 return $rs->getInt(1); 00059 }
MSSQLIdGenerator::getIdMethod | ( | ) |
Implements IdGenerator.
Definition at line 46 of file MSSQLIdGenerator.php.
MSSQLIdGenerator::isAfterInsert | ( | ) |
Implements IdGenerator.
Definition at line 38 of file MSSQLIdGenerator.php.
MSSQLIdGenerator::isBeforeInsert | ( | ) |
Implements IdGenerator.
Definition at line 30 of file MSSQLIdGenerator.php.
MSSQLIdGenerator::$conn [private] |