public class PostgresModule extends AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
PostgresModule()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getLoadedExtensions()
Returns true for the postgres extension.
|
static int |
pg_affected_rows(Env env,
PostgresResult result)
Returns number of affected records (tuples)
|
static boolean |
pg_cancel_query(Env env,
Postgres conn)
Cancel an asynchronous query
|
static java.lang.String |
pg_client_encoding(Env env,
Postgres conn)
Gets the client encoding
|
static boolean |
pg_close(Env env,
Postgres conn)
Closes a PostgreSQL connection
|
static int |
pg_cmdtuples(Env env,
PostgresResult result)
pg_affected_rows() alias.
|
static Postgres |
pg_connect(Env env,
java.lang.String connectionString,
int connectionType)
Open a PostgreSQL connection
|
static boolean |
pg_connection_busy(Env env,
Postgres conn)
Get connection is busy or not
|
static boolean |
pg_connection_reset(Env env,
Postgres conn)
Reset connection (reconnect)
|
static int |
pg_connection_status(Env env,
Postgres conn)
Get connection status
|
static ArrayValue |
pg_convert(Env env,
Postgres conn,
java.lang.String tableName,
ArrayValue assocArray,
int options)
Convert associative array values into suitable for SQL statement
|
static boolean |
pg_copy_from(Env env,
Postgres conn,
java.lang.String tableName,
ArrayValue rows,
java.lang.String delimiter,
java.lang.String nullAs)
Insert records into a table from an array
|
static ArrayValue |
pg_copy_to(Env env,
Postgres conn,
java.lang.String tableName,
java.lang.String delimiter,
java.lang.String nullAs)
Copy a table to an array
|
static java.lang.String |
pg_dbname(Env env,
Postgres conn)
Get the database name
|
static boolean |
pg_delete(Env env,
Postgres conn,
java.lang.String tableName,
ArrayValue assocArray,
int options)
Deletes records
|
static boolean |
pg_end_copy(Env env,
Postgres conn)
Sync with PostgreSQL backend
|
static StringValue |
pg_errormessage(Env env,
Postgres conn)
pg_last_error() alias.
|
static StringValue |
pg_escape_bytea(Env env,
Postgres conn,
StringValue data)
Escape a string for insertion into a bytea field.
|
static StringValue |
pg_escape_bytea(Env env,
StringValue data)
Escape a string for insertion into a bytea field
|
static StringValue |
pg_escape_string(Env env,
StringValue data)
Escape a string for insertion into a text field
|
static PostgresResult |
pg_exec(Env env,
Postgres conn,
java.lang.String query)
pg_query() alias
|
static PostgresResult |
pg_execute(Env env,
Postgres conn,
java.lang.String stmtName,
ArrayValue params)
Sends a request to execute a prepared statement with given parameters,
and waits for the result
|
static ArrayValue |
pg_fetch_all_columns(Env env,
PostgresResult result,
LongValue column)
Fetches all rows in a particular result column as an array
|
static ArrayValue |
pg_fetch_all(Env env,
PostgresResult result)
Fetches all rows from a result as an array
|
static Value |
pg_fetch_array(Env env,
PostgresResult result,
Value row,
int resultType)
Fetch a row as an array
|
static Value |
pg_fetch_assoc(Env env,
PostgresResult result,
Value row)
Fetch a row as an associative array
|
static Value |
pg_fetch_object(Env env,
PostgresResult result,
Value row,
int resultType)
Fetch a row as an object
|
static Value |
pg_fetch_result(Env env,
PostgresResult result,
Value row,
Value fieldNameOrNumber)
Returns values from a result resource
|
static Value |
pg_fetch_row(Env env,
PostgresResult result,
Value row)
Get a row as an enumerated array
|
static LongValue |
pg_field_is_null(Env env,
PostgresResult result,
Value row,
Value fieldNameOrNumber)
Test if a field is SQL NULL
|
static Value |
pg_field_name(Env env,
PostgresResult result,
int fieldNumber)
Returns the name of a field
|
static int |
pg_field_num(Env env,
PostgresResult result,
java.lang.String fieldName)
Returns the field number of the named field
|
static int |
pg_field_prtlen(Env env,
PostgresResult result,
Value rowNumber,
Value fieldNameOrNumber)
Returns the printed length
|
static LongValue |
pg_field_size(Env env,
PostgresResult result,
int fieldNumber)
Returns the internal storage size of the named field
|
static java.lang.String |
pg_field_table(Env env,
PostgresResult result,
int fieldNumber,
boolean oidOnly)
Returns the name or oid of the tables field
|
static LongValue |
pg_field_type_oid(Env env,
PostgresResult result,
int fieldNumber)
Returns the type ID (OID) for the corresponding field number
|
static StringValue |
pg_field_type(Env env,
PostgresResult result,
int fieldNumber)
Returns the type name for the corresponding field number
|
static LongValue |
pg_fieldisnull(Env env,
PostgresResult result,
Value row,
Value fieldNameOrNumber)
pg_field_is_null() alias.
|
static Value |
pg_fieldname(Env env,
PostgresResult result,
int fieldNumber)
pg_field_name() alias.
|
static int |
pg_fieldnum(Env env,
PostgresResult result,
java.lang.String fieldName)
pg_field_num() alias.
|
static int |
pg_fieldprtlen(Env env,
PostgresResult result,
Value rowNumber,
Value fieldNameOrNumber)
pg_field_ptrlen() alias.
|
static LongValue |
pg_fieldsize(Env env,
PostgresResult result,
int fieldNumber)
pg_field_size() alias.
|
static StringValue |
pg_fieldtype(Env env,
PostgresResult result,
int fieldNumber)
pg_field_type() alias.
|
static boolean |
pg_free_result(Env env,
PostgresResult result)
Free result memory
|
static boolean |
pg_freeresult(Env env,
PostgresResult result)
pg_free_result() alias.
|
static ArrayValue |
pg_get_notify(Env env,
Postgres conn,
int resultType)
Gets SQL NOTIFY message
|
static int |
pg_get_pid(Env env,
Postgres conn)
Gets the backend's process ID
|
static PostgresResult |
pg_get_result(Env env,
Postgres conn)
Get asynchronous query result
|
static java.lang.String |
pg_getlastoid(Env env,
PostgresResult result) |
static java.lang.String |
pg_host(Env env,
Postgres conn)
Returns the host name associated with the connection
|
static boolean |
pg_insert(Env env,
Postgres conn,
java.lang.String tableName,
ArrayValue assocArray,
int options)
Insert array into table
|
static StringValue |
pg_last_error(Env env,
Postgres conn)
Get the last error message string of a connection
|
static java.lang.String |
pg_last_notice(Env env,
Postgres conn)
Returns the last notice message from PostgreSQL server
|
static java.lang.String |
pg_last_oid(Env env,
PostgresResult result)
Returns the last row's OID
Note that:
- OID is a unique id.
|
static boolean |
pg_lo_close(Env env,
java.lang.Object largeObject)
Close a large object
|
static LongValue |
pg_lo_create(Env env,
Postgres conn)
Create a large object
|
static boolean |
pg_lo_export(Env env,
Postgres conn,
int oid,
Path path)
Export a large object to a file
|
static LongValue |
pg_lo_import(Env env,
Postgres conn,
Path path)
Import a large object from file
|
static java.lang.Object |
pg_lo_open(Env env,
Postgres conn,
int oid,
java.lang.String mode)
Open a large object
|
static LongValue |
pg_lo_read_all(Env env,
java.lang.Object largeObject)
Reads an entire large object and send straight to browser
|
static StringValue |
pg_lo_read(Env env,
java.lang.Object largeObject,
int len)
Read a large object
|
static boolean |
pg_lo_seek(Env env,
java.lang.Object largeObject,
int offset,
int whence)
Seeks position within a large object
|
static int |
pg_lo_tell(Env env,
java.lang.Object largeObject)
Returns current seek position a of large object
|
static boolean |
pg_lo_unlink(Env env,
Postgres conn,
int oid)
Delete a large object
|
static LongValue |
pg_lo_write(Env env,
java.lang.Object largeObject,
java.lang.String data,
int len)
Write to a large object
|
static boolean |
pg_loclose(Env env,
java.lang.Object largeObject)
pg_lo_close() alias.
|
static LongValue |
pg_locreate(Env env,
Postgres conn)
pg_lo_create() alias
|
static boolean |
pg_loexport(Env env,
Postgres conn,
int oid,
Path path)
pg_lo_export() alias.
|
static LongValue |
pg_loimport(Env env,
Postgres conn,
Path path)
pg_lo_import() alias.
|
static java.lang.Object |
pg_loopen(Env env,
Postgres conn,
int oid,
java.lang.String mode)
pg_lo_open() alias.
|
static StringValue |
pg_loread(Env env,
java.lang.Object largeObject,
int len)
pg_lo_read() alias.
|
static LongValue |
pg_loreadall(Env env,
java.lang.Object largeObject)
pg_lo_read_all() alias.
|
static boolean |
pg_lounlink(Env env,
Postgres conn,
int oid)
pg_lo_unlink() alias.
|
static LongValue |
pg_lowrite(Env env,
java.lang.Object largeObject,
java.lang.String data,
int len)
pg_lo_write() alias.
|
static ArrayValue |
pg_meta_data(Env env,
Postgres conn,
java.lang.String tableName)
Get meta data for table
|
static int |
pg_num_fields(Env env,
PostgresResult result)
Returns the number of fields in a result
|
static LongValue |
pg_num_rows(Env env,
PostgresResult result)
Returns the number of rows in a result
|
static int |
pg_numfields(Env env,
PostgresResult result)
pg_num_fields() alias.
|
static LongValue |
pg_numrows(Env env,
PostgresResult result)
pg_num_rows() alias.
|
static java.lang.String |
pg_options(Env env,
Postgres conn)
Get the options associated with the connection
|
static Value |
pg_parameter_status(Env env,
Postgres conn,
StringValue paramName)
Looks up a current parameter setting of the server
|
static Value |
pg_parameter_status(Env env,
StringValue paramName)
Looks up a current parameter setting of the server
|
static Postgres |
pg_pconnect(Env env,
java.lang.String connectionString,
int connectType)
Open a persistent PostgreSQL connection
|
static boolean |
pg_ping(Env env,
Postgres conn)
Ping database connection
|
static StringValue |
pg_port(Env env,
Postgres conn)
Return the port number associated with the connection
|
static PostgresStatement |
pg_prepare(Env env,
Postgres conn,
java.lang.String stmtName,
java.lang.String query)
Submits a request to create a prepared statement with the given parameters,
and waits for completion
|
static boolean |
pg_put_line(Env env,
Postgres conn,
java.lang.String data)
Send a NULL-terminated string to PostgreSQL backend
|
static PostgresResult |
pg_query_params(Env env,
Postgres conn,
java.lang.String query,
ArrayValue params)
Submits a command to the server and waits for the result,
with the ability to pass parameters separately from the SQL command text
|
static PostgresResult |
pg_query(Env env,
Postgres conn,
java.lang.String query)
Execute a query
|
static PostgresResult |
pg_query(Env env,
java.lang.String query)
Execute a query
|
static Value |
pg_result_error_field(Env env,
PostgresResult result,
int fieldCode)
Returns an individual field of an error report
|
static java.lang.String |
pg_result_error(Env env,
PostgresResult result)
Get error message associated with result
|
static boolean |
pg_result_seek(Env env,
PostgresResult result,
int offset)
Set internal row offset in result resource
|
static int |
pg_result_status(Env env,
PostgresResult result,
int type)
Get status of query result
|
static Value |
pg_result(Env env,
PostgresResult result,
Value row,
Value fieldNameOrNumber)
Returns values from a result resource
|
static ArrayValue |
pg_select(Env env,
Postgres conn,
java.lang.String tableName,
ArrayValue assocArray,
int options)
Select records
|
static boolean |
pg_send_execute(Env env,
Postgres conn,
java.lang.String stmtName,
ArrayValue params)
Sends a request to execute a prepared statement with given parameters,
without waiting for the result(s)
|
static boolean |
pg_send_prepare(Env env,
Postgres conn,
java.lang.String stmtName,
java.lang.String query)
Sends a request to create a prepared statement with the given parameters,
without waiting for completion
|
static boolean |
pg_send_query_params(Env env,
Postgres conn,
java.lang.String query,
ArrayValue params)
Submits a command and separate parameters to the server
without waiting for the result(s)
|
static boolean |
pg_send_query(Env env,
Postgres conn,
java.lang.String query)
Sends asynchronous query
|
static int |
pg_set_client_encoding(Env env,
Postgres conn,
java.lang.String encoding)
Set the client encoding
|
static int |
pg_set_error_verbosity(Env env,
Postgres conn,
int intVerbosity)
Determines the verbosity of messages returned
by pg_last_error() and pg_result_error()
|
static boolean |
pg_trace(Env env,
Path path,
java.lang.String mode,
Postgres conn)
Enable tracing a PostgreSQL connection
|
static int |
pg_transaction_status(Env env,
Postgres conn)
Returns the current in-transaction status of the server
|
static java.lang.String |
pg_tty(Env env,
Postgres conn)
Return the TTY name associated with the connection
|
static java.lang.String |
pg_unescape_bytea(Env env,
java.lang.String data)
Unescape binary for bytea type
|
static boolean |
pg_untrace(Env env,
Postgres conn)
Disable tracing of a PostgreSQL connection
|
static boolean |
pg_update(Env env,
Postgres conn,
java.lang.String tableName,
ArrayValue data,
ArrayValue condition,
int options)
Update table
|
static ArrayValue |
pg_version(Env env,
Postgres conn)
Returns an array with client, protocol and server version (when available)
|
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions
public static final int PGSQL_ASSOC
public static final int PGSQL_NUM
public static final int PGSQL_BOTH
public static final int PGSQL_CONNECT_FORCE_NEW
public static final int PGSQL_CONNECTION_BAD
public static final int PGSQL_CONNECTION_OK
public static final int PGSQL_SEEK_SET
public static final int PGSQL_SEEK_CUR
public static final int PGSQL_SEEK_END
public static final int PGSQL_EMPTY_QUERY
public static final int PGSQL_COMMAND_OK
public static final int PGSQL_TUPLES_OK
public static final int PGSQL_COPY_OUT
public static final int PGSQL_COPY_IN
public static final int PGSQL_BAD_RESPONSE
public static final int PGSQL_NONFATAL_ERROR
public static final int PGSQL_FATAL_ERROR
public static final int PGSQL_TRANSACTION_IDLE
public static final int PGSQL_TRANSACTION_ACTIVE
public static final int PGSQL_TRANSACTION_INTRANS
public static final int PGSQL_TRANSACTION_INERROR
public static final int PGSQL_TRANSACTION_UNKNOWN
public static final int PGSQL_DIAG_SEVERITY
public static final int PGSQL_DIAG_SQLSTATE
public static final int PGSQL_DIAG_MESSAGE_PRIMARY
public static final int PGSQL_DIAG_MESSAGE_DETAIL
public static final int PGSQL_DIAG_MESSAGE_HINT
public static final int PGSQL_DIAG_STATEMENT_POSITION
public static final int PGSQL_DIAG_INTERNAL_POSITION
public static final int PGSQL_DIAG_INTERNAL_QUERY
public static final int PGSQL_DIAG_CONTEXT
public static final int PGSQL_DIAG_SOURCE_FILE
public static final int PGSQL_DIAG_SOURCE_LINE
public static final int PGSQL_DIAG_SOURCE_FUNCTION
public static final int PGSQL_ERRORS_TERSE
public static final int PGSQL_ERRORS_DEFAULT
public static final int PGSQL_ERRORS_VERBOSE
public static final int PGSQL_STATUS_LONG
public static final int PGSQL_STATUS_STRING
public static final int PGSQL_CONV_IGNORE_DEFAULT
public static final int PGSQL_CONV_FORCE_NULL
public java.lang.String[] getLoadedExtensions()
getLoadedExtensions
in interface QuercusModule
getLoadedExtensions
in class AbstractQuercusModule
public static int pg_affected_rows(Env env, PostgresResult result)
public static int pg_cmdtuples(Env env, PostgresResult result)
public static boolean pg_cancel_query(Env env, Postgres conn)
public static java.lang.String pg_client_encoding(Env env, Postgres conn)
public static Postgres pg_connect(Env env, java.lang.String connectionString, int connectionType)
public static boolean pg_connection_busy(Env env, Postgres conn)
public static boolean pg_connection_reset(Env env, Postgres conn)
public static int pg_connection_status(Env env, Postgres conn)
public static ArrayValue pg_convert(Env env, Postgres conn, java.lang.String tableName, ArrayValue assocArray, int options)
public static boolean pg_copy_from(Env env, Postgres conn, java.lang.String tableName, ArrayValue rows, java.lang.String delimiter, java.lang.String nullAs)
public static ArrayValue pg_copy_to(Env env, Postgres conn, java.lang.String tableName, java.lang.String delimiter, java.lang.String nullAs)
public static boolean pg_delete(Env env, Postgres conn, java.lang.String tableName, ArrayValue assocArray, int options)
public static StringValue pg_escape_bytea(Env env, StringValue data)
public static StringValue pg_escape_bytea(Env env, Postgres conn, StringValue data)
public static StringValue pg_escape_string(Env env, StringValue data)
public static PostgresResult pg_execute(Env env, Postgres conn, java.lang.String stmtName, ArrayValue params)
public static ArrayValue pg_fetch_all_columns(Env env, PostgresResult result, LongValue column)
public static ArrayValue pg_fetch_all(Env env, PostgresResult result)
public static Value pg_fetch_array(Env env, PostgresResult result, Value row, int resultType)
public static Value pg_fetch_assoc(Env env, PostgresResult result, Value row)
public static Value pg_fetch_object(Env env, PostgresResult result, Value row, int resultType)
public static Value pg_fetch_result(Env env, PostgresResult result, Value row, Value fieldNameOrNumber)
public static Value pg_result(Env env, PostgresResult result, Value row, Value fieldNameOrNumber)
public static Value pg_fetch_row(Env env, PostgresResult result, Value row)
public static LongValue pg_field_is_null(Env env, PostgresResult result, Value row, Value fieldNameOrNumber)
public static LongValue pg_fieldisnull(Env env, PostgresResult result, Value row, Value fieldNameOrNumber)
public static Value pg_field_name(Env env, PostgresResult result, int fieldNumber)
public static Value pg_fieldname(Env env, PostgresResult result, int fieldNumber)
public static int pg_field_num(Env env, PostgresResult result, java.lang.String fieldName)
public static int pg_fieldnum(Env env, PostgresResult result, java.lang.String fieldName)
public static int pg_field_prtlen(Env env, PostgresResult result, Value rowNumber, Value fieldNameOrNumber)
public static int pg_fieldprtlen(Env env, PostgresResult result, Value rowNumber, Value fieldNameOrNumber)
public static LongValue pg_field_size(Env env, PostgresResult result, int fieldNumber)
public static LongValue pg_fieldsize(Env env, PostgresResult result, int fieldNumber)
public static java.lang.String pg_field_table(Env env, PostgresResult result, int fieldNumber, boolean oidOnly)
public static LongValue pg_field_type_oid(Env env, PostgresResult result, int fieldNumber)
public static StringValue pg_field_type(Env env, PostgresResult result, int fieldNumber)
public static StringValue pg_fieldtype(Env env, PostgresResult result, int fieldNumber)
public static boolean pg_free_result(Env env, PostgresResult result)
public static boolean pg_freeresult(Env env, PostgresResult result)
public static ArrayValue pg_get_notify(Env env, Postgres conn, int resultType)
public static PostgresResult pg_get_result(Env env, Postgres conn)
public static java.lang.String pg_host(Env env, Postgres conn)
public static boolean pg_insert(Env env, Postgres conn, java.lang.String tableName, ArrayValue assocArray, int options)
public static StringValue pg_last_error(Env env, Postgres conn)
public static StringValue pg_errormessage(Env env, Postgres conn)
public static java.lang.String pg_last_notice(Env env, Postgres conn)
public static java.lang.String pg_last_oid(Env env, PostgresResult result)
public static java.lang.String pg_getlastoid(Env env, PostgresResult result)
public static boolean pg_lo_close(Env env, java.lang.Object largeObject)
public static boolean pg_loclose(Env env, java.lang.Object largeObject)
public static boolean pg_lo_export(Env env, Postgres conn, int oid, Path path)
public static boolean pg_loexport(Env env, Postgres conn, int oid, Path path)
public static LongValue pg_lo_import(Env env, Postgres conn, Path path)
public static LongValue pg_loimport(Env env, Postgres conn, Path path)
public static java.lang.Object pg_lo_open(Env env, Postgres conn, int oid, java.lang.String mode)
public static java.lang.Object pg_loopen(Env env, Postgres conn, int oid, java.lang.String mode)
public static LongValue pg_lo_read_all(Env env, java.lang.Object largeObject)
public static LongValue pg_loreadall(Env env, java.lang.Object largeObject)
public static StringValue pg_lo_read(Env env, java.lang.Object largeObject, int len)
public static StringValue pg_loread(Env env, java.lang.Object largeObject, int len)
public static boolean pg_lo_seek(Env env, java.lang.Object largeObject, int offset, int whence)
public static int pg_lo_tell(Env env, java.lang.Object largeObject)
public static boolean pg_lo_unlink(Env env, Postgres conn, int oid)
public static boolean pg_lounlink(Env env, Postgres conn, int oid)
public static LongValue pg_lo_write(Env env, java.lang.Object largeObject, java.lang.String data, int len)
public static LongValue pg_lowrite(Env env, java.lang.Object largeObject, java.lang.String data, int len)
public static ArrayValue pg_meta_data(Env env, Postgres conn, java.lang.String tableName)
public static int pg_num_fields(Env env, PostgresResult result)
public static int pg_numfields(Env env, PostgresResult result)
public static LongValue pg_num_rows(Env env, PostgresResult result)
public static LongValue pg_numrows(Env env, PostgresResult result)
public static java.lang.String pg_options(Env env, Postgres conn)
public static Value pg_parameter_status(Env env, Postgres conn, StringValue paramName)
public static Value pg_parameter_status(Env env, StringValue paramName)
public static Postgres pg_pconnect(Env env, java.lang.String connectionString, int connectType)
public static StringValue pg_port(Env env, Postgres conn)
public static PostgresStatement pg_prepare(Env env, Postgres conn, java.lang.String stmtName, java.lang.String query)
public static boolean pg_put_line(Env env, Postgres conn, java.lang.String data)
public static PostgresResult pg_query_params(Env env, Postgres conn, java.lang.String query, ArrayValue params)
public static PostgresResult pg_query(Env env, java.lang.String query)
public static PostgresResult pg_query(Env env, Postgres conn, java.lang.String query)
public static PostgresResult pg_exec(Env env, Postgres conn, java.lang.String query)
public static Value pg_result_error_field(Env env, PostgresResult result, int fieldCode)
public static java.lang.String pg_result_error(Env env, PostgresResult result)
public static boolean pg_result_seek(Env env, PostgresResult result, int offset)
public static int pg_result_status(Env env, PostgresResult result, int type)
public static ArrayValue pg_select(Env env, Postgres conn, java.lang.String tableName, ArrayValue assocArray, int options)
public static boolean pg_send_execute(Env env, Postgres conn, java.lang.String stmtName, ArrayValue params)
public static boolean pg_send_prepare(Env env, Postgres conn, java.lang.String stmtName, java.lang.String query)
public static boolean pg_send_query_params(Env env, Postgres conn, java.lang.String query, ArrayValue params)
public static boolean pg_send_query(Env env, Postgres conn, java.lang.String query)
public static int pg_set_client_encoding(Env env, Postgres conn, java.lang.String encoding)
public static int pg_set_error_verbosity(Env env, Postgres conn, int intVerbosity)
public static boolean pg_trace(Env env, Path path, java.lang.String mode, Postgres conn)
public static int pg_transaction_status(Env env, Postgres conn)
public static java.lang.String pg_tty(Env env, Postgres conn)
public static java.lang.String pg_unescape_bytea(Env env, java.lang.String data)
public static boolean pg_untrace(Env env, Postgres conn)
public static boolean pg_update(Env env, Postgres conn, java.lang.String tableName, ArrayValue data, ArrayValue condition, int options)
public static ArrayValue pg_version(Env env, Postgres conn)