Constructor Summary | |
---|---|
(PGconn* pgConn) Creates a new DPQConnect from a pq PGconn |
|
(char dbName) Creates a new database connection |
|
(String dbName) Creates a new database connection |
|
(String pghost, String pgport, String pgoptions, String pgtty, String dbName, String login, String pwd) Creates a new database connection |
Methods Summary | |
---|---|
public PGconn* |
getConn() Makes the PGconn public |
~this |
() Close the connect if still open |
bit |
valid() Test if this DPQConnec has a PGconn |
Statement |
getStatement() |
void |
dump() Prints the user valus to stdout |
static DPQConnect |
connectStart(String conninfo) make a new client connection to the backend Asynchronous (non-blocking) |
PostgresPollingStatusType |
connectPoll() connect poll |
static DPQConnect |
connectdb(String conninfo) connectDB Synchronous (blocking) |
static DPQConnect |
setdbLogin(String pghost, String pgport, String pgoptions, String pgtty, String dbName, String login, String pwd) setdbLogin |
static DPQConnect |
setdb(String pghost, String pgport, String pgoptions, String pgtty, String dbName) Sets the database to use |
int |
close() |
void |
finish() close the current connection and free the PGconn data structure |
PQconninfoOption* |
connDefaults() get info about connection options known to PQconnectdb \todo create object DPQConnectInto |
void |
connInfoFree(PQconninfoOption *connOptions) free the data structure returned by PQconndefaults() \todo create object DPQConnectInto |
int |
resetStart() close the current connection and restablish a new one with the same parameters Asynchronous (non-blocking) |
PostgresPollingStatusType |
resetPoll() reset Poll |
void |
reset() reset. |
bit |
requestCancel() Request that PostgreSQL abandon processing of the current command. |
String |
dbName() /* Accessor functions for PGconn objects get db name |
String |
user() get user name |
String |
pass() get pass |
String |
host() get host name |
String |
port() get port |
String |
tty() get tty |
String |
options() get options |
SQLStatus |
status() Gets the current status of this connection |
int |
subStatus() Gets the current status of this connection |
String |
errorMessage() Get this connection last error message |
String |
subErrorMessage() Get this connection last error message |
int |
socket() Obtain the file descriptor number for the backend connection socket. |
int |
backendPID() backendPID |
int |
clientEncoding() client encoding |
int |
setClientEncoding(String encoding) client encoding |
void |
trace(File file) Enable tracing |
void |
untreace() disable tracing |
void |
onNoticeProcess(void delegate(String)) Set a delegate to override default notice processor |
void |
delegate(String ) |
void |
dispatchNoticeProcessor(String message) Application can override this to receive notices or set a delegate by calling onNoticeProcessor |