Quinoa
[ class tree: Quinoa ] [ index: Quinoa ] [ all elements ]

Class: Quinoa_Query

Source Location: /Quinoa/Query.php

Class Overview


Quinoa Query class.


Author(s):

Version:

  • 0.0.21 2007-09-23

Copyright:

  • 2007

Variables

Methods



Class Details

[line 50]
Quinoa Query class.

Quinoa Query class. Quinoa Query is constructed two ways: an array with the pieces of a query or row SQL. Once the object is create is possible to uses one of the possible Quinoa data dialect to interact with the database accordingly. Quinoa_Query allows for changing the query after it's being constructed. It's possible to add and remove any field, table, and even joins and conditions. PHP version 5.x Copyright (c) 2007, Freeconcept, Lda. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Freeconcept, Lda. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.




Tags:

since:  File available since Release 0.0.1
link:  http://www.quinoaframework.org
version:  0.0.21 2007-09-23
copyright:  2007
author:  Marcello Duarte <marcello.duarte@gmail.com>


[ Top ]


Class Variables

$_conditions =

[line 86]

the conditions added or necessary for relationships with other entities

the conditions added or necessary for relationships with other entities




Tags:

access:  protected

Type:   array


[ Top ]

$_fields =

[line 65]

entity attributes

entity attributes




Tags:

access:  protected

Type:   array


[ Top ]

$_forceIndex =

[line 135]

Indexes to force for the query

Indexes to force for the query




Tags:

access:  protected

Type:   string


[ Top ]

$_groupBy =

[line 107]

The attribute by which the query msut be grouped

The attribute by which the query msut be grouped




Tags:

access:  protected

Type:   array


[ Top ]

$_ignoreIndex =

[line 142]

indexes fo ignore for the query

indexes fo ignore for the query




Tags:

access:  protected

Type:   string


[ Top ]

$_isDistinct =

[line 72]

whether a select is going to retrieve non repeated records or not

whether a select is going to retrieve non repeated records or not




Tags:

access:  protected

Type:   boolean


[ Top ]

$_joins =

[line 121]

the joins needed for the query

the joins needed for the query




Tags:

access:  protected

Type:   array


[ Top ]

$_limit =

[line 93]

The maximum number of records to be return by the query

The maximum number of records to be return by the query




Tags:

access:  protected

Type:   integer


[ Top ]

$_orderBy =

[line 114]

The attributes by which a query must be ordered

The attributes by which a query must be ordered




Tags:

access:  protected

Type:   array


[ Top ]

$_sql =

[line 58]

row SQL

row SQL




Tags:

access:  protected

Type:   string


[ Top ]

$_start =

[line 100]

The start index of the record list returned by the query

The start index of the record list returned by the query




Tags:

access:  protected

Type:   integer


[ Top ]

$_tables =

[line 79]

entity tables

entity tables




Tags:

access:  protected

Type:   array


[ Top ]

$_useIndex =

[line 128]

Indexes to use for the query

Indexes to use for the query




Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 156]

Quinoa_Query __construct( array $sqlParams)

Constructs a Quinoa_Query object

Constructs a Quinoa_Query object




Tags:

access:  public


Parameters:

array   $sqlParams  

[ Top ]

method addConditions [line 449]

void addConditions( array $conditions)

Adds conditions to the query

Adds conditions to the query




Tags:

access:  public


Parameters:

array   $conditions  

[ Top ]

method addFields [line 481]

void addFields( array $fields)

Adds fields to the query

Adds fields to the query




Tags:

access:  public


Parameters:

array   $fields  

[ Top ]

method addJoin [line 183]

void addJoin( string $table, string $joins)

Adds a join to the query

Adds a join to the query




Tags:

access:  public


Parameters:

string   $table  
string   $joins  

[ Top ]

method addTables [line 258]

void addTables( array $tables)

Adds tables to the query

Adds tables to the query




Tags:

access:  public


Parameters:

array   $tables  

[ Top ]

method getConditions [line 519]

void getConditions( )



Tags:

access:  public


[ Top ]

method getFields [line 509]

void getFields( )



Tags:

access:  public


[ Top ]

method getGroupBy [line 534]

void getGroupBy( )



Tags:

access:  public


[ Top ]

method getLimit [line 524]

void getLimit( )



Tags:

access:  public


[ Top ]

method getOrderBy [line 539]

void getOrderBy( )



Tags:

access:  public


[ Top ]

method getSQL [line 270]

string getSQL( [string $operation = "SELECT"])

Gets resulting SQL for a given operation

Gets resulting SQL for a given operation




Tags:

access:  public


Parameters:

string   $operation  

[ Top ]

method getStart [line 529]

void getStart( )



Tags:

access:  public


[ Top ]

method getTables [line 514]

void getTables( )



Tags:

access:  public


[ Top ]

method isDistinct [line 499]

void isDistinct( )



Tags:

access:  public


[ Top ]

method joinTableExists [line 215]

boolean joinTableExists( string $table)

Checks whether a join exists given its table name

Checks whether a join exists given its table name




Tags:

access:  public


Parameters:

string   $table  

[ Top ]

method removeJoin [line 196]

void removeJoin( string $table)

removes a join, given its table name

removes a join, given its table name




Tags:

access:  public


Parameters:

string   $table  

[ Top ]

method setConditions [line 554]

void setConditions( mixed $conditions)



Tags:

access:  public


[ Top ]

method setDistinct [line 504]

void setDistinct( [mixed $isDistinct = true])



Tags:

access:  public


[ Top ]

method setFields [line 544]

void setFields( mixed $fields)



Tags:

access:  public


[ Top ]

method setGroupBy [line 569]

void setGroupBy( mixed $groupBy)



Tags:

access:  public


[ Top ]

method setJoins [line 579]

void setJoins( mixed $joins)



Tags:

access:  public


[ Top ]

method setLimit [line 559]

void setLimit( mixed $limit)



Tags:

access:  public


[ Top ]

method setOrderBy [line 574]

void setOrderBy( mixed $orderBy)



Tags:

access:  public


[ Top ]

method setStart [line 564]

void setStart( mixed $start)



Tags:

access:  public


[ Top ]

method setTables [line 549]

void setTables( mixed $tables)



Tags:

access:  public


[ Top ]

method stripSlashesOfFunctions [line 233]

string stripSlashesOfFunctions( array $sql_values)

Strip slashes of allowed functions

Strip slashes of allowed functions




Tags:

access:  public


Parameters:

array   $sql_values  

[ Top ]

method __toString [line 493]

string __toString( )

Magic method

Magic method Converts object to string by returning resulting SQL




Tags:

access:  public


[ Top ]


Documentation generated on Wed, 03 Oct 2007 14:25:50 +0100 by phpDocumentor 1.3.0RC3