Docs For Class atkDb
Atk API home Class tree Element index

Todo list

Packages: » atk Classes: skel- » atkAppSuite utils » atkAbstractFrame » atkActionListener » atkClassFinder » atkClassLoader » atkDataHolder » atkDebugger » atkDirectoryTraverser » atkEventLog » atkFileUtils » atkFrame » atkFrameSet » atkIpUtils » atkJSON » atkMail » atkMailer » atkMessageQueue » atkmlsplitter » atkNavigator » atkRootFrameset » atkSelector » atkString » atkStringParser » atkTableRenderer » atkTableRendererGrouped » atkTextMarker » atkTmpFile » atkTriggerListener » atkYAML » atkZip » browserInfo » listenerTest » simplevisitor » testNode » test_atkactionlistener » test_atkclassloader » test_atkcolumnconfig » test_atkDirectoryTraverser » test_atklistattribute » test_atkStringParser » test_atkTextMarker general » atkConfig » atkController » atkDataNode » atkErrorHandlerBase » atkFileEditor » atkLanguage » atkMailErrorHandler » atkMetaNode » atkMockNode » atkNode » atkNodeValidator » atkSessionStore » atkTreeNode » atkWizardBase » atkZendPlatformErrorHandler » clsTbsDataSource » clsTbsLocator » clsTinyButStrong » clsTinyButStrongOOo » FCKeditor » getSupportedLanguagesCollector » layout » node » sql_whereclause_blacklist_checker » test » tree » triggerNode fixture » atkAbstractFixtureLoader » atkFixtureManager » atkPHPFixtureLoader » atkYAMLFixtureLoader testcases » atkAbstractSearchHandler » DateAttributeWrapper » dummyTagAttribute » Stub_atkNew » test_atkattributeedithandler » test_atkBoolAttribute » test_atkCalculatorAttribute » test_atkcolorpickerattribute » test_atkDataGrid » test_atkdatanode » test_atkDateAttribute » test_atkFileAttribute » test_atkfrontcontroller » test_atkiputils » test_atkManyToOneRelation » test_atknode » test_atkRelation » test_atktagattribute » test_atkwizard » test_tabs » uriPartsFrontControllerMock 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 » test_atkimporthandler 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 » atkHtmlAttribute » atkIpAttribute » atkListAttribute » atkLiveTextPreview » atkMlAttribute » 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 » test_atkattribute » test_atkmultiselectattribute » test_atktextattribute 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_server » auth_sspi » test_atkMockSecurityManager » test_atkUrlVault cache » atkCache » atkCache_apc » atkCache_eaccelerator » atkCache_file » atkCache_memcache » atkCache_var » atkCache_xcache » atkCache_zp_disk » atkCache_zp_output » atkCache_zp_shm » test_atkcache_apc » test_atkcache_eaccelerator » test_atkcache_file » test_atkcache_memcache » test_atkcache_var » test_atkcache_xcache » test_atkcache_zp_disk » test_atkcache_zp_output » test_atkcache_zp_shm test » ArrayHtmlReporter » ArrayTextReporter » atkCacheTestCase » atkPHPUnitTestCaseCollector » atkPluginTestCase » atkSimpleTestTestCaseCollector » atkTestCase » atkTestCaseCollector » atkTestReporter » atkTestSuite » atkTestTraverser » test_atkMockNode » test_atktestcase » test_atktools » Test_DbConfigs » test_sql_whereclause_blacklist_checker » test_tabsecurity » test_triggers db » atkClusterDb » atkClusterDDL » atkClusterQuery » atkDb » atkDDL » atkMockDb » atkMockDDL » atkMockQuery » atkMsSqlDb » atkMsSqlDDL » atkMssqlQuery » atkMysqlDb » atkMysqlDDL » atkMysqliDb » atkMysqliDDL » atkMysqliQuery » atkMysqlQuery » atkOci8Db » atkOci8DDL » atkOci8Query » atkOci9Db » atkOci9DDL » atkOci9Query » atkOci805Db » atkOci805Query » atkPgsqlDb » atkPgsqlDDL » atkPgsqlQuery » atkQuery » test_atkdb recordlist » atkColumnConfig » atkCSVRecordList » atkCustomRecordList » atkExcelCSVRecordList » atkHTMLRecordList » atkPrintableRecordList » atkRecordList » atkRecordlistCache » atkTotalizer 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 » atkOneToManyRelationSessionGridHandler » atkOneToOneRelation » atkRelation » atkSecureRelation » atkShuttleControl » atkShuttleFilter » atkShuttleRelation front » atkFrontController » atkFrontControllerBridge keyboard » atkKeyboard meta-relations » atkMetaExtendableShuttleRelation » atkMetaManyBoolRelation » atkMetaManyToManyListRelation » atkMetaManyToManySelectRelation » atkMetaManyToOneRelation » atkMetaOneToManyRelation » atkMetaOneToOneRelation » atkMetaShuttleRelation modules » atkModule » mod_test interface » atkServer » atkSoapServer session » atkSessionManager » atkState wizard » atkWizard » AtkWizardActionLoader » atkWizardPanel attribute » test_atkcurrencyattribute » test_atknumberattribute
Interfaces: datagrid » atkDGListener interface » atkServerInterface
Files: general » adodb-time.inc.php » atknodetools.inc » atktools.inc » atktreetools.inc » basexml.php » class.atkconfig.inc » class.atkcontroller.inc » class.atkdatanode.inc » class.atkerrorhandlerbase.inc » class.atkfileeditor.inc » class.atklanguage.inc » class.atkmailerrorhandler.inc » class.atkmetanode.inc » class.atkmocknode.inc » class.atknode.inc » class.atknodevalidator.inc » class.atksessionstore.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 » class.test_triggers.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 » upload.php » util.php » version.inc attribute » class.test_atkcurrencyattribute.inc » class.test_atknumberattribute.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.atkhtmlattribute.inc » class.atkipattribute.inc » class.atklistattribute.inc » class.atklivetextpreview.inc » class.atkmlattribute.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 » class.test_atkattribute.inc » class.test_atkmultiselectattribute.inc » class.test_atktextattribute.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 » class.test_atkcache_apc.inc » class.test_atkcache_eaccelerator.inc » class.test_atkcache_file.inc » class.test_atkcache_memcache.inc » class.test_atkcache_var.inc » class.test_atkcache_xcache.inc » class.test_atkcache_zp_disk.inc » class.test_atkcache_zp_output.inc » class.test_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.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 » class.test_atkdb.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 » class.test_atkimporthandler.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 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.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_server.inc » class.auth_sspi.inc » class.test_atkmocksecuritymanager.inc » class.test_atkurlvault.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 » test.php » top.php » welcome.php skel- » atkappsuite.php subpackage » class.atkattributetestcase.inc test » class.atkcachetestcase.inc » class.atkphpunittestcasecollector.inc » class.atkplugintestcase.inc » class.atksimpletesttestcasecollector.inc » class.atktestcase.inc » class.atktestcasecollector.inc » class.atktestreporter.inc » class.atktestsuite.inc » class.atktesttraverser.inc » class.test_atkmocknode.inc » class.test_atktestcase.inc » class.test_atktools.inc » class.test_dbconfigs.inc » class.test_tabsecurity.inc testcases » class.atkabstractsearchhandler.inc » class.stub_atknew.inc » class.test_atkattributeedithandler.inc » class.test_atkboolattribute.inc » class.test_atkcalculatorattribute.inc » class.test_atkcolorpickerattribute.inc » class.test_atkdatagrid.inc » class.test_atkdatanode.inc » class.test_atkdateattribute.inc » class.test_atkfileattribute.inc » class.test_atkfrontcontroller.inc » class.test_atkiputils.inc » class.test_atkmanytoonerelation.inc » class.test_atknode.inc » class.test_atkrelation.inc » class.test_atktagattribute.inc » class.test_atkwizard.inc » class.test_tabs.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.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.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.atkmlsplitter.inc » class.atknavigator.inc » class.atkselector.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 » class.test_atkactionlistener.inc » class.test_atkclassloader.inc » class.test_atkcolumnconfig.inc » class.test_atkdirectorytraverser.inc » class.test_atklistattribute.inc » class.test_atkstringparser.inc » class.test_atktextmarker.inc » help.inc wizard » class.atkwizard.inc » class.atkwizardactionloader.inc » class.atkwizardpanel.inc
Home  ->  Documentation home  ->  Atk index  ->  Docs For Class atkDb [ package: atk ]

Class: atkDb

Source Location: /db/class.atkdb.inc

Class atkDb

Descendants

Child Class Description
atkClusterDb ATK driver for clustered databases. This class proxies queries to correct read/write slaves.
atkMockDb A mock database driver.
atkMysqlDb Driver for MySQL databases.
atkOci8Db Driver for Oracle 8i databases.
atkPgsqlDb Database driver for PostgreSQL.

[ Top ]

Property Summary

int   $m_affected_rows   number of affected rows after an update/delete/insert query
boolean   $m_auto_free   Auto free result upon next query.
String   $m_charset   The character set.
String   $m_collate   The collate.
String   $m_connection   The current connection name.
String   $m_database   The name of the database/schema to use.
int   $m_errno   Contains error number, in case an error occurred.
String   $m_error   Contains textual error message, in case an error occurred.
mixed   $m_errorLookup   Internal use; error messages from language files are cached here
boolean   $m_haltonerror   If true, an atkerror is raised when an error occurred.
String   $m_host   The hostname/ip to connect to.
unknown_type   $m_identifierQuoting   Indentifier Quoting
Resource   $m_link_id   The connection is stored in this variable.
String   $m_mode   The mode for the connection.
String   $m_password   The password for the connection.
String   $m_port   The port for the connection.
Resource   $m_query_id   The query statement is stored in this variable.
array   $m_record   Contains the current record from the result set.
int   $m_row   Current row number
array   $m_tableMeta   array to cache meta-information about tables.
String   $m_type   Driver name.
String   $m_user   The username for the connection.
array   $m_user_error   List of error codes that could be caused by an end-user.
String   $m_vendor   Vendor.

[ Top ]

Method Summary

static void   clearMapping()   Clear the current database mapping.
static atkDb   &getInstance()   Get database instance.
static mixed   getMapping()   Returns the current database mapping.
static void   getTranslatedDatabaseName()   Returns the real database name. If a mapping
static void   useMapping()   Use the given mapping to translate database requests from one database to another database. This can be used for test purposes.
static mixed   _getOrUseMapping()   Get or set the database mapping
int   affected_rows()   Retrieve the number of rows affected by the last query.
void   cloneAll()   Clones the database structure of the given database to this database. This also means the complete database is emptied beforehand.
void   commit()   Commit the current transaction.
int   connect()   Connect to the database.
atkDDL   &createDDL()   Create an atkDDL object for constructing ddl queries.
atkQuery   &createQuery()   Create an atkQuery object for constructing queries.
void   deleteAll()   Empty all database tables.
void   disconnect()   Disconnect from database
void   doConnect()   Connect to the database
void   dropAll()   Drop all database tables.
string   errorLookup()   Looks up the error
String   escapeSQL()   escapes quotes for use in SQL: ' -> '' (and sometimes % -> %%)
unknown   func_concat()   Get CONCAT() equivalent for the current database.
string   func_concat_ws()   Get CONCAT_WS() equivalent for the current database.
String   func_datetimetochar()   Get TO_CHAR() equivalent for the current database.
String   func_datetochar()   Get TO_CHAR() equivalent for the current database.
void   func_now()   get NOW() or SYSDATE() equivalent for the current database
void   func_substring()   get SUBSTRING() equivalent for the current database.
int   getAtkDbErrno()   Get generic atk errorccode
mixed   getDbErrno()   Get vendor-dependent database error number.
String   getDbError()   Get vendor-dependent database error message.
DB_SUCCESS   getDbStatus()   Check if current db is present and acceptable for current user
String   getErrorMsg()   Get localized error message (for display in the application)
String   getErrorType()   Determine whether an error that occurred is a recoverable (user) error or a system error.
string   getQueryMode()   Returns the query mode
array   getrows()   Get all rows that are the result of a certain specified query
array   getSearchModes()   This function indicates what searchmodes the database supports.
String   getType()   Get the database driver type.
mixed   getValue()   Get a single value (first row, first column) from a certain specified query
array   getValues()   Get an array with all the values in the (first) column.
void   halt()   If haltonerror is set, this will raise an atkerror. If not, it will place the error in atkdebug and continue.
void   hasError()   Has error?
bool   hasMode()   Check if the current instance has the given mode
atkDb   init()   (Re)Initialise a database driver with a connection
Connection   link_id()   Get the current connection.
boolean   lock()   Lock a table in the database.
Integer   maxIdentifierLength()   Returns the maximum length an identifier (tablename, columnname, etc) may have
array   metadata()   Return the meta data of a certain table HIE GEBLEVEN
int   nextid()   Get the next sequence number of a certain sequence.
mixed   next_record()   Retrieve the next record in the resultset.
void   query()   Parse and execute a query.
Resource   query_id()   Get the current query statement resource id.
string   quoteIdentifier()   Quote Indentifier
void   rollback()   Rollback the current transaction.
void   savepoint()   Set savepoint with the given name.
void   setHaltOnError()   Halt on error or not?
void   &setInstance()   Replace the current instance of a named connection at runtime with a different connection. This is useful for example for replacing a named database instance with a mock object for testing purposes.
void   setSequenceValue()   Set database sequence value.
void   setUserError()   Define custom user error codes.
bool   tableExists()   This function checks the database for a table with the provide name
array   tableMeta()   Fetches table meta data from database
array   table_names()   Return the available table names
void   toggleForeignKeys()   Enable/disable all foreign key constraints.
boolean   unlock()   Relieve all locks.
String   vendorDateFormat()   Convert a php date() format specifier to a vendor specific format specifier.
array   _getTableMetaFromCache()   If cached it'll return the table metadata from cache.
array   _getTableMetaFromDb()   Returns the tablemetadata directly from db
int   _translateError()   Translate database-vendor dependent error messages into an ATK generic error code.

[ Top ]

Properties

int   $m_affected_rows = 0 [line 194]

number of affected rows after an update/delete/insert query

API Tags:
Access:  private


[ Top ]
boolean   $m_auto_free = true [line 225]

Auto free result upon next query.

When set to true, the previous results are cleared when a new query is executed. It should generally not be necessary to put this to false.

API Tags:
Access:  private


[ Top ]
String   $m_charset = "" [line 104]

The character set.

API Tags:
Access:  private


[ Top ]
String   $m_collate = "" [line 111]

The collate.

API Tags:
Access:  private


[ Top ]
String   $m_connection = "" [line 125]

The current connection name.

API Tags:
Access:  private


[ Top ]
String   $m_database = "" [line 76]

The name of the database/schema to use.

API Tags:
Access:  private


[ Top ]
int   $m_errno = 0 [line 146]

Contains error number, in case an error occurred.

API Tags:
Access:  private


[ Top ]
String   $m_error = "" [line 153]

Contains textual error message, in case an error occurred.

API Tags:
Access:  private


[ Top ]
mixed   $m_errorLookup = array() [line 241]

Internal use; error messages from language files are cached here

API Tags:
Access:  private


[ Top ]
boolean   $m_haltonerror = true [line 165]

If true, an atkerror is raised when an error occurred.

The calling script can use this to stop execution and rollback. If false, the error will be ignored and script execution continues. Use this only for queries that may fail but still be valid.

API Tags:
Access:  private


[ Top ]
String   $m_host = "" [line 69]

The hostname/ip to connect to.

API Tags:
Access:  private


[ Top ]
unknown_type   $m_identifierQuoting = array('start' => '"', 'end' => '"', 'escape' => '"') [line 248]

Indentifier Quoting

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
Resource   $m_link_id = 0 [line 208]

The connection is stored in this variable.

API Tags:
Access:  private


[ Top ]
String   $m_mode = "" [line 118]

The mode for the connection.

API Tags:
Access:  private


[ Top ]
String   $m_password = "" [line 90]

The password for the connection.

API Tags:
Access:  private


[ Top ]
String   $m_port = "" [line 97]

The port for the connection.

API Tags:
Access:  private


Redefined in descendants as:

[ Top ]
Resource   $m_query_id = 0 [line 215]

The query statement is stored in this variable.

API Tags:
Access:  private


[ Top ]
array   $m_record = array() [line 132]

Contains the current record from the result set.

API Tags:
Access:  private


[ Top ]
int   $m_row = 0 [line 139]

Current row number

API Tags:
Access:  private


[ Top ]
array   $m_tableMeta = array() [line 201]

array to cache meta-information about tables.

API Tags:
Access:  private


[ Top ]
String   $m_type = "" [line 176]

Driver name.

Derived classes should add their own m_type var to the class definition and put the correct name in it. (e.g. "mysql" etc.)

API Tags:
Abstract:  
Access:  private


Redefined in descendants as:

[ Top ]
String   $m_user = "" [line 83]

The username for the connection.

API Tags:
Access:  private


[ Top ]
array   $m_user_error = array() [line 235]

List of error codes that could be caused by an end-user.

This type of errors is 'recoverable'. An example is a violation of a unique constraint.

API Tags:
Access:  private


[ Top ]
String   $m_vendor = "" [line 187]

Vendor.

This is mainly used to retrieve things like error messages that are common for a vendor (i.e., they do not differ between versions).

API Tags:
Abstract:  
Access:  private


Redefined in descendants as:

[ Top ]

Methods

static method clearMapping  [line 293]

  static void clearMapping( )

Clear the current database mapping.



Redefined in descendants as:

[ Top ]
static method getInstance  [line 1153]

  static atkDb &getInstance( [String $conn = "default"], [Bool $reset = false], [String $mode = "rw"]  )

Get database instance.

This method instantiates and returns the correct (vendor specific) database instance, depending on the configuration.

Parameters:
String   $conn:  The name of the connection as defined in the config.inc.php file (defaults to 'default')
Bool   $reset:  Reset the instance to force the creation of a new instance
String   $mode:  The mode to connect with the database

API Tags:
Return:  Instance of the database class.
Access:  public


Redefined in descendants as:

[ Top ]
static method getMapping  [line 283]

  static mixed getMapping( )

Returns the current database mapping.

NULL if no mapping is active.


API Tags:
Return:  current database mapping (null if inactive)


Redefined in descendants as:

[ Top ]
static method getTranslatedDatabaseName  [line 308]

  static void getTranslatedDatabaseName( string $name  )

Returns the real database name. If a mapping

exists the mapping is used to translate the database name to it's real database name. If the database name is not part of the mapping or no mapping is set the given name will be returned.

Parameters:
string   $name:  database name


Redefined in descendants as:

[ Top ]
static method useMapping  [line 271]

  static void useMapping( array $mapping  )

Use the given mapping to translate database requests from one database to another database. This can be used for test purposes.

Parameters:
array   $mapping:  database mapping


Redefined in descendants as:

[ Top ]
static method _getOrUseMapping  [line 321]

  static mixed _getOrUseMapping( [array $mapping = "get"]  )

Get or set the database mapping

Parameters:
array   $mapping:  database mapping

API Tags:
Return:  current database mapping (null if inactive)


Redefined in descendants as:

[ Top ]
affected_rows  [line 679]

  int affected_rows( )

Retrieve the number of rows affected by the last query.

After calling query() to perform an update statement, this method will return the number of rows that was updated.


API Tags:
Return:  The number of affected rows
Abstract:  


Redefined in descendants as:

[ Top ]
cloneAll  [line 1114]

  void cloneAll( &$otherDb, atkDb $otherDb  )

Clones the database structure of the given database to this database. This also means the complete database is emptied beforehand.

Parameters:
atkDb   $otherDb:  other database instance
   &$otherDb: 


Redefined in descendants as:

[ Top ]
commit  [line 590]

  void commit( )

Commit the current transaction.


API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
connect  [line 538]

  int connect( [String $mode = "rw"]  )

Connect to the database.

Parameters:
String   $mode:  The mode to connect

API Tags:
Return:  Connection status
Abstract:  


Redefined in descendants as:

[ Top ]
createDDL  [line 1132]

  atkDDL &createDDL( )

Create an atkDDL object for constructing ddl queries.


API Tags:
Return:  DDL object


Redefined in descendants as:

[ Top ]
createQuery  [line 1047]

  atkQuery &createQuery( )

Create an atkQuery object for constructing queries.


API Tags:
Return:  Query class.


Redefined in descendants as:

[ Top ]
deleteAll  [line 1067]

  void deleteAll( )

Empty all database tables.



Redefined in descendants as:

[ Top ]
disconnect  [line 582]

  void disconnect( )

Disconnect from database


API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
doConnect  [line 558]

  void doConnect( string $host, string $user, string $password, string $database, int $port, string $charset  )

Connect to the database

Parameters:
string   $host:  The host to connect to
string   $user:  The user to connect with
string   $password:  The password to connect with
string   $database:  The database to connect to
int   $port:  The portnumber to use for connecting
string   $charset:  The charset to use

API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
dropAll  [line 1098]

  void dropAll( )

Drop all database tables.



Redefined in descendants as:

[ Top ]
errorLookup  [line 443]

  string errorLookup( integer $errno  )

Looks up the error

Parameters:
integer   $errno:  Error number

API Tags:
Return:  The translation for the error


Redefined in descendants as:

[ Top ]
escapeSQL  [line 1035]

  String escapeSQL( String $string, [Bool $wildcard = false]  )

escapes quotes for use in SQL: ' -> '' (and sometimes % -> %%)

Parameters:
String   $string:  The string to escape
Bool   $wildcard:  Use wildcards?

API Tags:
Return:  The escaped SQL string


Redefined in descendants as:

[ Top ]
func_concat  [line 952]

  unknown func_concat( array $fields  )

Get CONCAT() equivalent for the current database.

Parameters:
array   $fields: 


Redefined in descendants as:

[ Top ]
func_concat_ws  [line 968]

  string func_concat_ws( array $fields, string $separator, [boolean $remove_all_spaces = false]  )

Get CONCAT_WS() equivalent for the current database.

Parameters:
array   $fields: 
string   $separator: 
boolean   $remove_all_spaces:  remove all spaces in result (atkAggrecatedColumns searches for string without spaces)


Redefined in descendants as:

[ Top ]
func_datetimetochar  [line 1013]

  String func_datetimetochar( String $fieldname  )

Get TO_CHAR() equivalent for the current database.

TODO/FIXME: add format parameter. Current format is always yyyy-mm-dd hh:mi.

Parameters:
String   $fieldname:  The field to generate the to_char for.

API Tags:
Return:  Piece of sql query that converts a datetime field to char for the current database


Redefined in descendants as:

[ Top ]
func_datetochar  [line 940]

  String func_datetochar( String $fieldname, [String $format = ""]  )

Get TO_CHAR() equivalent for the current database.

Each database driver should override this method to perform vendor specific conversion.

Parameters:
String   $fieldname:  The field to generate the to_char for.
String   $format:  Format specifier. The format is compatible with php's date() function (http://www.php.net/date) The default is what's specified by $config_date_to_char, or "Y-m-d" if not set in the configuration.

API Tags:
Return:  Piece of sql query that converts a date field to char for the current database


Redefined in descendants as:

[ Top ]
func_now  [line 909]

  void func_now( )

get NOW() or SYSDATE() equivalent for the current database

Every database has it's own implementation to get the current date



Redefined in descendants as:

[ Top ]
func_substring  [line 921]

  void func_substring( String $fieldname, [Integer $startat = 0], [Integer $length = 0]  )

get SUBSTRING() equivalent for the current database.

Parameters:
String   $fieldname:  The database fieldname
Integer   $startat:  The position to start from
Integer   $length:  The number of characters


Redefined in descendants as:

[ Top ]
getAtkDbErrno  [line 373]

  int getAtkDbErrno( )

Get generic atk errorccode


API Tags:
Return:  One of the ATK DB_* codes.


Redefined in descendants as:

[ Top ]
getDbErrno  [line 385]

  mixed getDbErrno( )

Get vendor-dependent database error number.

Applications should not rely on this method, if they want to be database independent.


API Tags:
Return:  Database dependent error code.


Redefined in descendants as:

[ Top ]
getDbError  [line 397]

  String getDbError( )

Get vendor-dependent database error message.

Applications should not rely on this method, if they want to be database independent.


API Tags:
Return:  Database dependent error message.


Redefined in descendants as:

[ Top ]
getDbStatus  [line 1259]

  DB_SUCCESS getDbStatus( )

Check if current db is present and acceptable for current user


API Tags:
Return:  if


Redefined in descendants as:

[ Top ]
getErrorMsg  [line 462]

  String getErrorMsg( )

Get localized error message (for display in the application)


API Tags:
Return:  Error message


Redefined in descendants as:

[ Top ]
getErrorType  [line 360]

  String getErrorType( )

Determine whether an error that occurred is a recoverable (user) error or a system error.


API Tags:
Return:  "user" or "system"


Redefined in descendants as:

[ Top ]
getQueryMode  [line 421]

  string getQueryMode( string $query  )

Returns the query mode

Parameters:
string   $query: 

API Tags:
Return:  Return r or w mode


Redefined in descendants as:

[ Top ]
getrows  [line 766]

  array getrows( string $query, [int $offset = -1], [int $limit = -1]  )

Get all rows that are the result of a certain specified query

Note: This is not an efficient way to retrieve records, as this will load all records into one array into memory. If you retrieve a lot of records, you might hit the memory_limit and your script will die.

Parameters:
string   $query:  The query
int   $offset:  The offset to use
int   $limit:  The limit to use

API Tags:
Return:  array with rows


Redefined in descendants as:

[ Top ]
getSearchModes  [line 825]

  array getSearchModes( )

This function indicates what searchmodes the database supports.


API Tags:
Return:  with search modes


Redefined in descendants as:

[ Top ]
getType  [line 333]

  String getType( )

Get the database driver type.


API Tags:
Return:  driver type


Redefined in descendants as:

[ Top ]
getValue  [line 785]

  mixed getValue( string $query, [mixed $default = null]  )

Get a single value (first row, first column) from a certain specified query

Parameters:
string   $query:  The query
mixed   $default:  A default value which will be returned if the query doesn't return a result

API Tags:
Return:  Either the result of the query or the default value


Redefined in descendants as:

[ Top ]
getValues  [line 808]

  array getValues( string $query, [string $key = 0], [int $offset = -1], [int $limit = -1]  )

Get an array with all the values in the (first) column.

Note: This is not an efficient way to retrieve records, as this will load all records into one array into memory. If you retrieve a lot of records, you might hit the memory_limit and your script will die.

Parameters:
string   $query:  The query
string   $key:  You can change the returning column using this parameter
int   $offset:  The offset to use
int   $limit:  The limit to use

API Tags:
Return:  array with rows


Redefined in descendants as:

[ Top ]
halt  [line 504]

  void halt( [String $message = ""]  )

If haltonerror is set, this will raise an atkerror. If not, it will place the error in atkdebug and continue.

Parameters:
String   $message: 

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
hasError  [line 350]

  void hasError( )

Has error?



Redefined in descendants as:

[ Top ]
hasMode  [line 1215]

  bool hasMode( string $mode  )

Check if the current instance has the given mode

Parameters:
string   $mode:  The mode we want to check

API Tags:
Return:  True or False
Access:  public


Redefined in descendants as:

[ Top ]
init  [line 1189]

  atkDb init( [String $connectionname = 'default'], [String $mode = 'r']  )

(Re)Initialise a database driver with a connection

Parameters:
String   $connectionname:  The connectionname
String   $mode:  The mode to connect with

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
link_id  [line 342]

  Connection link_id( )

Get the current connection.


API Tags:
Return:  resource id


Redefined in descendants as:

[ Top ]
lock  [line 654]

  boolean lock( String $table, [String $mode = "write"]  )

Lock a table in the database.

Parameters:
String   $table:  The name of the table to lock.
String   $mode:  The lock type.

API Tags:
Return:  True if succesful, false if not.
Abstract:  


Redefined in descendants as:

[ Top ]
maxIdentifierLength  [line 1023]

  Integer maxIdentifierLength( )

Returns the maximum length an identifier (tablename, columnname, etc) may have


API Tags:
Return:  The maximum identifier length


Redefined in descendants as:

[ Top ]
metadata  [line 724]

  array metadata( string $table, [bool $full = false]  )

Return the meta data of a certain table HIE GEBLEVEN

depending on $full, metadata returns the following values: -full is false (default): $result[]: [0]["table"] table name [0]["name"] field name [0]["type"] field type [0]["len"] field length [0]["flags"] field flags

-full is true: $result[]: ["num_fields"] number of metadata records [0]["table"] table name [0]["name"] field name [0]["type"] field type [0]["len"] field length [0]["flags"] field flags ["meta"][field name] index of field named "field name" The last one is used, if you have a field name, but no index.

Parameters:
string   $table:  the table name
bool   $full:  all meta data or not

API Tags:
Return:  with meta data


Redefined in descendants as:

[ Top ]
nextid  [line 693]

  int nextid( string $sequence  )

Get the next sequence number of a certain sequence.

If the sequence does not exist, it is created automatically.

Parameters:
string   $sequence:  The sequence name

API Tags:
Return:  The next sequence value
Abstract:  


Redefined in descendants as:

[ Top ]
next_record  [line 641]

  mixed next_record( )

Retrieve the next record in the resultset.


API Tags:
Return:  An array containing the record, or 0 if there are no more records to retrieve.
Abstract:  


Redefined in descendants as:

[ Top ]
query  [line 630]

  void query( String $query, [int $offset = -1], [int $limit = -1]  )

Parse and execute a query.

If the query is a select query, the rows can be retrieved using the next_record() method.

Parameters:
String   $query:  The SQL query to execute
int   $offset:  Retrieve the results starting at the specified record number. Pass -1 or 0 to start at the first record.
int   $limit:  Indicates how many rows to retrieve. Pass -1 to retrieve all rows.

API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
query_id  [line 526]

  Resource query_id( )

Get the current query statement resource id.


API Tags:
Return:  Query statement resource id.


Redefined in descendants as:

[ Top ]
quoteIdentifier  [line 1288]

  string quoteIdentifier( string $str  )

Quote Indentifier

Parameters:
string   $str: 


Redefined in descendants as:

[ Top ]
rollback  [line 612]

  void rollback( [string $savepoint = ""]  )

Rollback the current transaction.

(If a savepoint is given to the given savepoint.)

Parameters:
string   $savepoint:  savepoint name

API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
savepoint  [line 600]

  void savepoint( string $name  )

Set savepoint with the given name.

Parameters:
string   $name:  savepoint name

API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
setHaltOnError  [line 1249]

  void setHaltOnError( [Bool $state = true]  )

Halt on error or not?

Parameters:
Bool   $state: 


Redefined in descendants as:

[ Top ]
setInstance  [line 1232]

  void &setInstance( string $name, &$db, object $db  )

Replace the current instance of a named connection at runtime with a different connection. This is useful for example for replacing a named database instance with a mock object for testing purposes.

Parameters:
string   $name: 
object   $db: 
   &$db: 


Redefined in descendants as:

[ Top ]
setSequenceValue  [line 258]

  void setSequenceValue( string $seqname, int $value  )

Set database sequence value.

Parameters:
string   $seqname:  sequence name
int   $value:  sequence value

API Tags:
Abstract:  


Redefined in descendants as:

[ Top ]
setUserError  [line 409]

  void setUserError( mixed $errno  )

Define custom user error codes.

Error codes passed to this method will be treated as recoverable user errors.

Parameters:
mixed   $errno:  Vendor-dependent database error code


Redefined in descendants as:

[ Top ]
tableExists  [line 747]

  bool tableExists( string $tableName  )

This function checks the database for a table with the provide name

Parameters:
string   $tableName:  the table to find

API Tags:
Return:  true if found, false if not found


Redefined in descendants as:

[ Top ]
tableMeta  [line 839]

  array tableMeta( string $table  )

Fetches table meta data from database

Parameters:
string   $table: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
table_names  [line 735]

  array table_names( [boolean $includeViews = true]  )

Return the available table names

Parameters:
boolean   $includeViews:  include views?

API Tags:
Return:  with table names etc.


Redefined in descendants as:

[ Top ]
toggleForeignKeys  [line 1059]

  void toggleForeignKeys( boolean $enable  )

Enable/disable all foreign key constraints.

Parameters:
boolean   $enable:  enable/disable foreign keys?


Redefined in descendants as:

[ Top ]
unlock  [line 665]

  boolean unlock( )

Relieve all locks.


API Tags:
Return:  True if succesful, false if not.
Abstract:  


Redefined in descendants as:

[ Top ]
vendorDateFormat  [line 996]

  String vendorDateFormat( String $format  )

Convert a php date() format specifier to a vendor specific format specifier.

The default implementation returns the format as used by many database vendors ('YYYYMMDD HH24:MI'). Databases that use different formatting, should override this method.

Note that currently, only the common specifiers Y, m, d, H, h, i and s are supported.

Parameters:
String   $format:  Format specifier. The format is compatible with php's date() function (http://www.php.net/date)

API Tags:
Return:  Vendor specific format specifier.


Redefined in descendants as:

[ Top ]
_getTableMetaFromCache  [line 865]

  array _getTableMetaFromCache( string $table  )

If cached it'll return the table metadata from cache.

Parameters:
string   $table: 

API Tags:
Access:  private


[ Top ]
_getTableMetaFromDb  [line 889]

  array _getTableMetaFromDb( string $table  )

Returns the tablemetadata directly from db

Parameters:
string   $table: 

API Tags:
Access:  protected


[ Top ]
_translateError  [line 573]

  int _translateError( mixed $errno  )

Translate database-vendor dependent error messages into an ATK generic error code.

Derived classes should implement this method and translate their error codes.

Parameters:
mixed   $errno:  Vendor-dependent error code.

API Tags:
Return:  ATK error code
Access:  private


Redefined in descendants as:

[ Top ]
Home | About | Contact