Class Index | File Index

Classes


Class nnjl.licurgo.Query


Defined in: nnjl.licurgo.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
nnjl.licurgo.Query(type, rdbms)
Creates a new nnjl.licurgo.Query
Field Summary
Field Attributes Field Name and Description
 
The AND Querys that compound the WHERE clause
 
The AND first level clauses that compound the WHERE clause
<static>  
nnjl.licurgo.Query.ASC
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.DESC
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.GREATER_THAN
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.GREATER_THAN_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.IN
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.IS_NOT_NULL
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.IS_NULL
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.LESS_THAN
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.LESS_THAN_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.LIKE
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.NOT_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.NOT_IN
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.NOT_LIKE
nnjl.licurgo.Query.prototype Predicates operator constant
 
The OR Querys that compound the WHERE clause
 
The ORDER BY part of the SELECT
 
The OR first level clauses that compound the WHERE clause
 
The selected properties that the Query will return.
 
The RDBMS of the nnjl.licurgo.Query, this is becouse a Query could be different depending of the RDBMS
 
The full SELECT clause generated by the Query
<static>  
nnjl.licurgo.Query.SMALLER_THAN
nnjl.licurgo.Query.prototype Predicates operator constant
<static>  
nnjl.licurgo.Query.SMALLER_THAN_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant
 
The table name of the SELECT
 
The type associated with the where clause, is the the table after FROM in the SELECT clause
Method Summary
Method Attributes Method Name and Description
 
addAndClause(query)
Add a new query joined with an AND in the WHERE clause
 
addAndPredicate(propertyName, value, operator)
Add a new predicate to the Query joined with an OR
 
addOrClause(query)
Add a new query joined with an OR in the WHERE clause
 
addOrderField(propertyName, direction)
Add a new clause to the ORDER BY part of the SELECT clause
 
addOrPredicate(propertyName, value, operator)
Add a new predicate to the Query joined with an OR
 
addSelectableFields(propertyName)
Add a new property of the Query's Type that will be added to the SELECT clause and returned later by the RDBMS If ther is no properties set, the RDBMS will return all fields (SELECT *) and the @see nnjl.licurgo.DataObject will be filled with all the properties defined in the @see nnjl.licurgo.Type
 
Return true if any predicate is set in the Query
 
setTable(table)
Change the table of the Query
Class Detail
nnjl.licurgo.Query(type, rdbms)
Creates a new nnjl.licurgo.Query
Parameters:
{Type} type
The type associated with the where clause, is the the table after FROM in the SELECT clause
{RDBMS} rdbms
Field Detail
{nnjl.licurgo.Query[]} andClauses
The AND Querys that compound the WHERE clause

{nnjl.licurgo.Predicate[]} andPredicates
The AND first level clauses that compound the WHERE clause

<static> nnjl.licurgo.Query.ASC
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.DESC
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.GREATER_THAN
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.GREATER_THAN_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.IN
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.IS_NOT_NULL
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.IS_NULL
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.LESS_THAN
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.LESS_THAN_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.LIKE
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.NOT_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.NOT_IN
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.NOT_LIKE
nnjl.licurgo.Query.prototype Predicates operator constant

{nnjl.licurgo.Query[]} orClauses
The OR Querys that compound the WHERE clause

{String} order
The ORDER BY part of the SELECT

{nnjl.licurgo.Predicate[]} orPredicates
The OR first level clauses that compound the WHERE clause

{nnjl.licurgo.Property[]} properties
The selected properties that the Query will return. If empty it will return all defined in the type

{RDBMS} rdbms
The RDBMS of the nnjl.licurgo.Query, this is becouse a Query could be different depending of the RDBMS

{String} result
The full SELECT clause generated by the Query

<static> nnjl.licurgo.Query.SMALLER_THAN
nnjl.licurgo.Query.prototype Predicates operator constant

<static> nnjl.licurgo.Query.SMALLER_THAN_EQUALS
nnjl.licurgo.Query.prototype Predicates operator constant

{String} table
The table name of the SELECT

{nnjl.licurgo.Type} type
The type associated with the where clause, is the the table after FROM in the SELECT clause
Method Detail
addAndClause(query)
Add a new query joined with an AND in the WHERE clause
Parameters:
{Query} query

addAndPredicate(propertyName, value, operator)
Add a new predicate to the Query joined with an OR
Parameters:
{String} propertyName
{Object} value
{int} operator

addOrClause(query)
Add a new query joined with an OR in the WHERE clause
Parameters:
{Query} query

addOrderField(propertyName, direction)
Add a new clause to the ORDER BY part of the SELECT clause
Parameters:
{String} propertyName
if the propertyName is no on the Type, an error will be thrown
{Boolean} direction
true==ASC, false un DESC

addOrPredicate(propertyName, value, operator)
Add a new predicate to the Query joined with an OR
Parameters:
{String} propertyName
{Object} value
{int} operator

addSelectableFields(propertyName)
Add a new property of the Query's Type that will be added to the SELECT clause and returned later by the RDBMS If ther is no properties set, the RDBMS will return all fields (SELECT *) and the @see nnjl.licurgo.DataObject will be filled with all the properties defined in the @see nnjl.licurgo.Type
Parameters:
{String} propertyName
if the propertyName is no on the Type, an error will be thrown
Throws:
{String}
Error

hasPredicates()
Return true if any predicate is set in the Query
Returns:
true if it has predicates false if not

setTable(table)
Change the table of the Query
Parameters:
table

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Sep 29 2010 11:46:25 GMT+0200 (CEST)