PreparedImpl

This is the internal implementation of Prepared. It is not intended to be used directly, as Prepared wraps a PreparedImpl with RefCounted, and offers access to the public PreparedImpl members via "alias this".

struct PreparedImpl {}

Constructors

this
this(Connection conn, string sql)

Submit an SQL command to the server to be compiled into a prepared statement.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Aliases

queryResult
deprecated alias queryResult = querySet

Execute a prepared SQL SELECT command where you expect the entire result set all at once.

querySequence
deprecated alias querySequence = query

Execute a prepared SQL SELECT command where you want to deal with the result set one row at a time.

queryTuple
deprecated alias queryTuple = queryRowTuple

Execute a prepared SQL SELECT command where you only want the first Row, and place result values into a set of D variables.

Functions

exec
ulong exec()

Execute a prepared command, such as INSERT/UPDATE/CREATE/etc.

execQueryImpl2
bool execQueryImpl2(ulong ra)
Undocumented in source. Be warned that the author may not have intended to support it.
getArg
Variant getArg(size_t index)

Prepared statement parameter getter.

query
ResultRange query(ColumnSpecialization[] csa)

Execute a prepared SQL SELECT command where you want to deal with the result set one row at a time.

queryRow
Nullable!Row queryRow(ColumnSpecialization[] csa)

Execute a prepared SQL SELECT command where you only want the first Row (if any).

queryRowTuple
void queryRowTuple(T args)

Execute a prepared SQL SELECT command where you only want the first Row, and place result values into a set of D variables.

querySet
ResultSet querySet(ColumnSpecialization[] csa)

Execute a prepared SQL SELECT command where you expect the entire result set all at once.

queryValue
Nullable!Variant queryValue(ColumnSpecialization[] csa)

Execute a prepared SQL SELECT command and returns a single value, the first column of the first row received.

release
void release()

Release a prepared statement.

setArg
void setArg(size_t index, T val, ParameterSpecialization psn)

Prepared statement parameter setter.

setArg
void setArg(size_t index, Nullable!T val, ParameterSpecialization psn)
Undocumented in source. Be warned that the author may not have intended to support it.
setArgs
void setArgs(T args)

Bind a tuple of D variables to the parameters of a prepared statement.

setArgs
void setArgs(Variant[] va, ParameterSpecialization[] psnList)

Bind a Variant[] as the parameters of a prepared statement.

setNullArg
void setNullArg(size_t index)

Sets a prepared statement parameter to NULL.

sql
string sql()

Gets the SQL command for this prepared statement

Properties

isReleased
bool isReleased [@property getter]

Has this statement been released?

numArgs
ushort numArgs [@property getter]

Gets the number of arguments this prepared statement expects to be passed in.

preparedFieldDescriptions
FieldDescription[] preparedFieldDescriptions [@property getter]

Gets the prepared header's field descriptions.

preparedParamDescriptions
ParamDescription[] preparedParamDescriptions [@property getter]

Gets the prepared header's param descriptions.

Static functions

analyseParams
ubyte[] analyseParams(Variant[] inParams, ParameterSpecialization[] psa, ubyte[] vals, bool longData)
Undocumented in source. Be warned that the author may not have intended to support it.
makeBitmap
ubyte[] makeBitmap(Variant[] inParams)
Undocumented in source. Be warned that the author may not have intended to support it.
makePSPrefix
ubyte[] makePSPrefix(uint hStmt, ubyte flags)
Undocumented in source. Be warned that the author may not have intended to support it.
sendCommand
void sendCommand(Connection conn, uint hStmt, PreparedStmtHeaders psh, Variant[] inParams, ParameterSpecialization[] psa)
Undocumented in source. Be warned that the author may not have intended to support it.
sendLongData
void sendLongData(Connection conn, uint hStmt, ParameterSpecialization[] psa)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_hStmt
uint _hStmt;
Undocumented in source.
_inParams
Variant[] _inParams;
Undocumented in source.
_psParams
ushort _psParams;
_psWarnings
ushort _psWarnings;
Undocumented in source.
_psa
ParameterSpecialization[] _psa;
Undocumented in source.
_psh
PreparedStmtHeaders _psh;
Undocumented in source.

Meta