Sitellite Application Framework
Class Tree         Index         All Elements

Class: PgSQL_Driver

Source Location: Program_Root/Database/Driver/PgSQL.php

Class Overview


PgSQL_Driver provides all of the PgSQL-specific functionality for Database objects. It is accessed through the Database class API.


Author(s)

Version

  • 1.2, 2002-07-16, $Id: PgSQL.php,v 1.2 2005/07/06 15:30:56 lux Exp $

Copyright

  • Copyright (C) 2001-2003, Simian Systems Inc.

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 328]
PgSQL_Driver provides all of the PgSQL-specific functionality for Database objects. It is accessed through the Database class API.

New in 1.2:

  • Added a close() method.

1 <?php
2
3 $db = new PgSQL_Driver ("name", "host", "user", "pass", 1);
4
5 if ($db->connection) {
6 // connection worked
7 } else {
8 // connection failed
9 }
10
11 ?>




Tags:

access:  public
version:  1.2, 2002-07-16, $Id: PgSQL.php,v 1.2 2005/07/06 15:30:56 lux Exp $
license:  http://www.sitellite.org/index/license
copyright:  Copyright (C) 2001-2003, Simian Systems Inc.
author:  John Luxford <mailto:lux@simian.ca>


[ Top ]


Class Variables

$connection =

[line 335]

Contains the database connection resource.



Tags:

access:  public

Type:   mixed


[ Top ]

$host =

[line 351]

Contains the name of the database host.



Tags:

access:  public

Type:   mixed


[ Top ]

$name =

[line 343]

Contains the name of the database being used.



Tags:

access:  public

Type:   mixed


[ Top ]

$pass =

[line 367]

Contains the password used to connect to the current database.



Tags:

access:  public

Type:   mixed


[ Top ]

$persistent =

[line 376]

A 1 or 0 (true or false, and true by default), specifying whether to establish a persistent connection or not.



Tags:

access:  public

Type:   mixed


[ Top ]

$user =

[line 359]

Contains the username used to connect to the current database.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor PgSQL_Driver [line 389]

PgSQL_Driver PgSQL_Driver( [string $name = ""], [string $host = ""], [string $user = ""], [string $pass = ""], [boolean $persistent = 1])

Constructor method.



Tags:

access:  public


Parameters:

string   $name  
string   $host  
string   $user  
string   $pass  
boolean   $persistent  

[ Top ]

method close [line 435]

boolean close( )

Disconnects from the database. This method is usually unnecessary since connections should be automatically terminated or should persist after the script finishes executing, depending on your settings.



Tags:

access:  public


[ Top ]

method connect [line 404]

void connect( )

Establishes a connection with the database



Tags:

access:  public


[ Top ]

method createSequence [line 494]

void createSequence( mixed $seq_name)



[ Top ]

method dropSequence [line 502]

void dropSequence( mixed $seq_name)



[ Top ]

method getTables [line 453]

array getTables( mixed &$db)

Retrieves a list of tables in the database and places them in the $tables property, which is an array. Returns the list of names on success and false on failure.



Tags:

access:  public


[ Top ]

method nextId [line 507]

void nextId( mixed $seq_name)



[ Top ]

method query [line 422]

object query( [string $sql = ""])

Creates and returns a Query object.

$sql is the SQL query you wish to execute with this object.




Tags:

access:  public


Parameters:

string   $sql  

[ Top ]

method quote [line 476]

void quote( [mixed $str = null])



[ Top ]

method raiseError [line 471]

void raiseError( mixed $msg)



[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:18:40 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2