sbISQLBuilder Interface Reference

Base interface for SQL building components. More...

import"sbISQLBuilder.idl";

Inheritance diagram for sbISQLBuilder:
[legend]
Collaboration diagram for sbISQLBuilder:
[legend]

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
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
aJoinTypeJoin type, must be one of the JOIN constant values
aJoinedTableNameTable name of the table to join
aJoinedTableAliasAlias to give the joined table, null for none
aJoinedColumnNameColumn from joined table to use in join expression
aJoinToTableNameTable name of the table to join to
aJoinToColumnNameColumn 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.

Parameters
aJoinTypeJoin type, must be one of the JOIN constant values
aJoinedTableNameTable name of the table to join
aJoinedTableAliasAlias to give the joined table, null for none
aCriterionCriterion 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.

Parameters
aJoinTypeJoin type, must be one of the JOIN constant values
aJoinedTableNameTable name of the table to join
aJoinedTableAliasAlias to give the joined table, null for none
aJoinedColumnNameColumn from joined table to use in join expression
aJoinToTableNameTable name of the table to join to
aJoinToColumnNameColumn from the joined to table to use in join expression
aRequiresFromTableIndexHintThis will attempt to add a hint to the join statement so that sqlite uses the correct index.
aRequiresToTableIndexHintThis will attempt to add a hint to the join statement so that sqlite uses the correct index.
Note
Do not use this method unless you know exactly why you are using it. Attempting to add a hint for index use can break queries or make them extremely slow.
void sbISQLBuilder::addSubquery ( in sbISQLSelectBuilder  aSubquery,
in AString  aAlias 
)

Add a subquery to the from clause.

Parameters
aSubqueryQuery to add
aAliasAlias 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.

Parameters
aJoinTypeJoin type, must be one of the JOIN constant values
aJoinedSubquerySelect query to be used as the subquery
aJoinedTableAliasAlias to give the joined subquery, null for none
aJoinedColumnNameColumn from joined subquery to use in join expression
aJoinToTableNameTable name of the table to join to
aJoinToColumnNameColumn 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.

Returns
The generated SQL statement

Member Data Documentation

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.


The documentation for this interface was generated from the following file: