| java.lang.Object com.caucho.quercus.module.AbstractQuercusModule com.caucho.quercus.lib.db.PostgresModule
Method Summary | |
public String[] | getLoadedExtensions() Returns true for the postgres extension. | public static int | pg_affected_rows(Env env, PostgresResult result) | public static boolean | pg_cancel_query(Env env, Postgres conn) | public static String | pg_client_encoding(Env env, Postgres conn) | public static boolean | pg_close(Env env, Postgres conn) | public static int | pg_cmdtuples(Env env, PostgresResult result) pg_affected_rows() alias. | public static Postgres | pg_connect(Env env, 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, String tableName, ArrayValue assocArray, int options) | public static boolean | pg_copy_from(Env env, Postgres conn, String tableName, ArrayValue rows, String delimiter, String nullAs) | public static ArrayValue | pg_copy_to(Env env, Postgres conn, String tableName, String delimiter, String nullAs) | public static String | pg_dbname(Env env, Postgres conn) | public static boolean | pg_delete(Env env, Postgres conn, String tableName, ArrayValue assocArray, int options) | public static boolean | pg_end_copy(Env env, Postgres conn) | public static String | pg_errormessage(Env env, Postgres conn) pg_last_error() alias. | public static StringValue | pg_escape_bytea(Env env, StringValue data) | public static StringValue | pg_escape_bytea(Env env, Postgres conn, StringValue data) Escape a string for insertion into a bytea field. | public static StringValue | pg_escape_string(Env env, StringValue data) | public static PostgresResult | pg_exec(Env env, Postgres conn, String query) | public static PostgresResult | pg_execute(Env env, Postgres conn, String stmtName, ArrayValue params) | public static ArrayValue | pg_fetch_all(Env env, PostgresResult result) | public static ArrayValue | pg_fetch_all_columns(Env env, PostgresResult result, int column) | public static ArrayValue | pg_fetch_array(Env env, PostgresResult result, Value row, int resultType) | public static ArrayValue | 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 ArrayValue | 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 Value | pg_field_name(Env env, PostgresResult result, int fieldNumber) | public static int | pg_field_num(Env env, PostgresResult result, String fieldName) | public static int | pg_field_prtlen(Env env, PostgresResult result, Value rowNumber, Value fieldNameOrNumber) | public static LongValue | pg_field_size(Env env, PostgresResult result, int fieldNumber) | public static String | pg_field_table(Env env, PostgresResult result, int fieldNumber, boolean oidOnly) | public static StringValue | pg_field_type(Env env, PostgresResult result, int fieldNumber) | public static LongValue | pg_field_type_oid(Env env, PostgresResult result, int fieldNumber) | public static LongValue | pg_fieldisnull(Env env, PostgresResult result, Value row, Value fieldNameOrNumber) pg_field_is_null() alias. | public static Value | pg_fieldname(Env env, PostgresResult result, int fieldNumber) pg_field_name() alias. | public static int | pg_fieldnum(Env env, PostgresResult result, String fieldName) pg_field_num() alias. | public static int | pg_fieldprtlen(Env env, PostgresResult result, Value rowNumber, Value fieldNameOrNumber) pg_field_ptrlen() alias. | public static LongValue | pg_fieldsize(Env env, PostgresResult result, int fieldNumber) pg_field_size() alias. | public static StringValue | pg_fieldtype(Env env, PostgresResult result, int fieldNumber) pg_field_type() alias. | public static boolean | pg_free_result(Env env, PostgresResult result) | public static boolean | pg_freeresult(Env env, PostgresResult result) pg_free_result() alias. | public static ArrayValue | pg_get_notify(Env env, Postgres conn, int resultType) | public static int | pg_get_pid(Env env, Postgres conn) | public static PostgresResult | pg_get_result(Env env, Postgres conn) | public static String | pg_getlastoid(Env env, PostgresResult result) | public static String | pg_host(Env env, Postgres conn) | public static boolean | pg_insert(Env env, Postgres conn, String tableName, ArrayValue assocArray, int options) | public static String | pg_last_error(Env env, Postgres conn) | public static String | pg_last_notice(Env env, Postgres conn) | public static String | pg_last_oid(Env env, PostgresResult result) Returns the last row's OID
Note that:
- OID is a unique id. | public static boolean | pg_lo_close(Env env, Object largeObject) | public static LongValue | pg_lo_create(Env env, Postgres conn) | public static boolean | pg_lo_export(Env env, Postgres conn, int oid, Path path) | public static LongValue | pg_lo_import(Env env, Postgres conn, Path path) | public static Object | pg_lo_open(Env env, Postgres conn, int oid, String mode) | public static StringValue | pg_lo_read(Env env, Object largeObject, int len) | public static LongValue | pg_lo_read_all(Env env, Object largeObject) | public static boolean | pg_lo_seek(Env env, Object largeObject, int offset, int whence) | public static int | pg_lo_tell(Env env, Object largeObject) | public static boolean | pg_lo_unlink(Env env, Postgres conn, int oid) | public static LongValue | pg_lo_write(Env env, Object largeObject, String data, int len) | public static boolean | pg_loclose(Env env, Object largeObject) pg_lo_close() alias. | public static LongValue | pg_locreate(Env env, Postgres conn) | public static boolean | pg_loexport(Env env, Postgres conn, int oid, Path path) pg_lo_export() alias. | public static LongValue | pg_loimport(Env env, Postgres conn, Path path) pg_lo_import() alias. | public static Object | pg_loopen(Env env, Postgres conn, int oid, String mode) pg_lo_open() alias. | public static StringValue | pg_loread(Env env, Object largeObject, int len) pg_lo_read() alias. | public static LongValue | pg_loreadall(Env env, Object largeObject) pg_lo_read_all() alias. | public static boolean | pg_lounlink(Env env, Postgres conn, int oid) pg_lo_unlink() alias. | public static LongValue | pg_lowrite(Env env, Object largeObject, String data, int len) pg_lo_write() alias. | public static ArrayValue | pg_meta_data(Env env, Postgres conn, String tableName) | public static int | pg_num_fields(Env env, PostgresResult result) | public static LongValue | pg_num_rows(Env env, PostgresResult result) | public static int | pg_numfields(Env env, PostgresResult result) pg_num_fields() alias. | public static LongValue | pg_numrows(Env env, PostgresResult result) pg_num_rows() alias. | public static 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, String connectionString, int connectType) | public static boolean | pg_ping(Env env, Postgres conn) | public static StringValue | pg_port(Env env, Postgres conn) | public static PostgresStatement | pg_prepare(Env env, Postgres conn, String stmtName, String query) | public static boolean | pg_put_line(Env env, Postgres conn, String data) | public static PostgresResult | pg_query(Env env, String query) | public static PostgresResult | pg_query(Env env, Postgres conn, String query) | public static PostgresResult | pg_query_params(Env env, Postgres conn, String query, ArrayValue params) | public static Value | pg_result(Env env, PostgresResult result, Value row, Value fieldNameOrNumber) | public static String | pg_result_error(Env env, PostgresResult result) | public static Value | pg_result_error_field(Env env, PostgresResult result, int fieldCode) | 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, String tableName, ArrayValue assocArray, int options) | public static boolean | pg_send_execute(Env env, Postgres conn, String stmtName, ArrayValue params) | public static boolean | pg_send_prepare(Env env, Postgres conn, String stmtName, String query) | public static boolean | pg_send_query(Env env, Postgres conn, String query) | public static boolean | pg_send_query_params(Env env, Postgres conn, String query, ArrayValue params) | public static int | pg_set_client_encoding(Env env, Postgres conn, String encoding) | public static int | pg_set_error_verbosity(Env env, Postgres conn, int intVerbosity) | public static boolean | pg_trace(Env env, Path path, String mode, Postgres conn) | public static int | pg_transaction_status(Env env, Postgres conn) | public static String | pg_tty(Env env, Postgres conn) | public static String | pg_unescape_bytea(Env env, String data) | public static boolean | pg_untrace(Env env, Postgres conn) | public static boolean | pg_update(Env env, Postgres conn, String tableName, ArrayValue data, ArrayValue condition, int options) | public static String | pg_version(Env env, Postgres conn) |
PGSQL_ASSOC | final public static int PGSQL_ASSOC(Code) | | |
PGSQL_BAD_RESPONSE | final public static int PGSQL_BAD_RESPONSE(Code) | | |
PGSQL_BOTH | final public static int PGSQL_BOTH(Code) | | |
PGSQL_COMMAND_OK | final public static int PGSQL_COMMAND_OK(Code) | | |
PGSQL_CONNECTION_BAD | final public static int PGSQL_CONNECTION_BAD(Code) | | |
PGSQL_CONNECTION_OK | final public static int PGSQL_CONNECTION_OK(Code) | | |
PGSQL_CONNECT_FORCE_NEW | final public static int PGSQL_CONNECT_FORCE_NEW(Code) | | |
PGSQL_CONV_FORCE_NULL | final public static int PGSQL_CONV_FORCE_NULL(Code) | | |
PGSQL_CONV_IGNORE_DEFAULT | final public static int PGSQL_CONV_IGNORE_DEFAULT(Code) | | |
PGSQL_COPY_IN | final public static int PGSQL_COPY_IN(Code) | | |
PGSQL_COPY_OUT | final public static int PGSQL_COPY_OUT(Code) | | |
PGSQL_DIAG_CONTEXT | final public static int PGSQL_DIAG_CONTEXT(Code) | | |
PGSQL_DIAG_INTERNAL_POSITION | final public static int PGSQL_DIAG_INTERNAL_POSITION(Code) | | |
PGSQL_DIAG_INTERNAL_QUERY | final public static int PGSQL_DIAG_INTERNAL_QUERY(Code) | | |
PGSQL_DIAG_MESSAGE_DETAIL | final public static int PGSQL_DIAG_MESSAGE_DETAIL(Code) | | |
PGSQL_DIAG_MESSAGE_HINT | final public static int PGSQL_DIAG_MESSAGE_HINT(Code) | | |
PGSQL_DIAG_MESSAGE_PRIMARY | final public static int PGSQL_DIAG_MESSAGE_PRIMARY(Code) | | |
PGSQL_DIAG_SEVERITY | final public static int PGSQL_DIAG_SEVERITY(Code) | | |
PGSQL_DIAG_SOURCE_FILE | final public static int PGSQL_DIAG_SOURCE_FILE(Code) | | |
PGSQL_DIAG_SOURCE_FUNCTION | final public static int PGSQL_DIAG_SOURCE_FUNCTION(Code) | | |
PGSQL_DIAG_SOURCE_LINE | final public static int PGSQL_DIAG_SOURCE_LINE(Code) | | |
PGSQL_DIAG_SQLSTATE | final public static int PGSQL_DIAG_SQLSTATE(Code) | | |
PGSQL_DIAG_STATEMENT_POSITION | final public static int PGSQL_DIAG_STATEMENT_POSITION(Code) | | |
PGSQL_EMPTY_QUERY | final public static int PGSQL_EMPTY_QUERY(Code) | | |
PGSQL_ERRORS_DEFAULT | final public static int PGSQL_ERRORS_DEFAULT(Code) | | |
PGSQL_ERRORS_TERSE | final public static int PGSQL_ERRORS_TERSE(Code) | | |
PGSQL_ERRORS_VERBOSE | final public static int PGSQL_ERRORS_VERBOSE(Code) | | |
PGSQL_FATAL_ERROR | final public static int PGSQL_FATAL_ERROR(Code) | | |
PGSQL_NONFATAL_ERROR | final public static int PGSQL_NONFATAL_ERROR(Code) | | |
PGSQL_NUM | final public static int PGSQL_NUM(Code) | | |
PGSQL_SEEK_CUR | final public static int PGSQL_SEEK_CUR(Code) | | |
PGSQL_SEEK_END | final public static int PGSQL_SEEK_END(Code) | | |
PGSQL_SEEK_SET | final public static int PGSQL_SEEK_SET(Code) | | |
PGSQL_STATUS_LONG | final public static int PGSQL_STATUS_LONG(Code) | | |
PGSQL_STATUS_STRING | final public static int PGSQL_STATUS_STRING(Code) | | |
PGSQL_TRANSACTION_ACTIVE | final public static int PGSQL_TRANSACTION_ACTIVE(Code) | | |
PGSQL_TRANSACTION_IDLE | final public static int PGSQL_TRANSACTION_IDLE(Code) | | |
PGSQL_TRANSACTION_INERROR | final public static int PGSQL_TRANSACTION_INERROR(Code) | | |
PGSQL_TRANSACTION_INTRANS | final public static int PGSQL_TRANSACTION_INTRANS(Code) | | |
PGSQL_TRANSACTION_UNKNOWN | final public static int PGSQL_TRANSACTION_UNKNOWN(Code) | | |
PGSQL_TUPLES_OK | final public static int PGSQL_TUPLES_OK(Code) | | |
PostgresModule | public PostgresModule()(Code) | | Constructor
|
getLoadedExtensions | public String[] getLoadedExtensions()(Code) | | Returns true for the postgres extension.
|
pg_affected_rows | public static int pg_affected_rows(Env env, PostgresResult result)(Code) | | Returns number of affected records (tuples)
|
pg_cancel_query | public static boolean pg_cancel_query(Env env, Postgres conn)(Code) | | Cancel an asynchronous query
|
pg_close | public static boolean pg_close(Env env, Postgres conn)(Code) | | Closes a PostgreSQL connection
|
pg_connect | public static Postgres pg_connect(Env env, String connectionString, int connectionType)(Code) | | Open a PostgreSQL connection
|
pg_connection_busy | public static boolean pg_connection_busy(Env env, Postgres conn)(Code) | | Get connection is busy or not
|
pg_connection_reset | public static boolean pg_connection_reset(Env env, Postgres conn)(Code) | | Reset connection (reconnect)
|
pg_connection_status | public static int pg_connection_status(Env env, Postgres conn)(Code) | | Get connection status
|
pg_end_copy | public static boolean pg_end_copy(Env env, Postgres conn)(Code) | | Sync with PostgreSQL backend
|
pg_fetch_all_columns | public static ArrayValue pg_fetch_all_columns(Env env, PostgresResult result, int column)(Code) | | Fetches all rows in a particular result column as an array
|
pg_field_num | public static int pg_field_num(Env env, PostgresResult result, String fieldName)(Code) | | Returns the field number of the named field
the field number (0-based) or -1 on error |
pg_field_table | public static String pg_field_table(Env env, PostgresResult result, int fieldNumber, boolean oidOnly)(Code) | | Returns the name or oid of the tables field
By default the tables name that field belongs tois returned but if oid_only is set to TRUE,then the oid will instead be returned. |
pg_field_type_oid | public static LongValue pg_field_type_oid(Env env, PostgresResult result, int fieldNumber)(Code) | | Returns the type ID (OID) for the corresponding field number
|
pg_get_pid | public static int pg_get_pid(Env env, Postgres conn)(Code) | | Gets the backend's process ID
|
pg_host | public static String pg_host(Env env, Postgres conn)(Code) | | Returns the host name associated with the connection
|
pg_last_error | public static String pg_last_error(Env env, Postgres conn)(Code) | | Get the last error message string of a connection
|
pg_last_notice | public static String pg_last_notice(Env env, Postgres conn)(Code) | | Returns the last notice message from PostgreSQL server
|
pg_last_oid | public static String pg_last_oid(Env env, PostgresResult result)(Code) | | Returns the last row's OID
Note that:
- OID is a unique id. It will not work if the table was created with "No oid".
- MySql's "mysql_insert_id" receives the conection handler as argument but
PostgreSQL's "pg_last_oid" uses the result handler.
|
pg_lo_close | public static boolean pg_lo_close(Env env, Object largeObject)(Code) | | Close a large object
|
pg_lo_export | public static boolean pg_lo_export(Env env, Postgres conn, int oid, Path path)(Code) | | Export a large object to a file
|
pg_lo_read_all | public static LongValue pg_lo_read_all(Env env, Object largeObject)(Code) | | Reads an entire large object and send straight to browser
|
pg_lo_seek | public static boolean pg_lo_seek(Env env, Object largeObject, int offset, int whence)(Code) | | Seeks position within a large object
|
pg_lo_tell | public static int pg_lo_tell(Env env, Object largeObject)(Code) | | Returns current seek position a of large object
|
pg_lo_unlink | public static boolean pg_lo_unlink(Env env, Postgres conn, int oid)(Code) | | Delete a large object
|
pg_loclose | public static boolean pg_loclose(Env env, Object largeObject)(Code) | | pg_lo_close() alias.
|
pg_loexport | public static boolean pg_loexport(Env env, Postgres conn, int oid, Path path)(Code) | | pg_lo_export() alias.
|
pg_lounlink | public static boolean pg_lounlink(Env env, Postgres conn, int oid)(Code) | | pg_lo_unlink() alias.
|
pg_num_fields | public static int pg_num_fields(Env env, PostgresResult result)(Code) | | Returns the number of fields in a result
|
pg_options | public static String pg_options(Env env, Postgres conn)(Code) | | Get the options associated with the connection
|
pg_parameter_status | public static Value pg_parameter_status(Env env, StringValue paramName)(Code) | | Looks up a current parameter setting of the server
|
pg_pconnect | public static Postgres pg_pconnect(Env env, String connectionString, int connectType)(Code) | | Open a persistent PostgreSQL connection
|
pg_ping | public static boolean pg_ping(Env env, Postgres conn)(Code) | | Ping database connection
|
pg_put_line | public static boolean pg_put_line(Env env, Postgres conn, String data)(Code) | | Send a NULL-terminated string to PostgreSQL backend
|
pg_query_params | public static PostgresResult pg_query_params(Env env, Postgres conn, String query, ArrayValue params)(Code) | | Submits a command to the server and waits for the result,
with the ability to pass parameters separately from the SQL command text
|
pg_result_error_field | public static Value pg_result_error_field(Env env, PostgresResult result, int fieldCode)(Code) | | Returns an individual field of an error report
|
pg_result_seek | public static boolean pg_result_seek(Env env, PostgresResult result, int offset)(Code) | | Set internal row offset in result resource
|
pg_result_status | public static int pg_result_status(Env env, PostgresResult result, int type)(Code) | | Get status of query result
|
pg_send_execute | public static boolean pg_send_execute(Env env, Postgres conn, String stmtName, ArrayValue params)(Code) | | Sends a request to execute a prepared statement with given parameters,
without waiting for the result(s)
|
pg_send_prepare | public static boolean pg_send_prepare(Env env, Postgres conn, String stmtName, String query)(Code) | | Sends a request to create a prepared statement with the given parameters,
without waiting for completion
|
pg_send_query | public static boolean pg_send_query(Env env, Postgres conn, String query)(Code) | | Sends asynchronous query
|
pg_send_query_params | public static boolean pg_send_query_params(Env env, Postgres conn, String query, ArrayValue params)(Code) | | Submits a command and separate parameters to the server without waiting for the result(s)
|
pg_set_client_encoding | public static int pg_set_client_encoding(Env env, Postgres conn, String encoding)(Code) | | Set the client encoding
|
pg_set_error_verbosity | public static int pg_set_error_verbosity(Env env, Postgres conn, int intVerbosity)(Code) | | Determines the verbosity of messages returned by pg_last_error() and pg_result_error()
|
pg_trace | public static boolean pg_trace(Env env, Path path, String mode, Postgres conn)(Code) | | Enable tracing a PostgreSQL connection
|
pg_transaction_status | public static int pg_transaction_status(Env env, Postgres conn)(Code) | | Returns the current in-transaction status of the server
|
pg_unescape_bytea | public static String pg_unescape_bytea(Env env, String data)(Code) | | Unescape binary for bytea type
|
pg_untrace | public static boolean pg_untrace(Env env, Postgres conn)(Code) | | Disable tracing of a PostgreSQL connection
|
pg_version | public static String pg_version(Env env, Postgres conn)(Code) | | Returns an array with client, protocol and server version (when available)
|
|
|