Class PostgreSQLInsertQueryResult

Description

Implements interfaces:

The InsertQueryResult interface provides the functionality common to all INSERT query results.

For example, you can get the primary key for the last insertion, get number of inserted rows, etc.

  • version: $Id: PostgreSQLInsertQueryResult.class.php,v 1.1 2007/09/14 13:57:08 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/DBHandler/PostgreSQL/PostgreSQLInsertQueryResult.class.php (line 24)


	
			
Variable Summary
Method Summary
object A PostgreSQLInsertQueryResult (integer $resourceId, integer $lastId)
integer getNumberOfRows ()
Variables
integer $_lastAutoIncrementValue (line 42)

Gets the last auto increment value that was generated by the INSERT query.

Gets the last auto increment value that was generated by the INSERT query.

  • var: The last auto increment value that was generated by the INSERT query.
  • access: private
integer $_numberOfRows (line 50)

Stores the number of rows processed by the query.

Stores the number of rows processed by the query.

  • var: The number of rows processed by the query.
  • access: private
integer $_resourceId (line 34)

The resource id for this query.

  • var: __resourceId
  • access: private
Methods
Constructor PostgreSQLInsertQueryResult (line 60)

Creates a new PostgreSQLINSERTQueryResult object.

  • return: new PostgreSQLINSERTQueryResult object.
  • access: public
object A PostgreSQLInsertQueryResult (integer $resourceId, integer $lastId)
  • integer $resourceId: The resource id for this query.
  • integer $lastId: The last id that was inserted
getLastAutoIncrementValue (line 83)

Gets the last auto increment value that was generated by the INSERT query.

This is not a 100% reliable method. If somebody inserted something after the insert query but before the InsertQueryResult object was created, then this method could return an invalid value.

  • return: The last auto increment value that was generated by the INSERT query.
  • access: public
integer getLastAutoIncrementValue ()
getNumberOfRows (line 102)

Returns the number of rows that the query processed.

Returns the number of rows that the query processed. For a SELECT query, this would be the total number of rows selected. For a DELETE, UPDATE, or INSERT query, this would be the number of rows that were affected.

  • return: Number of rows that were processed by the query.
  • access: public
integer getNumberOfRows ()

Documentation generated on Wed, 19 Sep 2007 10:25:33 -0400 by phpDocumentor 1.3.0RC3