Portal

Parameter tuple, bound to prepared statement

Members

Functions

bind
void bind(FormatCode[] resCodes = null)

bind empty, parameterless portal. resCodes are requested format codes of resulting columns, keep it null to request everything in text format.

bind
void bind(in Args args)

For the 'specs' array of prepared statement parameters types, known at compile-time, write Bind message to connection's write buffer from the representation of 'args' parameters, serialized to 'specs' types according to 'Serializer' template. Format codes of the response columns is set via 'resCodes' array, known at compile time.

bind
void bind(scope FR paramCodeRange, scope PR paramRange, scope RR returnCodeRange)

This version of bind accept generic InputRanges of format codes and field serializers and passes them directly to putBindMessage method of connection object. No parameter count and type validation is performed. If this portal is already bound and is a named one, Close message is posted.

bind
void bind(scope const(Nullable!string)[] args)

Simple portal bind, wich binds all parameters as strings and requests all result columns in text format.

ensureBindComplete
void ensureBindComplete()

poll message queue and make sure bind was completed

execute
void execute(bool describe = true, int maxRows = 0)

Send Describe+Execute command. If describe is false, no RowDescription message will be requested from PSQL - useful for optimistic statically-typed querying. 'maxRows' parameter is responsible for portal suspending and is conceptually inferior to simple TCP backpressure mechanisms or result set size limiting.

postCloseMessage
void postCloseMessage()

Write Close message to connection write buffer in order to explicitly destroy named portal.

Meta