Connection
class Connection {
PGconn* conn;
}
- this
this(string connString)
Makes a new connection to the database server
- this
this(ConnectionStart, string connString)
Starts creation of a connection to the database server in a nonblocking manner
A destructor is present on this object, but not explicitly documented in the source.
- cancel
void cancel()
- consumeInput
void consumeInput()
If input is available from the server, consume it
- createResultContainer
immutable(ResultContainer) createResultContainer(immutable PGresult* r)
Get result after PQexec* functions or throw exception if pull is empty
- dbName
string dbName()
- errorMessage
string errorMessage()
Returns the error message most recently generated by an operation on the connection
- escapeIdentifier
string escapeIdentifier(string msg)
- escapeLiteral
string escapeLiteral(string msg)
- getResult
immutable(Result) getResult()
Get next result after sending a non-blocking commands. Can return null.
- host
string host()
- isBusy
bool isBusy()
- isNonBlocking
bool isNonBlocking()
Returns the blocking status of the database connection
- parameterStatus
string parameterStatus(string paramName)
- poll
PostgresPollingStatusType poll()
Useful only for non-blocking operations.
- 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
- protocolVersion
int protocolVersion()
- resetPoll
PostgresPollingStatusType resetPoll()
Useful only for non-blocking operations.
- resetStart
void resetStart()
Begin reset the communication channel to the server, in a nonblocking manner
- serverVersion
int serverVersion()
- setClientEncoding
void setClientEncoding(string encoding)
- setNoticeProcessor
PQnoticeProcessor setNoticeProcessor(PQnoticeProcessor proc, void* arg)
Sets or examines the current notice processor
- setSingleRowMode
bool setSingleRowMode()
Select single-row mode for the currently-executing query
- socket
Socket socket()
Obtains std.socket.Socket of the connection to the server
- status
ConnStatusType status()
Returns the status of the connection
- trace
void trace(ref File stream)
- untrace
void untrace()
Connection