Base interface for SQL building components. More...
import"sbISQLBuilder.idl";
Public Member Functions | |
| void | addJoin (in unsigned long aJoinType, in AString aJoinedTableName, in AString aJoinedTableAlias, in AString aJoinedColumnName, in AString aJoinToTableName, in AString aJoinToColumnName) |
| Add a join to the query. More... | |
| void | addJoinWithIndexHint (in unsigned long aJoinType, in AString aJoinedTableName, in AString aJoinedTableAlias, in AString aJoinedColumnName, in AString aJoinToTableName, in AString aJoinToColumnName, in boolean aRequiresFromTableIndexHint, in boolean aRequiresToTableIndexHint) |
| Add a join to the query. More... | |
| void | addSubqueryJoin (in unsigned long aJoinType, in sbISQLSelectBuilder aJoinedSubquery, in AString aJoinedTableAlias, in AString aJoinedColumnName, in AString aJoinToTableName, in AString aJoinToColumnName) |
| Add a subquery join join to the query. More... | |
| void | addJoinWithCriterion (in unsigned long aJoinType, in AString aJoinedTableName, in AString aJoinedTableAlias, in sbISQLBuilderCriterion aCriterion) |
| Add a join to the query with a critera object specifcying the join constraints. More... | |
| void | addSubquery (in sbISQLSelectBuilder aSubquery, in AString aAlias) |
| Add a subquery to the from clause. More... | |
| void | reset () |
| Clears out query configuration to this instance can be reused. More... | |
| AString | toString () |
| Return the generated SQL statement for the query. More... | |
Public Attributes | |
| const unsigned long | MATCH_EQUALS = 0 |
| const unsigned long | MATCH_NOTEQUALS = 1 |
| const unsigned long | MATCH_GREATER = 2 |
| const unsigned long | MATCH_GREATEREQUAL = 3 |
| const unsigned long | MATCH_LESS = 4 |
| const unsigned long | MATCH_LESSEQUAL = 5 |
| const unsigned long | MATCH_LIKE = 6 |
| const unsigned long | MATCH_NOTLIKE = 7 |
| const unsigned long | MATCH_MATCH = 8 |
| attribute long | limit |
| Value for the limit clause. More... | |
| attribute boolean | limitIsParameter |
| Is the limit clause a parameter? More... | |
| attribute long | offset |
| Value for the offset clause. More... | |
| attribute boolean | offsetIsParameter |
| Is the offset clause a parameter? More... | |
| const unsigned long | JOIN_INNER = 0 |
| const unsigned long | JOIN_LEFT = 1 |
| const unsigned long | JOIN_LEFT_OUTER = 2 |
Base interface for SQL building components.
Components implementing this interface are used to build SQL string. The interface is inspired by Squiggle: http://joe.truemesh.com/squiggle/javadoc/index.html
Definition at line 47 of file sbISQLBuilder.idl.
| void sbISQLBuilder::addJoin | ( | in unsigned long | aJoinType, |
| in AString | aJoinedTableName, | ||
| in AString | aJoinedTableAlias, | ||
| in AString | aJoinedColumnName, | ||
| in AString | aJoinToTableName, | ||
| in AString | aJoinToColumnName | ||
| ) |
Add a join to the query.
| aJoinType | Join type, must be one of the JOIN constant values |
| aJoinedTableName | Table name of the table to join |
| aJoinedTableAlias | Alias to give the joined table, null for none |
| aJoinedColumnName | Column from joined table to use in join expression |
| aJoinToTableName | Table name of the table to join to |
| aJoinToColumnName | Column from the joined to table to use in join expression |
| void sbISQLBuilder::addJoinWithCriterion | ( | in unsigned long | aJoinType, |
| in AString | aJoinedTableName, | ||
| in AString | aJoinedTableAlias, | ||
| in sbISQLBuilderCriterion | aCriterion | ||
| ) |
Add a join to the query with a critera object specifcying the join constraints.
| aJoinType | Join type, must be one of the JOIN constant values |
| aJoinedTableName | Table name of the table to join |
| aJoinedTableAlias | Alias to give the joined table, null for none |
| aCriterion | Criterion of the join constraints |
| void sbISQLBuilder::addJoinWithIndexHint | ( | in unsigned long | aJoinType, |
| in AString | aJoinedTableName, | ||
| in AString | aJoinedTableAlias, | ||
| in AString | aJoinedColumnName, | ||
| in AString | aJoinToTableName, | ||
| in AString | aJoinToColumnName, | ||
| in boolean | aRequiresFromTableIndexHint, | ||
| in boolean | aRequiresToTableIndexHint | ||
| ) |
Add a join to the query.
| aJoinType | Join type, must be one of the JOIN constant values |
| aJoinedTableName | Table name of the table to join |
| aJoinedTableAlias | Alias to give the joined table, null for none |
| aJoinedColumnName | Column from joined table to use in join expression |
| aJoinToTableName | Table name of the table to join to |
| aJoinToColumnName | Column from the joined to table to use in join expression |
| aRequiresFromTableIndexHint | This will attempt to add a hint to the join statement so that sqlite uses the correct index. |
| aRequiresToTableIndexHint | This will attempt to add a hint to the join statement so that sqlite uses the correct index. |
| void sbISQLBuilder::addSubquery | ( | in sbISQLSelectBuilder | aSubquery, |
| in AString | aAlias | ||
| ) |
Add a subquery to the from clause.
| aSubquery | Query to add |
| aAlias | Alias to give the subquery, null for none |
| void sbISQLBuilder::addSubqueryJoin | ( | in unsigned long | aJoinType, |
| in sbISQLSelectBuilder | aJoinedSubquery, | ||
| in AString | aJoinedTableAlias, | ||
| in AString | aJoinedColumnName, | ||
| in AString | aJoinToTableName, | ||
| in AString | aJoinToColumnName | ||
| ) |
Add a subquery join join to the query.
| aJoinType | Join type, must be one of the JOIN constant values |
| aJoinedSubquery | Select query to be used as the subquery |
| aJoinedTableAlias | Alias to give the joined subquery, null for none |
| aJoinedColumnName | Column from joined subquery to use in join expression |
| aJoinToTableName | Table name of the table to join to |
| aJoinToColumnName | Column from the joined to table to use in join expression |
| void sbISQLBuilder::reset | ( | ) |
Clears out query configuration to this instance can be reused.
| AString sbISQLBuilder::toString | ( | ) |
Return the generated SQL statement for the query.
| const unsigned long sbISQLBuilder::JOIN_INNER = 0 |
Definition at line 79 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::JOIN_LEFT = 1 |
Definition at line 80 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::JOIN_LEFT_OUTER = 2 |
Definition at line 81 of file sbISQLBuilder.idl.
| attribute long sbISQLBuilder::limit |
Value for the limit clause.
Definition at line 62 of file sbISQLBuilder.idl.
| attribute boolean sbISQLBuilder::limitIsParameter |
Is the limit clause a parameter?
Definition at line 67 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_EQUALS = 0 |
Definition at line 49 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_GREATER = 2 |
Definition at line 51 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_GREATEREQUAL = 3 |
Definition at line 52 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_LESS = 4 |
Definition at line 53 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_LESSEQUAL = 5 |
Definition at line 54 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_LIKE = 6 |
Definition at line 55 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_MATCH = 8 |
Definition at line 57 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_NOTEQUALS = 1 |
Definition at line 50 of file sbISQLBuilder.idl.
| const unsigned long sbISQLBuilder::MATCH_NOTLIKE = 7 |
Definition at line 56 of file sbISQLBuilder.idl.
| attribute long sbISQLBuilder::offset |
Value for the offset clause.
Definition at line 72 of file sbISQLBuilder.idl.
| attribute boolean sbISQLBuilder::offsetIsParameter |
Is the offset clause a parameter?
Definition at line 77 of file sbISQLBuilder.idl.