Result

An object encapsulating a single result row or query execution summary. It's lifetime is limited by lifetime of parent mg_session. Also, invoking mg_session_pull ends the lifetime of previously returned mg_result. Implements an InputRange.

Constructors

this
this(mg_session* session)

Initial construction of a Result from the given mg_session pointer. Ranges in D first perform a copy of the range object on which they will operate. This means that the original Result instance could not be used to e.g. query the summary since it does not have the last mg_result. Allocate a reference counted mg_result pointer to be shared with all future range copies.

Destructor

~this
~this()
Undocumented in source.

Postblit

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

Members

Functions

columns
auto columns()

Returns names of columns output by the current query execution.

front
auto front()

Returns the front element of the range. Note: part of InputRange interface

opCast
auto opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
summary
auto summary()

Returns query execution summary as a key/value Map.

Properties

empty
bool empty [@property getter]

Check if the Result is empty. Return: true if empty, false if there are more rows to be fetched. Note: part of InputRange interface

popFront
void popFront [@property getter]

Pops the first element from the range, shortening the range by one element. Note: part of InputRange interface

Meta