Docs For Class atkQuery
Atk API home Class tree Element index

Todo list

Packages: » atk Classes: general » AllTests » atkConfig » atkController » atkDataNode » atkErrorHandlerBase » atkFileEditor » atkLanguage » atkMailErrorHandler » atkMetaNode » atkMockNode » atkNode » atkNodeValidator » atkOneToManyRelationSessionGridHandler » atkPHPView » atkSessionStore » atkStatementIterator » atkTreeNode » atkWizardBase » atkZendPlatformErrorHandler » clsTbsDataSource » clsTbsLocator » clsTinyButStrong » clsTinyButStrongOOo » FCKeditor » getSupportedLanguagesCollector » layout » node » sql_whereclause_blacklist_checker » test » tree utils » atkAbstractFrame » atkActionListener » atkClassFinder » atkClassLoader » atkCompatSelector » atkDataHolder » atkDebugger » atkDirectoryTraverser » atkEventLog » atkFileUtils » atkFrame » atkFrameSet » atkIpUtils » atkJSON » atkMail » atkMailer » atkMessageQueue » atkMLSelector » atkmlsplitter » atkRootFrameset » atkSelector » atkSelectorIterator » atkString » atkStringParser » atkTableRenderer » atkTableRendererGrouped » atkTextMarker » atkTmpFile » atkTriggerListener » atkYAML » atkZip » browserInfo fixture » atkAbstractFixtureLoader » atkFixtureManager » atkPHPFixtureLoader » atkYAMLFixtureLoader testcases » atkAbstractSearchHandler ui » atkActionBoxBuilder » atkDialog » atkIndexPage » atkOutput » atkPage » atkPageBuilder » atkTheme » atkThemeCompiler » atkUI handlers » atkActionHandler » atkAddHandler » atkAddOrCopyHandler » atkAdminHandler » atkAttributeEditHandler » atkCopyHandler » atkDeleteHandler » atkDocumentHandler » atkEditCopyHandler » atkEditHandler » atkExportHandler » atkFeedbackHandler » atkFileExport » atkImportHandler » atkMultiSelectHandler » atkMultiUpdatehandler » atkSaveHandler » atkSearchHandler » atkSelectHandler » atkSmartSearchHandler » atkUpdatehandler » atkViewEditBase » atkViewHandler » atkXmlHandler attributes » atkAggregatedColumn » atkAttribute » atkBoolAttribute » atkCalculatorAttribute » atkCaptchaAttribute » atkColorPickerAttribute » atkCountryAttribute » atkCreatedByAttribute » atkCreateStampAttribute » atkCurrencyAttribute » atkDateAttribute » atkDateTimeAttribute » atkDocumentAttribute » atkDummyAttribute » atkDurationAttribute » atkEmailAttribute » atkExpressionAttribute » atkFckAttribute » atkFieldSet » atkFileAttribute » atkFileWriterAttribute » atkFlagAttribute » atkFormatAttribute » atkFuzzySearchAttribute » atkHiddenAttribute » atkHtmlAttribute » atkIpAttribute » atkListAttribute » atkLiveTextPreview » atkMlAttribute » atkMlFckAttribute » atkMlHtmlAttribute » atkMlNumberAttribute » atkMlSelectorAttribute » atkMlTextAttribute » atkMlWrapper » atkMultipleFileAttribute » atkMultiSelectAttribute » atkNumberAttribute » atkParserAttribute » atkPasswordAttribute » atkProfileAttribute » atkRadioAttribute » atkRadioDetailsAttribute » atkRowCounter » atkStateAttribute » atkTabbedPane » atkTagAttribute » atkTextAttribute » atkTimeAttribute » atkTimeZoneAttribute » atkToolbar » atkUpdatedByAttribute » atkUpdateStampAttribute » atkUrlAttribute » atkWeekdayAttribute » atkWysiwygAttribute datatypes » atkArrayDt » atkDataType » atkStringDt » atkTime subpackage » atkAttributeTestCase security » atkBajusEncryption » atkBase64Encryption » atkEncryption » atkMockSecurityManager » atkOpenSSLEncryption » atkSecurityListener » atkSecurityManager » atkUrlVault » auth_config » auth_db » auth_imap » auth_interface » auth_ldap » auth_none » auth_pop3 » auth_saml » auth_server » auth_sspi cache » atkCache » atkCache_apc » atkCache_eaccelerator » atkCache_file » atkCache_memcache » atkCache_var » atkCache_xcache » atkCache_zp_disk » atkCache_zp_output » atkCache_zp_shm test » atkCacheTestCase » atkPluginTestCase » atkTestCase » test_sql_whereclause_blacklist_checker db » atkClusterDb » atkClusterDDL » atkClusterQuery » atkDb » atkdb2db » atkDb2DDL » atkDb2Query » atkDDL » atki5db » atki5DDL » atki5query » atkMockDb » atkMockDDL » atkMockQuery » atkMsSqlDb » atkMsSqlDDL » atkMssqlQuery » atkMysqlDb » atkMysqlDDL » atkMysqliDb » atkMysqliDDL » atkMysqliQuery » atkMysqlQuery » atkOci8Db » atkOci8DDL » atkOci8Query » atkOci9Db » atkOci9DDL » atkOci9Query » atkOci805Db » atkOci805Query » atkPgsqlDb » atkPgsqlDDL » atkPgsqlQuery » atkQuery recordlist » atkColumnConfig » atkCSVRecordList » atkCustomRecordList » atkExcelCSVRecordList » atkHTMLRecordList » atkPrintableRecordList » atkRecordList » atkRecordlistCache » atkTotalizer db-statement » atkCompatStatement » atkMySQLiStatement » atkStatement » atkStatementException » atkStatementParser console » atkConsoleController menu » atkcookmenu » atkDhtmlMenu » atkDropdownMenu » atkFramesMenu » atkMenu » atkmenuinterface » atkModernMenu » atkOutlookMenu » atkPlainMenu datagrid » atkDataGrid » atkDGComponent » atkDGEditControl » atkDGEvent » atkDGIndex » atkDGLimit » atkDGList » atkDGNoRecordsFound » atkDGPaginator » atkDGRenderer » atkDGSummary lock » atkDbLock » atkLock filters » atkDistinctFilter » atkFilter » atkGroupByFilter document » atkDocumentWriter » atkDocxWriter » atkOpenDocumentWriter meta » atkDutchMetaGrammar » atkMetaAttributeModifier » atkMetaCompiler » atkMetaGrammar » atkMetaPolicy » mod_meta relations » atkExtendableShuttleRelation » atkManyBoolRelation » atkManyToManyListRelation » atkManyToManyRelation » atkManyToManySelectRelation » atkManyToOneRelation » atkManyToOneTreeRelation » atkMatrixRelation » atkOneToManyRelation » atkOneToOneRelation » atkPolymorphicOneToOneRelation » atkRelation » atkSecureRelation » atkShuttleControl » atkShuttleFilter » atkShuttleRelation front » atkFrontController » atkFrontControllerBridge keyboard » atkKeyboard meta-relations » atkMetaExtendableShuttleRelation » atkMetaManyBoolRelation » atkMetaManyToManyListRelation » atkMetaManyToManySelectRelation » atkMetaManyToOneRelation » atkMetaOneToManyRelation » atkMetaOneToOneRelation » atkMetaShuttleRelation session » atkMockSessionManager » atkSessionManager » atkState modules » atkModule » mod_test listeners » atkRecycleBin interface » atkServer » atkSoapServer wizard » atkWizard » AtkWizardActionLoader » atkWizardPanel
Interfaces: datagrid » atkDGListener interface » atkServerInterface
Files: general » adodb-time.inc.php » AllTests.php » atknodetools.inc » atktools.inc » atktreetools.inc » basexml.php » bootstrap.inc » bootstrap.php » class.atkconfig.inc » class.atkcontroller.inc » class.atkdatanode.inc » class.atkerrorhandlerbase.inc » class.atkfileeditor.inc » class.atki5db.inc » class.atki5ddl.inc » class.atki5query.inc » class.atklanguage.inc » class.atkmailerrorhandler.inc » class.atkmetanode.inc » class.atkmocknode.inc » class.atkmocksessionmanager.inc » class.atknode.inc » class.atknodevalidator.inc » class.atkonetomanyrelationsessiongridhandler.inc » class.atkphpview.inc » class.atkpolymorphiconetoonerelation.inc » class.atksessionstore.inc » class.atkstatementiterator.inc » class.atktreenode.inc » class.atkwizardbase.inc » class.atkzendplatformerrorhandler.inc » class.layout.inc » class.nodename.inc » class.sql_whereclause_blacklist_checker.inc » class.test.inc » class.test_sql_whereclause_blacklist_checker.inc » commands.php » config.modules.inc » config.php » connector.php » console.php » db2yaml.php » defaultconfig.inc.php » fckeditor.php » fckeditor_php4.php » fckeditor_php5.php » io.php » module.inc » phpcompat.php » server.php » spellchecker.php » table2yaml.php » tbsooo_class.php » tbs_class.php » tooltip.tpl.php » upload.php » util.php » version.inc attributes » class.atkaggregatedcolumn.inc » class.atkattribute.inc » class.atkboolattribute.inc » class.atkcalculatorattribute.inc » class.atkcaptchaattribute.inc » class.atkcolorpickerattribute.inc » class.atkcountryattribute.inc » class.atkcreatedbyattribute.inc » class.atkcreatestampattribute.inc » class.atkcurrencyattribute.inc » class.atkdateattribute.inc » class.atkdatetimeattribute.inc » class.atkdocumentattribute.inc » class.atkdummyattribute.inc » class.atkdurationattribute.inc » class.atkemailattribute.inc » class.atkexpressionattribute.inc » class.atkfckattribute.inc » class.atkfieldset.inc » class.atkfileattribute.inc » class.atkfilewriterattribute.inc » class.atkflagattribute.inc » class.atkformatattribute.inc » class.atkfuzzysearchattribute.inc » class.atkhiddenattribute.inc » class.atkhtmlattribute.inc » class.atkipattribute.inc » class.atklistattribute.inc » class.atklivetextpreview.inc » class.atkmlattribute.inc » class.atkmlfckattribute.inc » class.atkmlhtmlattribute.inc » class.atkmlnumberattribute.inc » class.atkmlselectorattribute.inc » class.atkmltextattribute.inc » class.atkmlwrapper.inc » class.atkmultiplefileattribute.inc » class.atkmultiselectattribute.inc » class.atknumberattribute.inc » class.atkparserattribute.inc » class.atkpasswordattribute.inc » class.atkprofileattribute.inc » class.atkradioattribute.inc » class.atkradiodetailsattribute.inc » class.atkrowcounter.inc » class.atkstateattribute.inc » class.atktabbedpane.inc » class.atktagattribute.inc » class.atktextattribute.inc » class.atktimeattribute.inc » class.atktimezoneattribute.inc » class.atktoolbar.inc » class.atkupdatedbyattribute.inc » class.atkupdatestampattribute.inc » class.atkurlattribute.inc » class.atkweekdayattribute.inc » class.atkwysiwygattribute.inc attributes-- » property_accessor.php cache » class.atkcache.inc » class.atkcache_apc.inc » class.atkcache_eaccelerator.inc » class.atkcache_file.inc » class.atkcache_memcache.inc » class.atkcache_var.inc » class.atkcache_xcache.inc » class.atkcache_zp_disk.inc » class.atkcache_zp_output.inc » class.atkcache_zp_shm.inc console » class.atkconsolecontroller.inc datagrid » class.atkdatagrid.inc » class.atkdgcomponent.inc » class.atkdgeditcontrol.inc » class.atkdgevent.inc » class.atkdgindex.inc » class.atkdglimit.inc » class.atkdglist.inc » class.atkdglistener.inc » class.atkdgnorecordsfound.inc » class.atkdgpaginator.inc » class.atkdgrenderer.inc » class.atkdgsummary.inc datatypes » class.atkarraydt.inc » class.atkdatatype.inc » class.atkstringdt.inc » class.atktimedt.inc db » class.atkclusterdb.inc » class.atkclusterddl.inc » class.atkclusterquery.inc » class.atkdb.inc » class.atkdb2db.inc » class.atkdb2ddl.inc » class.atkdb2query.inc » class.atkddl.inc » class.atkmockdb.inc » class.atkmockddl.inc » class.atkmockquery.inc » class.atkmssqldb.inc » class.atkmssqlddl.inc » class.atkmssqlquery.inc » class.atkmysqldb.inc » class.atkmysqlddl.inc » class.atkmysqlidb.inc » class.atkmysqliddl.inc » class.atkmysqliquery.inc » class.atkmysqlquery.inc » class.atkoci8db.inc » class.atkoci8ddl.inc » class.atkoci8query.inc » class.atkoci9db.inc » class.atkoci9ddl.inc » class.atkoci9query.inc » class.atkoci805db.inc » class.atkoci805query.inc » class.atkpgsqldb.inc » class.atkpgsqlddl.inc » class.atkpgsqlquery.inc » class.atkquery.inc db-statement » class.atkcompatstatement.inc » class.atkmysqlistatement.inc » class.atkstatement.inc » class.atkstatementexception.inc » class.atkstatementparser.inc document » class.atkdocumentwriter.inc » class.atkdocxwriter.inc » class.atkopendocumentwriter.inc filters » class.atkdistinctfilter.inc » class.atkfilter.inc » class.atkgroupbyfilter.inc fixture » class.atkabstractfixtureloader.inc » class.atkfixturemanager.inc » class.atkphpfixtureloader.inc » class.atkyamlfixtureloader.inc front » class.atkfrontcontroller.inc » class.atkfrontcontrollerbridge.inc handlers » class.atkactionhandler.inc » class.atkaddhandler.inc » class.atkaddorcopyhandler.inc » class.atkadminhandler.inc » class.atkattributeedithandler.inc » class.atkcopyhandler.inc » class.atkdeletehandler.inc » class.atkdocumenthandler.inc » class.atkeditcopyhandler.inc » class.atkedithandler.inc » class.atkexporthandler.inc » class.atkfeedbackhandler.inc » class.atkfileexport.inc » class.atkimporthandler.inc » class.atkmultiselecthandler.inc » class.atkmultiupdatehandler.inc » class.atksavehandler.inc » class.atksearchhandler.inc » class.atkselecthandler.inc » class.atksmartsearchhandler.inc » class.atkupdatehandler.inc » class.atkvieweditbase.inc » class.atkviewhandler.inc » class.atkxmlhandler.inc include » autoload.inc » basics.inc » compatibility.inc » configs.inc » debugging.inc » errorhandler.inc » globals.inc » initial.inc » security.inc interface » class.atkserver.inc » class.atksoapserver.inc » interface.atkserverinterface.inc javascript » class.atkmultilanguage.js.php » class.atkprofileattribute.js.php » dhtml_tabs.js.php keyboard » class.atkkeyboard.inc listeners » class.atkrecyclebin.inc lock » class.atkdblock.inc » class.atklock.inc » lock.php lock-- » lock.js.php menu » atkmenutools.inc » class.atkcookmenu.inc » class.atkdhtmlmenu.inc » class.atkdropdownmenu.inc » class.atkframesmenu.inc » class.atkmenu.inc » class.atkmenuinterface.inc » class.atkmodernmenu.inc » class.atkoutlookmenu.inc » class.atkplainmenu.inc meta » class.atkdutchmetagrammar.inc » class.atkmetaattributemodifier.inc » class.atkmetacompiler.inc » class.atkmetagrammar.inc » class.atkmetapolicy.inc » module.inc meta-relations » class.atkmetaextendableshuttlerelation.inc » class.atkmetamanyboolrelation.inc » class.atkmetamanytomanylistrelation.inc » class.atkmetamanytomanyselectrelation.inc » class.atkmetamanytoonerelation.inc » class.atkmetaonetomanyrelation.inc » class.atkmetaonetoonerelation.inc » class.atkmetashuttlerelation.inc modules » class.atkmodule.inc modules-- » atkmoduletools.inc popups » colorpicker.inc recordlist » class.atkcolumnconfig.inc » class.atkcsvrecordlist.inc » class.atkcustomrecordlist.inc » class.atkexcelcsvrecordlist.inc » class.atkhtmlrecordlist.inc » class.atkprintablerecordlist.inc » class.atkrecordlist.inc » class.atkrecordlistcache.inc » class.atktotalizer.inc relations » class.atkextendableshuttlerelation.inc » class.atkmanyboolrelation.inc » class.atkmanytomanylistrelation.inc » class.atkmanytomanyrelation.inc » class.atkmanytomanyselectrelation.inc » class.atkmanytoonerelation.inc » class.atkmanytoonetreerelation.inc » class.atkmatrixrelation.inc » class.atkonetomanyrelation.inc » class.atkonetoonerelation.inc » class.atkrelation.inc » class.atksecurerelation.inc » class.atkshuttlecontrol.inc » class.atkshuttlefilter.inc » class.atkshuttlerelation.inc security » class.atkbajusencryption.inc » class.atkbase64encryption.inc » class.atkencryption.inc » class.atkmocksecuritymanager.inc » class.atkmocksecuritymanager.inc » class.atkopensslencryption.inc » class.atksecuritylistener.inc » class.atksecuritymanager.inc » class.atkurlvault.inc » class.auth_config.inc » class.auth_db.inc » class.auth_imap.inc » class.auth_interface.inc » class.auth_ldap.inc » class.auth_none.inc » class.auth_pop3.inc » class.auth_saml.inc » class.auth_server.inc » class.auth_sspi.inc session » class.atksessionmanager.inc » class.atkstate.inc skel » app.php » atk.inc » config.inc.php » debugger.php » dispatch.php » include.php » index.php » menu.php » top.php » welcome.php subpackage » class.atkattributetestcase.inc test » class.atkcachetestcase.inc » class.atkplugintestcase.inc » class.atktestcase.inc testcases » class.atkabstractsearchhandler.inc themes » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc ui » block.atknavigator.php » block.atknavigatorinfo.php » class.atkactionboxbuilder.inc » class.atkdialog.inc » class.atkindexpage.inc » class.atkoutput.inc » class.atkpage.inc » class.atkpagebuilder.inc » class.atktheme.inc » class.atkthemecompiler.inc » class.atkui.inc » function.atkconf.php » function.atkconfig.php » function.atkdatefield.php » function.atkdispatchfile.php » function.atkfrontcontroller.php » function.atkloadscript.php » function.atkmessages.php » function.atkmoduledir.php » function.atkscript.php » function.atkstyle.php » function.atktext.php » function.atkthemeicon.php » function.atkthemeimg.php » function.stacktrace.php » modifier.atkjson.php » modifier.atkvardump.php » resource.string.php » resource.theme.php » resource.ui.php utils » atkbrowsertools.inc » class.atkactionlistener.inc » class.atkclassloader.inc » class.atkcompatselector.inc » class.atkdataholder.inc » class.atkdebugger.inc » class.atkdirectorytraverser.inc » class.atkeventlog.inc » class.atkfileutils.inc » class.atkframeset.inc » class.atkiputils.inc » class.atkjson.inc » class.atkmail.inc » class.atkmailer.inc » class.atkmessagequeue.inc » class.atkmlselector.inc » class.atkmlsplitter.inc » class.atkselector.inc » class.atkselectoriterator.inc » class.atkstring.inc » class.atkstringparser.inc » class.atktablerenderer.inc » class.atktablerenderergrouped.inc » class.atktextmarker.inc » class.atktmpfile.inc » class.atktriggerlistener.inc » class.atkyaml.inc » class.atkzip.inc » help.inc wizard » class.atkwizard.inc » class.atkwizardactionloader.inc » class.atkwizardpanel.inc
Home  ->  Documentation home  ->  Atk index  ->  Docs For Class atkQuery [ package: atk ]

Class: atkQuery

Source Location: /db/class.atkquery.inc

Class atkQuery

Descendants

Child Class Description
atkDb2Query SQL Builder for IBM db2 databases.
atkMysqlQuery SQL Builder for MySQL databases.
atkOci8Query Query build for Oracle 8i databases.
atkPgsqlQuery SQL query builder for PostgreSQL.
atkMockQuery A mock query abstraction.

[ Top ]

Property Summary

mixed   $m_aliases   Array with aliases
mixed   $m_conditions   Array with conditions
mixed   $m_db   The database that this query does it's thing on
mixed   $m_distinct   Do we need to perform a DISTINCT query?
mixed   $m_expressions   Array with expressions.
mixed   $m_fieldaliases   Array with field aliases
String   $m_fieldquote   The quote char to put around fields, for example `
mixed   $m_fields   Array with Fieldnames
mixed   $m_generatedAlias   Array with generated aliasses
mixed   $m_groupbys   Array with group by statements
mixed   $m_joinaliases   Array with aliases from joins
mixed   $m_joins   Array with Joins
mixed   $m_limit  
mixed   $m_offset   Do we need to fetch only a specific set of records?
mixed   $m_orderbys   Array with order by statements
Array   $m_quotedfields   Wether or not a field should be quoted in a query
Array   $m_reservedNames   Names reserved by the database, if any of these are used ATK MUST quote the fieldname or the database engine will not be able to make any sense of the queries.
mixed   $m_searchconditions  
mixed   $m_searchmethod   Var with AND or OR method
mixed   $m_tables   Array with tables

[ Top ]

Method Summary

static string   exactNumberCondition()   Generate a searchcondition that check number/decimal literal values
atkQuery   addCondition()   Add a query condition (conditions are where-expressions that are AND-ed)
atkQuery   &addExpression()   Add's an expression to the select query
atkQuery   &addField()   Add's a field to the query
atkQuery   addFields()   Add multiple fields at once
atkQuery   &addGroupBy()   Add a group-by statement
atkQuery   &addJoin()   Add join to Join Array
atkQuery   &addOrderBy()   Add order-by statement
atkQuery   &addSearchCondition()   Add search condition to the query. Basically similar to addCondition, but searchconditions make use of the searchmode setting to determine whether the different searchconditions should be and'ed or or'ed.
atkQuery   addSequenceField()   Add's a sequence field to the query.
atkQuery   &addTable()   Add table to Tables array
void   atkquery()   Initialize all variables
unknown   betweenCondition()   Get the between condition
String   buildCount()   Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.
String   buildDelete()   Builds the SQL Delete query
String   buildInsert()   Builds the SQL Insert query
String   buildSelect()   Builds the SQL Select query
String   buildUpdate()   Builds the SQL Update query
void   clearExpressions()   Clear expression list.
void   clearFields()   Clear field list.
atkQuery   &create()   Static factory method. This method returns a new instance of a query object for the current database.
void   deAlias()   Search Alias in alias array
string   exactCondition()   Generate a searchcondition that checks whether $value matches $field exactly.
void   executeDelete()   Wrapper function to execute a delete query
void   executeInsert()   Wrapper function to execute an insert query
array   executeSelect()   Wrapper function to execute a select query.
void   executeUpdate()   Wrapper function to execute an update query
atkDb   getDb()   Returns the database instance.
void   greaterthanCondition()   Generate searchcondition with greater than
void   greaterthanequalCondition()   Generate searchcondition with greater than
void   lessthanCondition()   Generate searchcondition with less than
void   lessthanequalCondition()   Generate searchcondition with less than
void   notNullCondition()   Generate a searchcondition that checks if the field is not null.
void   nullCondition()   Generate a searchcondition that checks if the field is null.
The   quoteField()   If we set a m_fieldquote you can pass a field to this function and it will quote all the identifiers (db, table, column, etc...) in the field.
Array   quoteFields()   Quote an array of fields if m_fieldquote is set.
void   setDb()   Sets the database instance.
atkQuery   &setDistinct()   Set the 'distinct' mode for the query.
atkQuery   &setLimit()   Set a limit to the number of results.
void   setSearchMethod()   Sets this queries search method.
String   substringCondition()   Generate a searchcondition that checks whether $field contains $value .
void   wildcardCondition()   Generate a searchcondition that accepts '*' as wildcard character.
void   _addFrom()   Add FROM clause to query.
void   _addLimiter()   Add limiting clauses to the query.
void   _addOrderBy()   Add the ORDER BY clause

[ Top ]

Properties

mixed   $m_aliases [line 64]

Array with aliases


[ Top ]
mixed   $m_conditions [line 53]

Array with conditions


[ Top ]
mixed   $m_db [line 112]

The database that this query does it's thing on


[ Top ]
mixed   $m_distinct = false [line 95]

Do we need to perform a DISTINCT query?


[ Top ]
mixed   $m_expressions [line 43]

Array with expressions.


[ Top ]
mixed   $m_fieldaliases [line 69]

Array with field aliases


[ Top ]
String   $m_fieldquote [line 119]

The quote char to put around fields, for example `

API Tags:
Access:  private


Redefined in descendants as:

[ Top ]
mixed   $m_fields [line 38]

Array with Fieldnames


[ Top ]
mixed   $m_generatedAlias [line 107]

Array with generated aliasses

Oracle has a problem when aliases are too long


[ Top ]
mixed   $m_groupbys [line 85]

Array with group by statements


[ Top ]
mixed   $m_joinaliases [line 74]

Array with aliases from joins


[ Top ]
mixed   $m_joins [line 80]

Array with Joins


[ Top ]
mixed   $m_limit [line 101]

[ Top ]
mixed   $m_offset [line 100]

Do we need to fetch only a specific set of records?


[ Top ]
mixed   $m_orderbys [line 90]

Array with order by statements


[ Top ]
Array   $m_quotedfields = array() [line 127]

Wether or not a field should be quoted in a query

API Tags:
Access:  private


[ Top ]
Array   $m_reservedNames = array('from','select','order','group','release', 'index', 'table') [line 137]

Names reserved by the database, if any of these are used ATK MUST quote the fieldname or the database engine will not be able to make any sense of the queries.

API Tags:
Access:  private


[ Top ]
mixed   $m_searchconditions [line 54]

[ Top ]
mixed   $m_searchmethod [line 59]

Var with AND or OR method


[ Top ]
mixed   $m_tables [line 48]

Array with tables


[ Top ]

Methods

static method exactNumberCondition  [line 773]

  static string exactNumberCondition( string $field, mixed $value  )

Generate a searchcondition that check number/decimal literal values

Parameters:
string   $field:  full qualified table column
mixed   $value:  integer/float/double etc.

API Tags:
Return:  piece of where clause to use in your SQL statement
Access:  public


[ Top ]
addCondition  [line 363]

  atkQuery addCondition( string $condition  )

Add a query condition (conditions are where-expressions that are AND-ed)

Parameters:
string   $condition:  Condition

API Tags:
Return:  The query object itself (for fluent usage)
Access:  public


[ Top ]
addExpression  [line 272]

  atkQuery &addExpression( string $fieldName, string $expression, [string $fieldAliasPrefix = ""], [bool $quoteFieldName = false]  )

Add's an expression to the select query

Parameters:
string   $fieldName:  expression field name
string   $expression:  expression value
string   $fieldAliasPrefix:  field alias prefix
bool   $quoteFieldName:  wether or not to quote the expression field name

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
addField  [line 201]

  atkQuery &addField( string $name, [string $value = ""], [string $table = ""], [string $fieldaliasprefix = ""], [bool $quote = true], [bool $quotefield = false]  )

Add's a field to the query

Parameters:
string   $name:  Field name
string   $value:  Field value
string   $table:  Table name
string   $fieldaliasprefix:  Field alias prefix
bool   $quote:  If this parameter is true, stuff is inserted into the db using quotes, e.g. SET name = 'piet'. If it is false, it's done without quotes, e.d. SET number = 4.
bool   $quotefield:  Wether or not to quote the fieldname

API Tags:
Return:  The query object itself (for fluent usage)


Redefined in descendants as:

[ Top ]
addFields  [line 254]

  atkQuery addFields( $fields, [string $table = ""], [string $fieldaliasprefix = ""], [bool $quote = true], [bool $quotefield = false]  )

Add multiple fields at once

Parameters:
array   $fields:  array with field value pairs
string   $table:  Table name
string   $fieldaliasprefix:  Field alias prefix
bool   $quote:  If this parameter is true, stuff is inserted into the db using quotes, e.g. SET name = 'piet'. If it is false, it's done without quotes, e.d. SET number = 4.
bool   $quotefield:  Wether or not to quote the fieldname

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
addGroupBy  [line 339]

  atkQuery &addGroupBy( String $element  )

Add a group-by statement

Parameters:
String   $element:  Group by expression

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
addJoin  [line 326]

  atkQuery &addJoin( string $table, string $alias, string $condition, [bool $outer = false]  )

Add join to Join Array

Parameters:
string   $table:  Table name
string   $alias:  Alias of table
string   $condition:  Condition for the Join
bool   $outer:  Wether to use an outer (left) join or an inner join

API Tags:
Return:  The query object itself (for fluent usage)


Redefined in descendants as:

[ Top ]
addOrderBy  [line 351]

  atkQuery &addOrderBy( String $element  )

Add order-by statement

Parameters:
String   $element:  Order by expression

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
addSearchCondition  [line 394]

  atkQuery &addSearchCondition( string $condition  )

Add search condition to the query. Basically similar to addCondition, but searchconditions make use of the searchmode setting to determine whether the different searchconditions should be and'ed or or'ed.

Parameters:
string   $condition:  Condition

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
addSequenceField  [line 235]

  atkQuery addSequenceField( string $fieldName, &$value, [string $seqName = null], int $value  )

Add's a sequence field to the query.

Parameters:
string   $fieldName:  field name
int   $value:  field to store the new sequence value in, note certain drivers might populate this field only after the insert query has been executed
string   $seqName:  sequence name (optional for certain drivers)
   &$value: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
addTable  [line 311]

  atkQuery &addTable( string $name, [string $alias = ""]  )

Add table to Tables array

Parameters:
string   $name:  Table name
string   $alias:  Alias of table

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
atkquery  [line 142]

  void atkquery( )

Initialize all variables



[ Top ]
betweenCondition  [line 896]

  unknown betweenCondition( String $field, Mixed $value1, Mixed $value2, [Bool $quote = true]  )

Get the between condition

Parameters:
String   $field:  The database field
Mixed   $value1:  The first value
Mixed   $value2:  The second value
Bool   $quote:  Add quotes?


[ Top ]
buildCount  [line 562]

  String buildCount( [bool $distinct = FALSE]  )

Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.

Parameters:
bool   $distinct:  distinct rows?

API Tags:
Return:  a SQL Select COUNT(*) Query


Redefined in descendants as:
  • atkDb2Query::buildCount() : Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.
  • atkMysqlQuery::buildCount() : Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.
  • atkOci9Query::buildCount() : Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.
  • atkPgsqlQuery::buildCount() : Builds the SQL Select COUNT(*) query. This is different from select, because we do joins, like in a select, but we don't really select the fields.

[ Top ]
buildDelete  [line 680]

  String buildDelete( )

Builds the SQL Delete query


API Tags:
Return:  a SQL Delete Query


[ Top ]
buildInsert  [line 652]

  String buildInsert( )

Builds the SQL Insert query


API Tags:
Return:  a SQL Insert Query


Redefined in descendants as:

[ Top ]
buildSelect  [line 434]

  String buildSelect( [bool $distinct = FALSE]  )

Builds the SQL Select query

Parameters:
bool   $distinct:  distinct records?

API Tags:
Return:  a SQL Select Query


Redefined in descendants as:

[ Top ]
buildUpdate  [line 614]

  String buildUpdate( )

Builds the SQL Update query


API Tags:
Return:  a SQL Update Query


[ Top ]
clearExpressions  [line 300]

  void clearExpressions( )

Clear expression list.


API Tags:
Access:  public


[ Top ]
clearFields  [line 292]

  void clearFields( )

Clear field list.


API Tags:
Access:  public


[ Top ]
create  [line 910]

  atkQuery &create( [string $basepath = "atk.db."]  )

Static factory method. This method returns a new instance of a query object for the current database.

Parameters:
string   $basepath:  The basepath for the database object (defaults to 'atk.db')

API Tags:
Return:  A Query object for the appropriate database


[ Top ]
deAlias  [line 705]

  void deAlias( &$record, array $record  )

Search Alias in alias array

Parameters:
array   $record:  Array with fields
   &$record: 


[ Top ]
exactCondition  [line 752]

  string exactCondition( string $field, mixed $value, [string $dbFieldType = null]  )

Generate a searchcondition that checks whether $value matches $field exactly.

Parameters:
string   $field:  full qualified table column
mixed   $value:  string/number/decimal expected column value
string   $dbFieldType:  help determine exact search method

API Tags:
Return:  piece of where clause to use in your SQL statement


[ Top ]
executeDelete  [line 695]

  void executeDelete( )

Wrapper function to execute a delete query



[ Top ]
executeInsert  [line 642]

  void executeInsert( )

Wrapper function to execute an insert query



Redefined in descendants as:

[ Top ]
executeSelect  [line 523]

  array executeSelect( [boolean $distinct = FALSE]  )

Wrapper function to execute a select query.

Parameters:
boolean   $distinct:  Set to true to perform a distinct select, false for a regular select.

API Tags:
Return:  The set of records returned by the database.
Access:  public


[ Top ]
executeUpdate  [line 633]

  void executeUpdate( )

Wrapper function to execute an update query



Redefined in descendants as:

[ Top ]
getDb  [line 179]

  atkDb getDb( )

Returns the database instance.


API Tags:
Return:  database instance
Access:  public


[ Top ]
greaterthanCondition  [line 821]

  void greaterthanCondition( String $field, String $value  )

Generate searchcondition with greater than

Parameters:
String   $field:  The database field
String   $value:  The value


[ Top ]
greaterthanequalCondition  [line 839]

  void greaterthanequalCondition( String $field, String $value  )

Generate searchcondition with greater than

Parameters:
String   $field:  The database field
String   $value:  The value


[ Top ]
lessthanCondition  [line 857]

  void lessthanCondition( String $field, String $value  )

Generate searchcondition with less than

Parameters:
String   $field:  The database field
String   $value:  The value


[ Top ]
lessthanequalCondition  [line 875]

  void lessthanequalCondition( String $field, String $value  )

Generate searchcondition with less than

Parameters:
String   $field:  The database field
String   $value:  The value


[ Top ]
notNullCondition  [line 737]

  void notNullCondition( String $field, [Bool $emptyStringIsNull = false]  )

Generate a searchcondition that checks if the field is not null.

Parameters:
String   $field: 
Bool   $emptyStringIsNull: 


[ Top ]
nullCondition  [line 723]

  void nullCondition( String $field, [Bool $emptyStringIsNull = false]  )

Generate a searchcondition that checks if the field is null.

Parameters:
String   $field: 
Bool   $emptyStringIsNull: 


[ Top ]
quoteField  [line 924]

  The quoteField( String $field  )

If we set a m_fieldquote you can pass a field to this function and it will quote all the identifiers (db, table, column, etc...) in the field.

Parameters:
String   $field:  The field to add quotes too

API Tags:
Return:  quoted field, if we have a fieldquote


[ Top ]
quoteFields  [line 953]

  Array quoteFields( Array $fields  )

Quote an array of fields if m_fieldquote is set.

Uses $this->quoteField($field)

Parameters:
Array   $fields:  The fields to add quotes to

API Tags:
Return:  The quoted fields


[ Top ]
setDb  [line 169]

  void setDb( $db  )

Sets the database instance.

Parameters:
   $db: 

API Tags:
Access:  public


[ Top ]
setDistinct  [line 409]

  atkQuery &setDistinct( Bool $distinct  )

Set the 'distinct' mode for the query.

If set to true, a 'SELECT DISTINCT' will be performed. If set to false, a regular 'SELECT' will be performed.

Parameters:
Bool   $distinct:  Set to true to perform a distinct select, false for a regular select.

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
setLimit  [line 422]

  atkQuery &setLimit( int $offset, int $limit  )

Set a limit to the number of results.

Parameters:
int   $offset:  Retrieve records starting with record ...
int   $limit:  Retrieve only this many records.

API Tags:
Return:  The query object itself (for fluent usage)


[ Top ]
setSearchMethod  [line 380]

  void setSearchMethod( string $searchMethod  )

Sets this queries search method.

Parameters:
string   $searchMethod:  search method

API Tags:
Access:  public


[ Top ]
substringCondition  [line 785]

  String substringCondition( String $field, String $value  )

Generate a searchcondition that checks whether $field contains $value .

Parameters:
String   $field:  The field
String   $value:  The value

API Tags:
Return:  The substring condition


Redefined in descendants as:

[ Top ]
wildcardCondition  [line 803]

  void wildcardCondition( String $field, String $value  )

Generate a searchcondition that accepts '*' as wildcard character.

Parameters:
String   $field: 
String   $value: 


[ Top ]
_addFrom  [line 505]

  void _addFrom( &$query, String $query  )

Add FROM clause to query.

Parameters:
String   $query:  The query
   &$query: 


Redefined in descendants as:
  • atkMysqliQuery::_addFrom() : Overriding the _addFrom function to support a change that was made in MySQL 5.0.15 to make MySQL more compliant with the standard.

[ Top ]
_addLimiter  [line 535]

  void _addLimiter( &$query, string $query  )

Add limiting clauses to the query.

Default implementation: no limit supported. Derived classes should implement this.

Parameters:
string   $query:  The query to add the limiter to
   &$query: 


Redefined in descendants as:

[ Top ]
_addOrderBy  [line 545]

  void _addOrderBy( &$query, String $query  )

Add the ORDER BY clause

Parameters:
String   $query:  The query
   &$query: 


Redefined in descendants as:

[ Top ]
Home | About | Contact