Connection

Connection for dynamic version of libpq

Constructors

this
this(DynamicLoader dl, T args)

Members

Mixins

__anonymous
mixin ConnectionMethods
Undocumented in source.

Variables

dynamicLoader
DynamicLoader dynamicLoader;
Undocumented in source.

Mixed In Members

From mixin ConnectionMethods

conn
PGconn* conn;
Undocumented in source.
~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()

Try to cancel query

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)

Meta