Pub.PostgreSQL: Functions Types Modinfo Source  

PostgreSQL Database Interface

Functions

Function GetPostgreSQLDBDriver:ISQLDB(bConnect:Int,host:String,user:String,passwd:String,db:String=Null,port:Int=5432,extra_params:String="")
DescriptionGets an instance of the PostgreSQL database driver.
InformationPass bConnect as True to connect to the server automatically. Pass the returned value to SetISQLDBDriver to make this the global database driver.

Function PQclear(res:Int)
DescriptionFrees the storage associated with a PGresult.
InformationSee the PostgreSQL SDK manual for more information.

Function PQcmdTuples$z(res:Int)
InformationSee the PostgreSQL SDK manual for more information.

Function PQconnectdb(s$z)
DescriptionMakes a New connection To the database server.
InformationSee the PostgreSQL SDK manual for more information.

Function PQerrorMessage$z(conn:Int)
DescriptionReturns the error message most recently generated by an operation on the connection.
InformationSee the PostgreSQL SDK manual for more information.

Function PQescapeBytea:Byte Ptr(from$z,from_length:Int,to_length:Int Ptr)
DescriptionEscapes binary data for use within an SQL command with the type bytea.
InformationSee the PostgreSQL SDK manual for more information.

Function PQescapeString:Int(ptrTo:Byte Ptr,from$z,from_length:Int)
DescriptionEscapes a string for use within an SQL command.
InformationSee the PostgreSQL SDK manual for more information.

Function PQexec:Int(conn:Int, query_string$z)
DescriptionSubmits a command to the server and waits for the result.
InformationSee the PostgreSQL SDK manual for more information.

Function PQfinish(conn:Int)
DescriptionCloses an open PostgreSQL client connection.
InformationSee the PostgreSQL SDK manual for more information.

Function PQfname$z(res:Int,column_number:Int)
DescriptionReturns the column name associated with the given column number.
InformationSee the PostgreSQL SDK manual for more information.

Function PQfnumber:Int(res:Int,column_name$z)
DescriptionReturns the column number associated with the given column name.
InformationSee the PostgreSQL SDK manual for more information.

Function PQfreemem(dataptr:Byte Ptr)
DescriptionFrees the memory returned by PQescapeBytea and PQunescapeBytea.
InformationSee the PostgreSQL SDK manual for more information.

Function PQfsize:Int(res:Int,column_number:Int)
DescriptionReturns the size in bytes of the column associated with the given column number.
InformationSee the PostgreSQL SDK manual for more information.

Function PQgetisnull:Int(res:Int,row_number:Int,column_number:Int)
DescriptionTests a field for a null value.
InformationSee the PostgreSQL SDK manual for more information.

Function PQgetlength:Int(res:Int,row_number:Int,column_number:Int)
DescriptionReturns the actual length of a field value in bytes.
InformationSee the PostgreSQL SDK manual for more information.

Function PQgetvalue$z(res:Int,i:Int,n:Int)
DescriptionReturns a single field value of one row of a PGresult.
InformationSee the PostgreSQL SDK manual for more information.

Function PQnfields:Int(res:Int)
DescriptionReturns the number of columns (fields) in each row of the query result.
InformationSee the PostgreSQL SDK manual for more information.

Function PQntuples:Int(res:Int)
DescriptionReturns the number of rows (tuples) in the query result.
InformationSee the PostgreSQL SDK manual for more information.

Function PQoidStatus$z(res:Int)
DescriptionReturns a string with the OID of the inserted row.
InformationSee the PostgreSQL SDK manual for more information.

Function PQresultStatus:Int(res:Int)
DescriptionReturns the result status of the command.
InformationSee the PostgreSQL SDK manual for more information.

Function PQstatus:Int(conn:Int)
DescriptionReturns the status of the connection.
InformationSee the PostgreSQL SDK manual for more information.

Function PQunescapeBytea:Byte Ptr(from$z,to_length:Int Ptr)
DescriptionConverts an escaped string representation of binary data into binary data [mdash ] the reverse of PQescapeBytea.
InformationSee the PostgreSQL SDK manual for more information.

Types

Type IPostgreSQLDB Extends ISQLDB Abstract
DescriptionInterface for a PostgreSQL database connection.
Method escapeBinary:String(stmt:String) Abstract
DescriptionEscapes a binary string to make it compatible with the PostgreSQL query engine.
Method escapeString:String(stmt:String) Abstract
DescriptionEscapes a string to make it compatible with the PostgreSQL query engine.
Method getParams:String() Abstract
DescriptionGets the extra parameters passed in the connection string.
Method unescapeBinary:String(stmt:String) Abstract
DescriptionUnescapes a binary string.

Module Information

NameBlitzMax PostgreSQL Module v1.00
DescriptionBlitzMax module implementing client support for PostgreSQL
Licensefreebie
Authorsgman, original PostgreSQL imports by Chris Camacho
History2006/1/18 GG - intial release v1.00