sbSQLSelectBuilder Class Reference

#include <sbSQLSelectBuilder.h>

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

Public Member Functions

NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD 
GetLimit (PRInt32 *aLimit)
 
NS_IMETHOD SetLimit (PRInt32 aLimit)
 
NS_IMETHOD GetLimitIsParameter (PRBool *aLimitIsParameter)
 
NS_IMETHOD SetLimitIsParameter (PRBool aLimitIsParameter)
 
NS_IMETHOD GetOffset (PRInt32 *aOffset)
 
NS_IMETHOD SetOffset (PRInt32 aOffset)
 
NS_IMETHOD GetOffsetIsParameter (PRBool *aOffsetIsParameter)
 
NS_IMETHOD SetOffsetIsParameter (PRBool aOffsetIsParameter)
 
NS_IMETHOD AddJoin (PRUint32 aJoinType, const nsAString &aJoinedTableName, const nsAString &aJoinedTableAlias, const nsAString &aJoinedColumnName, const nsAString &aJoinToTableName, const nsAString &aJoinToColumnName)
 
NS_IMETHOD AddJoinWithIndexHint (PRUint32 aJoinType, const nsAString &aJoinedTableName, const nsAString &aJoinedTableAlias, const nsAString &aJoinedColumnName, const nsAString &aJoinToTableName, const nsAString &aJoinToColumnName, PRBool aRequiresFromTableIndexHint, PRBool aRequiresToTableIndexHint)
 
NS_IMETHOD AddSubqueryJoin (PRUint32 aJoinType, sbISQLSelectBuilder *aJoinedSubquery, const nsAString &aJoinedTableAlias, const nsAString &aJoinedColumnName, const nsAString &aJoinToTableName, const nsAString &aJoinToColumnName)
 
NS_IMETHOD AddJoinWithCriterion (PRUint32 aJoinType, const nsAString &aJoinedTableName, const nsAString &aJoinedTableAlias, sbISQLBuilderCriterion *aCriterion)
 
NS_IMETHOD AddSubquery (sbISQLSelectBuilder *aSubquery, const nsAString &aAlias)
 
NS_DECL_SBISQLSELECTBUILDER
NS_IMETHOD 
ToString (nsAString &_result)
 
NS_IMETHOD Reset ()
 
 sbSQLSelectBuilder ()
 
virtual ~sbSQLSelectBuilder ()
 
- Public Member Functions inherited from sbSQLWhereBuilder
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_SBISQLWHEREBUILDER 
sbSQLWhereBuilder ()
 
virtual ~sbSQLWhereBuilder ()
 
- Public Member Functions inherited from sbSQLBuilderBase
NS_DECL_ISUPPORTS
NS_DECL_SBISQLBUILDER 
sbSQLBuilderBase ()
 
virtual ~sbSQLBuilderBase ()
 
- Public Member Functions inherited from sbISQLBuilder
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 Member Functions inherited from sbISQLWhereBuilder
void addCriterion (in sbISQLBuilderCriterion aCriterion)
 Add a criteria constraint to the query. More...
 
void removeCriterion (in sbISQLBuilderCriterion aCriterion)
 Remve a criteria constraint from the query. More...
 
sbISQLBuilderCriterion createMatchCriterionString (in AString aTableName, in AString aSrcColumnName, in unsigned long aMatchType, in AString aValue)
 Create a match criterion with an AString datatype. More...
 
sbISQLBuilderCriterion createMatchCriterionBetweenString (in AString aTableName, in AString aSrcColumnName, in AString aLeftValue, in AString aRightValue)
 
sbISQLBuilderCriterion createMatchCriterionNotBetweenString (in AString aTableName, in AString aSrcColumnName, in AString aLeftValue, in AString aRightValue)
 
sbISQLBuilderCriterion createMatchCriterionLong (in AString aTableName, in AString aSrcColumnName, in unsigned long aMatchType, in long aValue)
 Create a match criterion with a long (32 bit) datatype. More...
 
sbISQLBuilderCriterion createMatchCriterionLongLong (in AString aTableName, in AString aSrcColumnName, in unsigned long aMatchType, in long long aValue)
 Create a match criterion with a long long (64 bit) datatype. More...
 
sbISQLBuilderCriterion createMatchCriterionNull (in AString aTableName, in AString aSrcColumnName, in unsigned long aMatchType)
 Create a match criterion that tests against the null value. More...
 
sbISQLBuilderCriterion createMatchCriterionTable (in AString aLeftTableName, in AString aLeftColumnName, in unsigned long aMatchType, in AString aRightTableName, in AString aRightColumnName)
 Create a match criterion that tests against a table column. More...
 
sbISQLBuilderCriterionIn createMatchCriterionIn (in AString aTableName, in AString aSrcColumnName)
 Create a match criterion using the IN() operator. More...
 
sbISQLBuilderCriterion createMatchCriterionParameter (in AString aTableName, in AString aSrcColumnName, in unsigned long aMatchType)
 Create a match criterion that tests against a parameter placeholder. More...
 
sbISQLBuilderCriterion createAndCriterion (in sbISQLBuilderCriterion aLeft, in sbISQLBuilderCriterion aRight)
 Create a match criterion that is the logical AND of two critera. More...
 
sbISQLBuilderCriterion createOrCriterion (in sbISQLBuilderCriterion aLeft, in sbISQLBuilderCriterion aRight)
 Create a match criterion that is the logical OR of two critera. More...
 
- Public Member Functions inherited from sbISQLSelectBuilder
void addColumn (in AString aTableName, in AString aColumnName)
 Add a column to the output column list. More...
 
void clearColumns ()
 Clears added columns. More...
 
void addOrder (in AString aTableName, in AString aColumnName, in boolean aAscending)
 Add an order clause to the query. More...
 
void addRandomOrder ()
 Add a random order clause to the query. More...
 
void addGroupBy (in AString aTableName, in AString aColumnName)
 Add an group by clause to the query. More...
 

Additional Inherited Members

- Public Attributes inherited from sbISQLBuilder
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
 
- Public Attributes inherited from sbISQLSelectBuilder
attribute AString baseTableName
 The query's base table. More...
 
attribute AString baseTableAlias
 The query's base table's alias. More...
 
attribute boolean distinct
 Is the query distinct? More...
 
- Protected Member Functions inherited from sbSQLWhereBuilder
NS_IMETHOD Reset ()
 
nsresult AppendWhere (nsAString &aBuffer)
 
- Protected Attributes inherited from sbSQLWhereBuilder
nsCOMArray
< sbISQLBuilderCriterion
mCritera
 
- Protected Attributes inherited from sbSQLBuilderBase
PRInt32 mLimit
 
PRBool mLimitIsParameter
 
PRInt32 mOffset
 
PRBool mOffsetIsParameter
 
nsTArray< sbJoinInfomJoins
 
nsTArray< sbSubqueryInfomSubqueries
 

Detailed Description

Definition at line 39 of file sbSQLSelectBuilder.h.

Constructor & Destructor Documentation

sbSQLSelectBuilder::sbSQLSelectBuilder ( )
sbSQLSelectBuilder::~sbSQLSelectBuilder ( )
virtual

Definition at line 41 of file sbSQLSelectBuilder.cpp.

Member Function Documentation

NS_IMETHOD sbSQLSelectBuilder::AddJoin ( PRUint32  aJoinType,
const nsAString &  aJoinedTableName,
const nsAString &  aJoinedTableAlias,
const nsAString &  aJoinedColumnName,
const nsAString &  aJoinToTableName,
const nsAString &  aJoinToColumnName 
)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::AddJoinWithCriterion ( PRUint32  aJoinType,
const nsAString &  aJoinedTableName,
const nsAString &  aJoinedTableAlias,
sbISQLBuilderCriterion aCriterion 
)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::AddJoinWithIndexHint ( PRUint32  aJoinType,
const nsAString &  aJoinedTableName,
const nsAString &  aJoinedTableAlias,
const nsAString &  aJoinedColumnName,
const nsAString &  aJoinToTableName,
const nsAString &  aJoinToColumnName,
PRBool  aRequiresFromTableIndexHint,
PRBool  aRequiresToTableIndexHint 
)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::AddSubquery ( sbISQLSelectBuilder aSubquery,
const nsAString &  aAlias 
)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::AddSubqueryJoin ( PRUint32  aJoinType,
sbISQLSelectBuilder aJoinedSubquery,
const nsAString &  aJoinedTableAlias,
const nsAString &  aJoinedColumnName,
const nsAString &  aJoinToTableName,
const nsAString &  aJoinToColumnName 
)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_DECL_ISUPPORTS_INHERITED NS_IMETHOD sbSQLSelectBuilder::GetLimit ( PRInt32 *  aLimit)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::GetLimitIsParameter ( PRBool *  aLimitIsParameter)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::GetOffset ( PRInt32 *  aOffset)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::GetOffsetIsParameter ( PRBool *  aOffsetIsParameter)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHODIMP sbSQLSelectBuilder::Reset ( )

Definition at line 148 of file sbSQLSelectBuilder.cpp.

Here is the call graph for this function:

NS_IMETHOD sbSQLSelectBuilder::SetLimit ( PRInt32  aLimit)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::SetLimitIsParameter ( PRBool  aLimitIsParameter)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::SetOffset ( PRInt32  aOffset)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHOD sbSQLSelectBuilder::SetOffsetIsParameter ( PRBool  aOffsetIsParameter)
inline

Definition at line 45 of file sbSQLSelectBuilder.h.

NS_IMETHODIMP sbSQLSelectBuilder::ToString ( nsAString &  _result)

Definition at line 162 of file sbSQLSelectBuilder.cpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files: