Songbird / Development / Songbird Add-Ons API Documentation

sbISQLBuilder Interface Reference

Base interface for SQL building components. More...

import "sbISQLBuilder.idl";

Inheritance diagram for sbISQLBuilder:

sbISQLInsertBuilder sbISQLWhereBuilder sbISQLDeleteBuilder sbISQLSelectBuilder sbISQLUpdateBuilder List of all members.

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.
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.
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.
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.
void addSubquery (in sbISQLSelectBuilder aSubquery, in AString aAlias)
 Add a subquery to the from clause.
void reset ()
 Clears out query configuration to this instance can be reused.
AString toString ()
 Return the generated SQL statement for the query.

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.
attribute boolean limitIsParameter
 Is the limit clause a parameter?
attribute long offset
 Value for the offset clause.
attribute boolean offsetIsParameter
 Is the offset clause a parameter?
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:
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::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:
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.
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::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:
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::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:
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::addSubquery ( in sbISQLSelectBuilder  aSubquery,
in AString  aAlias 
)

Add a subquery to the from clause.

Parameters:
aSubquery Query to add
aAlias Alias to give the subquery, null for none

AString sbISQLBuilder::toString (  ) 

Return the generated SQL statement for the query.

Returns:
The generated SQL statement


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:29:02 2009 for Songbird by  doxygen 1.5.2