- conn
PGconn* conn;
Undocumented in source.
- this
this(string connString)
this(string[string] keyValueParams)
Makes a new connection to the database server
- this
this(ConnectionStart , string connString)
this(ConnectionStart , string[string] keyValueParams)
Starts creation of a connection to the database server in a nonblocking manner
- ~this
~this()
Undocumented in source.
- __anonymous
mixin Queries
Undocumented in source.
- isNonBlocking
bool isNonBlocking()
Returns the blocking status of the database connection
- resetStart
void resetStart()
Begin reset the communication channel to the server, in a nonblocking manner
- poll
PostgresPollingStatusType poll()
Useful only for non-blocking operations.
- resetPoll
PostgresPollingStatusType resetPoll()
Useful only for non-blocking operations.
- status
ConnStatusType status()
Returns the status of the connection
- transactionStatus
PGTransactionStatusType transactionStatus()
Returns the current in-transaction status of the server.
The status can be:
* PQTRANS_IDLE - currently idle
* PQTRANS_ACTIVE - a command is in progress (reported only when a query has been sent to the server and not yet completed)
* PQTRANS_INTRANS - idle, in a valid transaction block
* PQTRANS_INERROR - idle, in a failed transaction block
* PQTRANS_UNKNOWN - reported if the connection is bad
- consumeInput
void consumeInput()
If input is available from the server, consume it
- flush
bool flush()
Undocumented in source. Be warned that the author may not have intended to support it.
- posixSocket
int posixSocket()
Obtains the file descriptor number of the connection socket to the server
- posixSocketDuplicate
socket_t posixSocketDuplicate()
Obtains duplicate file descriptor number of the connection socket to the server
- socket
Socket socket()
Obtains std.socket.Socket of the connection to the server
- errorMessage
string errorMessage()
Returns the error message most recently generated by an operation on the connection
- setNoticeProcessor
PQnoticeProcessor setNoticeProcessor(PQnoticeProcessor proc, void* arg)
Sets or examines the current notice processor
- getResult
immutable(Result) getResult()
Get next result after sending a non-blocking commands. Can return null.
- createResultContainer
immutable(ResultContainer) createResultContainer(PGresult* r)
Get result after PQexec* functions or throw exception if pull is empty
- setSingleRowMode
bool setSingleRowMode()
Select single-row mode for the currently-executing query
- cancel
void cancel()
- isBusy
bool isBusy()
- parameterStatus
string parameterStatus(string paramName)
- escapeLiteral
string escapeLiteral(string msg)
- escapeIdentifier
string escapeIdentifier(string msg)
- dbName
string dbName()
- host
string host()
- protocolVersion
int protocolVersion()
- serverVersion
int serverVersion()
- trace
void trace(File stream)
- untrace
void untrace()
- setClientEncoding
void setClientEncoding(string encoding)
Connection