The OpenD Programming Language

CreatedQuery

The generated query + args.

It offers support for concatenation, so you can create your query in parts and concatenate them afterwards. Ths string prepend will be inserted inbetween two CreatedQuery.query strings at concatation if and only if both query strings are non empty. The resulting CreatedQuery has a prepend string equal to the one of the left side of the '~' operation.

Beware that because of the handling of the prepend string, the result of multiple concatenations depends on the order of evaluation (if empty strings are involved). You might need parantheses or splitting it up in multiple statements to achieve the desired effect.

struct CreatedQuery {
string query;
Variant[] args;
string prepend;
}

Members

Functions

opBinary
CreatedQuery opBinary(CreatedQuery right)

Concatenation with automatically inserted prepend string in between.

opEquals
bool opEquals(CreatedQuery other)

Currently not const because of bug: http://d.puremagic.com/issues/show_bug.cgi?id=8759

Meta