| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 1070 lignes (31 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
db_tools:: (16 méthodes):
db_tools()
edit()
needs_save()
has_single_index()
table2content()
content2table()
read()
write_array()
write()
setup_version()
update()
remove_from_array()
update_schema()
normalize_index()
normalize()
tables_identical()
| db_tools() X-Ref |
| constructor of class |
| edit($content='',$msg = '') X-Ref |
| table editor (and the callback/submit-method too) |
| needs_save($cont='',$posted_app='',$posted_table='',$edited_table='',$msg='') X-Ref |
| checks if table was changed and if so offers user to save changes param: array $cont the content of the form (if called by process_exec) param: string $posted_app the app the table is from param: string $posted_table the table-name param: array $edited_table the edited table-definitions return: only if no changes |
| has_single_index($col,$index,&$options) X-Ref |
| checks if there is an index (only) on $col (not a multiple index incl. $col) param: string $col column name param: array $index ix or uc array of table-defintion param: string &$options db specific options return: True if $col has a single index |
| table2content($table,&$columns,$extra_index=False) X-Ref |
| creates content-array from a table param: array $table table-definition, eg. $phpgw_baseline[$table_name] param: array &$columns returns array with column-names param: bool $extra_index add an additional index-row return: array content-array to call exec with |
| content2table($content) X-Ref |
| creates table-definition from posted content It sets some reasonalbe defaults for not set precisions (else setup will not install) param: array $content posted content-array return: table-definition |
| read($app,&$phpgw_baseline) X-Ref |
| includes $app/setup/tables_current.inc.php param: string $app application name param: array &$phpgw_baseline where to return the data return: boolean True if file found, False else |
| write_array($arr,$depth,$parent='') X-Ref |
| returns an array as string in php-notation param: array $arr param: int $depth for idention param: string $parent return: string |
| write($app,$phpgw_baseline) X-Ref |
| writes tabledefinitions $phpgw_baseline to file /$app/setup/tables_current.inc.php param: string $app app-name param: array $phpgw_baseline tabledefinitions return: boolean True if file writen else False |
| setup_version($app,$new = '',$tables='') X-Ref |
| reads and updates the version and tables info in file $app/setup/setup.inc.php param: string $app the app param: string $new new version number to set, if $new != '' param: string $tables new tables to include (comma delimited), if != '' return: the version or False if the file could not be read or written |
| update($app,$current,$version) X-Ref |
| updates file /$app/setup/tables_update.inc.php to reflect changes in $current param: string $app app-name param: array $current new tabledefinitions param: string $version new version return: boolean True if file writen else False |
| remove_from_array(&$arr,$value) X-Ref |
| Pas de description |
| update_schema($app,$current,&$tables) X-Ref |
| creates an update-script param: string $app app-name param: array $current new table-defintion param: string &$tables returns comma delimited list of new table-names return: string the update-script |
| normalize_index($index,$cols) X-Ref |
| orders the single-colum-indices after the columns and the multicolunm ones behind param: array $index array with indices param: array $cols array with column-defs (col-name is the key) return: array the new array of indices |
| normalize($table) X-Ref |
| normalices all properties in a table-definiton, eg. all nullable properties to True or False this is necessary to compare two table-defitions param: array $table table-definition return: array the normaliced defintion |
| tables_identical($a,$b) X-Ref |
| compares two table-definitions, by comparing normaliced string-representations (serialize) param: array $a param: array $b return: boolean true if they are identical (would create an identical schema), false otherwise |
| Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |