![]() Since a single typo can wipe out a large part of your previously you could use delete(), and it would use all of the object properties values 'full' means both 'NULL' and guessing with isset() is supported values true means 'NULL' as a string is supported if you want or needto use NULL in your database: however this behaviour is very problematic. previously you could use 'null' as a string to represent a NULL, or even null Quote table and column names when building queries then set this to false, otherwise you will get errors. uses transactions, and you want DataObjects to ignore the BEGIN/COMMIT/ROLLBACK etc. some databases, like sqlite do not support transactions, so if you have code that currently it only lowercases the tablename when you call tableName(), and calls some other method to generate proxy. full - generates dataobjects when you call factory. true - calls PDO_DataObject_Generator-> ? normally we use pre-created 'ini' files, but if you use proxy, it will generate the to use multiple search paths use the PATH_SEPERATOR and %s gets replaced with the tablename. /home/me/Projects/myapplication/DataObjects_%2$s%1$s.php (%1$s=table) (%2$s=database nickname) /home/me/Projects/myapplication/DataObjects_%s.php (%s=table) directory where the Table classes are. for the generator it will only use the first. for 'loading' it will try them all in sequence. to use multiple prefixes seperate them with PATH_SEPERATOR Prefix Mapping of table name to PHP Class class - factory + load derived classes value can be an array of absolute paths, or PATH_SEPERATED mydb => /var/www/mysite/Myproejct/DataObject/mydb.ini Array = map of database names to exact location(s). you can use path seperator if there are multiple paths. then schema_location = /var/www/mysite/Myproejct/DataObject/ if your database schema is in /var/www/mysite/Myproejct/DataObject/mydb.ini String = directory, or list of directories (with path Seperator.) unless you are using 'proxy' then schema_location is required. map of tables names to database 'nick-names' map of database nick-names to connection dsn's the default database dsn (not PDO standard = see for details) * Configuration - use PDO_DataObject::config() to access this. LOCK IN SHARE MODEĬonst IN_SHARE_MODE = " LOCK IN SHARE MODE" Ĭonst PORTABILITY_LOWERCASE = 1 // from Pear DB compatibility options.Ĭonst ERROR_INVALIDARGS = 'InvalidArgs' // wrong args to functionĬonst ERROR_NODATA = 'NoData' // no data availableĬonst ERROR_INVALIDCONFIG = 'InvalidConfig' // something wrong with the configĬonst ERROR_NOCLASS = 'NoClass' // no class existsĬonst ERROR_SET = 'Set' // set() caused errors when calling set*** methods.Ĭonst ERROR_QUERY = 'Query' // if query throws an error.Ĭonst ERROR_CONNECT = 'Connect' // if connect throws an error. * rather than only primary keys to enable delete. * Used for clarity in delete() - behaves like old DataObjects, uses all object properties whereadd's only the for easier conversion. * build the condition only out of the whereAdd's and not the object parameters. * Used for clarity in methods like delete() and count() to specify that the method should * user to determine what type of escaping is required around the object vars.Ĭonst MYSQLTIMESTAMP = 256 // mysql timestamps (ignored by update/insert) * these are constants for the get_table array Public $_PDO_DataObject_version = " - Constants - */ * The Version - use this to check feature changes PDO_DataObject Class _construct Function PDO Function config Function quoteIdentifier Function modifyLimitQuery Function get Function load Function reload Function pid Function toSelectSQL Function find Function fetch Function fetchAll Function fetchAllAssoc Function whereAdd Function where Function whereAddIn Function whereIn Function orderBy Function groupBy Function having Function locking Function useIndex Function unionAdd Function union Function limit Function selectAdd Function select Function selectAs Function insert Function update Function save Function snapshot Function delete Function count Function query Function escape Function databaseStructure Function generator Function tableName Function databaseNickname Function databaseLinks Function table Function tableColumns Function keys Function sequenceKey Function whereToString Function factorySelf Function factory Function tableToClass Function loadClass Function links Function link Function applyLinks Function linkArray Function joinAdd Function autoJoin Function joinAll Function sqlValue Function setFrom Function set Function fromValue Function toArray Function formatValue Function validate Function result Function debug Function debugLevel Function raise Function free Function reset Function _is_null_member Function _is_null Function
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |