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

Source for file Manager.php

Documentation is available at Manager.php

  1. <?php
  2.  
  3. require_once 'DB/Table.php';
  4.  
  5.  
  6. /**
  7. * Creates tables from DB_Table definitions.
  8. * DB_Table_Manager provides database automated table creation
  9. * facilities (and eventually table alteration as well).
  10. * $Id: Manager.php,v 1.6 2004/11/19 18:03:25 pmjones Exp $
  11. @author Paul M. Jones <pmjones@ciaweb.net>
  12. @package DB_Table
  13. */
  14.  
  15.     
  16.     
  17.     /**
  18.     * 
  19.     * Create the table based on DB_Table column and index arrays.
  20.     * 
  21.     * @static
  22.     * 
  23.     * @access public
  24.     * 
  25.     * @param object &$db A PEAR DB object.
  26.     * 
  27.     * @param string $table The table name to connect to in the database.
  28.     * 
  29.     * @param mixed $column_set A DB_Table $this->col array.
  30.     * 
  31.     * @param mixed $index_set A DB_Table $this->idx array.
  32.     * 
  33.     * @return mixed Boolean false if there was no attempt to create the
  34.     *  table, boolean true if the attempt succeeded, and a PEAR_Error if
  35.     *  the attempt failed.
  36.     * 
  37.     */
  38.     
  39.     function create(&$db$table$column_set$index_set)
  40.     {
  41.         // columns to be created
  42.         $column = array();
  43.         
  44.         // indexes to be created
  45.         $index = array();
  46.         
  47.         // is the table name too long?
  48.         if (strlen($table> 30{
  49.             return DB_Table::throwError(
  50.                 DB_TABLE_ERR_TABLE_STRLEN,
  51.                 " ('$table')"
  52.             );
  53.         }
  54.         
  55.         
  56.         // -------------------------------------------------------------
  57.         // 
  58.         // validate each column mapping and build the individual
  59.         // definitions, and note column indexes as we go.
  60.         //
  61.         
  62.         foreach ($column_set as $colname => $val{
  63.             
  64.             $colname trim($colname);
  65.             
  66.             // column name cannot be a reserved keyword
  67.             $reserved in_array(
  68.                 strtoupper($colname),
  69.                 $GLOBALS['_DB_TABLE']['reserved']
  70.             );
  71.             
  72.             if ($reserved{
  73.                 return DB_Table::throwError(
  74.                     DB_TABLE_ERR_DECLARE_COLNAME,
  75.                     " ('$colname')"
  76.                 );
  77.             }
  78.             
  79.             // column must be no longer than 30 chars
  80.             if (strlen($colname> 30{
  81.                 return DB_Table::throwError(
  82.                     DB_TABLE_ERR_DECLARE_STRLEN,
  83.                     "('$colname')"
  84.                 );
  85.             }
  86.             
  87.             
  88.             // prepare variables
  89.             $type    (isset($val['type']))    $val['type']    : null;
  90.             $size    (isset($val['size']))    $val['size']    : null;
  91.             $scope   (isset($val['scope']))   $val['scope']   : null;
  92.             $require (isset($val['require'])) $val['require': null;
  93.             $default (isset($val['default'])) $val['default': null;
  94.             
  95.             // get the declaration string
  96.             $result DB_Table_Manager::getDeclare($db->phptype$type$size
  97.                 $scope$require$default);
  98.             
  99.             // did it work?
  100.             if (PEAR::isError($result)) {
  101.                 $result->userinfo .= " ('$colname')";
  102.                 return $result;
  103.             }
  104.             
  105.             // add the declaration to the array of all columns
  106.             $column[= "$colname $result";
  107.         }
  108.         
  109.         
  110.         // -------------------------------------------------------------
  111.         // 
  112.         // validate the indexes.
  113.         //
  114.         
  115.         foreach ($index_set as $idxname => $val{
  116.             
  117.             if (is_string($val)) {
  118.                 // shorthand for index names: colname => index_type
  119.                 $type trim($val);
  120.                 $cols trim($idxname);
  121.             elseif (is_array($val)) {
  122.                 // normal: index_name => array('type' => ..., 'cols' => ...)
  123.                 $type (isset($val['type'])) $val['type''normal';
  124.                 $cols (isset($val['cols'])) $val['cols': null;
  125.             }
  126.             
  127.             // index name cannot be a reserved keyword
  128.             $reserved in_array(
  129.                 strtoupper($idxname),
  130.                 $GLOBALS['_DB_TABLE']['reserved']
  131.             );
  132.             
  133.             if ($reserved{
  134.                 return DB_Table::throwError(
  135.                     DB_TABLE_ERR_DECLARE_IDXNAME,
  136.                     "('$idxname')"
  137.                 );
  138.             }
  139.             
  140.             // are there any columns for the index?
  141.             if ($cols{
  142.                 return DB_Table::throwError(
  143.                     DB_TABLE_ERR_IDX_NO_COLS,
  144.                     "('$idxname')"
  145.                 );
  146.             }
  147.             
  148.             // are there any CLOB columns, or any columns that are not
  149.             // in the schema?
  150.             settype($cols'array');
  151.             $valid_cols array_keys($column_set);
  152.             foreach ($cols as $colname{
  153.             
  154.                 if (in_array($colname$valid_cols)) {
  155.                     return DB_Table::throwError(
  156.                         DB_TABLE_ERR_IDX_COL_UNDEF,
  157.                         "'$idxname' ('$colname')"
  158.                     );
  159.                 }
  160.                 
  161.                 if ($column_set[$colname]['type'== 'clob'{
  162.                     return DB_Table::throwError(
  163.                         DB_TABLE_ERR_IDX_COL_CLOB,
  164.                         "'$idxname' ('$colname')"
  165.                     );
  166.                 }
  167.                 
  168.             }
  169.             
  170.             // string of column names
  171.             $colstring implode(', '$cols);
  172.             
  173.             // we prefix all index names with the table name,
  174.             // and suffix all index names with '_idx'.  this
  175.             // is to soothe PostgreSQL, which demands that index
  176.             // names not collide, even when they indexes are on
  177.             // different tables.
  178.             $newIdxName $table '_' $idxname '_idx';
  179.             
  180.             // now check the length; must be under 30 chars to
  181.             // soothe Oracle.
  182.             if (strlen($newIdxName> 30{
  183.                 return DB_Table::throwError(
  184.                     DB_TABLE_ERR_IDX_STRLEN,
  185.                     "'$idxname' ('$newIdxName')"
  186.                 );
  187.             }
  188.             
  189.             // create index entry
  190.             if ($type == 'unique'{
  191.                 $index[= "CREATE UNIQUE INDEX $newIdxName ON $table ($colstring)";
  192.             elseif ($type == 'normal'{
  193.                 $index[= "CREATE INDEX $newIdxName ON $table ($colstring)";
  194.             else {
  195.                 return DB_Table::throwError(
  196.                     DB_TABLE_ERR_IDX_TYPE,
  197.                     "'$idxname' ('$type')"
  198.                 );
  199.             }
  200.             
  201.         }
  202.         
  203.         
  204.         // -------------------------------------------------------------
  205.         // 
  206.         // now for the real action: create the table and indexes!
  207.         //
  208.         
  209.         // build the CREATE TABLE command
  210.         $cmd = "CREATE TABLE $table (\n\t";
  211.         $cmd .= implode(",\n\t"$column);
  212.         $cmd .= "\n)";
  213.         
  214.         // attempt to create the table
  215.         $result $db->query($cmd);
  216.         if (PEAR::isError($result)) {
  217.             return $result;
  218.         }
  219.         
  220.         // attempt to create the indexes
  221.         foreach ($index as $cmd{
  222.             $result $db->query($cmd);
  223.             if (PEAR::isError($result)) {
  224.                 return $result;
  225.             }
  226.         }
  227.         
  228.         // we're done!
  229.         return true;
  230.     }
  231.     
  232.     
  233.     /**
  234.     * 
  235.     * Get the column declaration string for a DB_Table column.
  236.     * 
  237.     * @static
  238.     * 
  239.     * @access public
  240.     * 
  241.     * @param string $phptype The DB phptype key.
  242.     * 
  243.     * @param string $coltype The DB_Table column type.
  244.     * 
  245.     * @param int $size The size for the column (needed for string and
  246.     *  decimal).
  247.     * 
  248.     * @param int $scope The scope for the column (needed for decimal).
  249.     * 
  250.     * @param bool $require True if the column should be NOT NULL, false
  251.     *  allowed to be NULL.
  252.     * 
  253.     * @param string $default The SQL calculation for a default value.
  254.     * 
  255.     * @return string|object  declaration string on success, or a
  256.     *  PEAR_Error on failure.
  257.     * 
  258.     */
  259.     
  260.     function getDeclare($phptype$coltype$size = null$scope = null,
  261.         $require = null$default = null)
  262.     {
  263.         // validate char and varchar: does it have a size?
  264.         if (($coltype == 'char' || $coltype == 'varchar'&&
  265.             ($size < 1 || $size > 255) ) {
  266.             return DB_Table::throwError(
  267.                 DB_TABLE_ERR_DECLARE_STRING,
  268.                 "(size='$size')"
  269.             );
  270.         }
  271.         
  272.         // validate decimal: does it have a size and scope?
  273.         if ($coltype == 'decimal' &&
  274.             ($size < 1 || $size > 255 || $scope < 0 || $scope $size)) {
  275.             return DB_Table::throwError(
  276.                 DB_TABLE_ERR_DECLARE_DECIMAL,
  277.                 "(size='$size' scope='$scope')"
  278.             );
  279.         }
  280.         
  281.         // map of column types and declarations for this RDBMS
  282.         $map $GLOBALS['_DB_TABLE']['type'][$phptype];
  283.         
  284.         // is it a recognized column type?
  285.         $types array_keys($map);
  286.         if (in_array($coltype$types)) {
  287.             return DB_Table::throwError(
  288.                 DB_TABLE_ERR_DECLARE_TYPE,
  289.                 "('$coltype')"
  290.             );
  291.         }
  292.         
  293.         // basic declaration
  294.         switch ($coltype{
  295.     
  296.         case 'char':
  297.         case 'varchar':
  298.             $declare $map[$coltype. "($size)";
  299.             break;
  300.         
  301.         case 'decimal':
  302.             $declare $map[$coltype. "($size,$scope)";
  303.             break;
  304.         
  305.         default:
  306.             $declare $map[$coltype];
  307.             break;
  308.         
  309.         }
  310.         
  311.         // set the "NULL"/"NOT NULL" portion
  312.         $declare .= ($require' NOT NULL' ' NULL';
  313.         
  314.         // set the "DEFAULT" portion
  315.         $declare .= ($default? " DEFAULT $default" : '';
  316.         
  317.         // done
  318.         return $declare;
  319.     }
  320. }
  321.  
  322.  
  323. /**
  324. * List of all reserved words for all supported databases. Yes, this is a
  325. * monster of a list.
  326. */
  327. if (isset($GLOBALS['_DB_TABLE']['reserved'])) {
  328.     $GLOBALS['_DB_TABLE']['reserved'= array(
  329.         '_ROWID_',
  330.         'ABSOLUTE',
  331.         'ACCESS',
  332.         'ACTION',
  333.         'ADD',
  334.         'ADMIN',
  335.         'AFTER',
  336.         'AGGREGATE',
  337.         'ALIAS',
  338.         'ALL',
  339.         'ALLOCATE',
  340.         'ALTER',
  341.         'ANALYSE',
  342.         'ANALYZE',
  343.         'AND',
  344.         'ANY',
  345.         'ARE',
  346.         'ARRAY',
  347.         'AS',
  348.         'ASC',
  349.         'ASENSITIVE',
  350.         'ASSERTION',
  351.         'AT',
  352.         'AUDIT',
  353.         'AUTHORIZATION',
  354.         'AUTO_INCREMENT',
  355.         'AVG',
  356.         'BACKUP',
  357.         'BDB',
  358.         'BEFORE',
  359.         'BEGIN',
  360.         'BERKELEYDB',
  361.         'BETWEEN',
  362.         'BIGINT',
  363.         'BINARY',
  364.         'BIT',
  365.         'BIT_LENGTH',
  366.         'BLOB',
  367.         'BOOLEAN',
  368.         'BOTH',
  369.         'BREADTH',
  370.         'BREAK',
  371.         'BROWSE',
  372.         'BULK',
  373.         'BY',
  374.         'CALL',
  375.         'CASCADE',
  376.         'CASCADED',
  377.         'CASE',
  378.         'CAST',
  379.         'CATALOG',
  380.         'CHANGE',
  381.         'CHAR',
  382.         'CHAR_LENGTH',
  383.         'CHARACTER',
  384.         'CHARACTER_LENGTH',
  385.         'CHECK',
  386.         'CHECKPOINT',
  387.         'CLASS',
  388.         'CLOB',
  389.         'CLOSE',
  390.         'CLUSTER',
  391.         'CLUSTERED',
  392.         'COALESCE',
  393.         'COLLATE',
  394.         'COLLATION',
  395.         'COLUMN',
  396.         'COLUMNS',
  397.         'COMMENT',
  398.         'COMMIT',
  399.         'COMPLETION',
  400.         'COMPRESS',
  401.         'COMPUTE',
  402.         'CONDITION',
  403.         'CONNECT',
  404.         'CONNECTION',
  405.         'CONSTRAINT',
  406.         'CONSTRAINTS',
  407.         'CONSTRUCTOR',
  408.         'CONTAINS',
  409.         'CONTAINSTABLE',
  410.         'CONTINUE',
  411.         'CONVERT',
  412.         'CORRESPONDING',
  413.         'COUNT',
  414.         'CREATE',
  415.         'CROSS',
  416.         'CUBE',
  417.         'CURRENT',
  418.         'CURRENT_DATE',
  419.         'CURRENT_PATH',
  420.         'CURRENT_ROLE',
  421.         'CURRENT_TIME',
  422.         'CURRENT_TIMESTAMP',
  423.         'CURRENT_USER',
  424.         'CURSOR',
  425.         'CYCLE',
  426.         'DATA',
  427.         'DATABASE',
  428.         'DATABASES',
  429.         'DATE',
  430.         'DAY',
  431.         'DAY_HOUR',
  432.         'DAY_MICROSECOND',
  433.         'DAY_MINUTE',
  434.         'DAY_SECOND',
  435.         'DBCC',
  436.         'DEALLOCATE',
  437.         'DEC',
  438.         'DECIMAL',
  439.         'DECLARE',
  440.         'DEFAULT',
  441.         'DEFERRABLE',
  442.         'DEFERRED',
  443.         'DELAYED',
  444.         'DELETE',
  445.         'DENY',
  446.         'DEPTH',
  447.         'DEREF',
  448.         'DESC',
  449.         'DESCRIBE',
  450.         'DESCRIPTOR',
  451.         'DESTROY',
  452.         'DESTRUCTOR',
  453.         'DETERMINISTIC',
  454.         'DIAGNOSTICS',
  455.         'DICTIONARY',
  456.         'DISCONNECT',
  457.         'DISK',
  458.         'DISTINCT',
  459.         'DISTINCTROW',
  460.         'DISTRIBUTED',
  461.         'DIV',
  462.         'DO',
  463.         'DOMAIN',
  464.         'DOUBLE',
  465.         'DROP',
  466.         'DUMMY',
  467.         'DUMP',
  468.         'DYNAMIC',
  469.         'EACH',
  470.         'ELSE',
  471.         'ELSEIF',
  472.         'ENCLOSED',
  473.         'END',
  474.         'END-EXEC',
  475.         'EQUALS',
  476.         'ERRLVL',
  477.         'ESCAPE',
  478.         'ESCAPED',
  479.         'EVERY',
  480.         'EXCEPT',
  481.         'EXCEPTION',
  482.         'EXCLUSIVE',
  483.         'EXEC',
  484.         'EXECUTE',
  485.         'EXISTS',
  486.         'EXIT',
  487.         'EXPLAIN',
  488.         'EXTERNAL',
  489.         'EXTRACT',
  490.         'FALSE',
  491.         'FETCH',
  492.         'FIELDS',
  493.         'FILE',
  494.         'FILLFACTOR',
  495.         'FIRST',
  496.         'FLOAT',
  497.         'FOR',
  498.         'FORCE',
  499.         'FOREIGN',
  500.         'FOUND',
  501.         'FRAC_SECOND',
  502.         'FREE',
  503.         'FREETEXT',
  504.         'FREETEXTTABLE',
  505.         'FREEZE',
  506.         'FROM',
  507.         'FULL',
  508.         'FULLTEXT',
  509.         'FUNCTION',
  510.         'GENERAL',
  511.         'GET',
  512.         'GLOB',
  513.         'GLOBAL',
  514.         'GO',
  515.         'GOTO',
  516.         'GRANT',
  517.         'GROUP',
  518.         'GROUPING',
  519.         'HAVING',
  520.         'HIGH_PRIORITY',
  521.         'HOLDLOCK',
  522.         'HOST',
  523.         'HOUR',
  524.         'HOUR_MICROSECOND',
  525.         'HOUR_MINUTE',
  526.         'HOUR_SECOND',
  527.         'IDENTIFIED',
  528.         'IDENTITY',
  529.         'IDENTITY_INSERT',
  530.         'IDENTITYCOL',
  531.         'IF',
  532.         'IGNORE',
  533.         'ILIKE',
  534.         'IMMEDIATE',
  535.         'IN',
  536.         'INCREMENT',
  537.         'INDEX',
  538.         'INDICATOR',
  539.         'INFILE',
  540.         'INITIAL',
  541.         'INITIALIZE',
  542.         'INITIALLY',
  543.         'INNER',
  544.         'INNODB',
  545.         'INOUT',
  546.         'INPUT',
  547.         'INSENSITIVE',
  548.         'INSERT',
  549.         'INT',
  550.         'INTEGER',
  551.         'INTERSECT',
  552.         'INTERVAL',
  553.         'INTO',
  554.         'IO_THREAD',
  555.         'IS',
  556.         'ISNULL',
  557.         'ISOLATION',
  558.         'ITERATE',
  559.         'JOIN',
  560.         'KEY',
  561.         'KEYS',
  562.         'KILL',
  563.         'LANGUAGE',
  564.         'LARGE',
  565.         'LAST',
  566.         'LATERAL',
  567.         'LEADING',
  568.         'LEAVE',
  569.         'LEFT',
  570.         'LESS',
  571.         'LEVEL',
  572.         'LIKE',
  573.         'LIMIT',
  574.         'LINENO',
  575.         'LINES',
  576.         'LOAD',
  577.         'LOCAL',
  578.         'LOCALTIME',
  579.         'LOCALTIMESTAMP',
  580.         'LOCATOR',
  581.         'LOCK',
  582.         'LONG',
  583.         'LONGBLOB',
  584.         'LONGTEXT',
  585.         'LOOP',
  586.         'LOW_PRIORITY',
  587.         'LOWER',
  588.         'MAIN',
  589.         'MAP',
  590.         'MASTER_SERVER_ID',
  591.         'MATCH',
  592.         'MAX',
  593.         'MAXEXTENTS',
  594.         'MEDIUMBLOB',
  595.         'MEDIUMINT',
  596.         'MEDIUMTEXT',
  597.         'MIDDLEINT',
  598.         'MIN',
  599.         'MINUS',
  600.         'MINUTE',
  601.         'MINUTE_MICROSECOND',
  602.         'MINUTE_SECOND',
  603.         'MLSLABEL',
  604.         'MOD',
  605.         'MODE',
  606.         'MODIFIES',
  607.         'MODIFY',
  608.         'MODULE',
  609.         'MONTH',
  610.         'NAMES',
  611.         'NATIONAL',
  612.         'NATURAL',
  613.         'NCHAR',
  614.         'NCLOB',
  615.         'NEW',
  616.         'NEXT',
  617.         'NO',
  618.         'NO_WRITE_TO_BINLOG',
  619.         'NOAUDIT',
  620.         'NOCHECK',
  621.         'NOCOMPRESS',
  622.         'NONCLUSTERED',
  623.         'NONE',
  624.         'NOT',
  625.         'NOTNULL',
  626.         'NOWAIT',
  627.         'NULL',
  628.         'NULLIF',
  629.         'NUMBER',
  630.         'NUMERIC',
  631.         'OBJECT',
  632.         'OCTET_LENGTH',
  633.         'OF',
  634.         'OFF',
  635.         'OFFLINE',
  636.         'OFFSET',
  637.         'OFFSETS',
  638.         'OID',
  639.         'OLD',
  640.         'ON',
  641.         'ONLINE',
  642.         'ONLY',
  643.         'OPEN',
  644.         'OPENDATASOURCE',
  645.         'OPENQUERY',
  646.         'OPENROWSET',
  647.         'OPENXML',
  648.         'OPERATION',
  649.         'OPTIMIZE',
  650.         'OPTION',
  651.         'OPTIONALLY',
  652.         'OR',
  653.         'ORDER',
  654.         'ORDINALITY',
  655.         'OUT',
  656.         'OUTER',
  657.         'OUTFILE',
  658.         'OUTPUT',
  659.         'OVER',
  660.         'OVERLAPS',
  661.         'PAD',
  662.         'PARAMETER',
  663.         'PARAMETERS',
  664.         'PARTIAL',
  665.         'PATH',
  666.         'PCTFREE',
  667.         'PERCENT',
  668.         'PLACING',
  669.         'PLAN',
  670.         'POSITION',
  671.         'POSTFIX',
  672.         'PRECISION',
  673.         'PREFIX',
  674.         'PREORDER',
  675.         'PREPARE',
  676.         'PRESERVE',
  677.         'PRIMARY',
  678.         'PRINT',
  679.         'PRIOR',
  680.         'PRIVILEGES',
  681.         'PROC',
  682.         'PROCEDURE',
  683.         'PUBLIC',
  684.         'PURGE',
  685.         'RAISERROR',
  686.         'RAW',
  687.         'READ',
  688.         'READS',
  689.         'READTEXT',
  690.         'REAL',
  691.         'RECONFIGURE',
  692.         'RECURSIVE',
  693.         'REF',
  694.         'REFERENCES',
  695.         'REFERENCING',
  696.         'REGEXP',
  697.         'RELATIVE',
  698.         'RENAME',
  699.         'REPEAT',
  700.         'REPLACE',
  701.         'REPLICATION',
  702.         'REQUIRE',
  703.         'RESOURCE',
  704.         'RESTORE',
  705.         'RESTRICT',
  706.         'RESULT',
  707.         'RETURN',
  708.         'RETURNS',
  709.         'REVOKE',
  710.         'RIGHT',
  711.         'RLIKE',
  712.         'ROLE',
  713.         'ROLLBACK',
  714.         'ROLLUP',
  715.         'ROUTINE',
  716.         'ROW',
  717.         'ROWCOUNT',
  718.         'ROWGUIDCOL',
  719.         'ROWID',
  720.         'ROWNUM',
  721.         'ROWS',
  722.         'RULE',
  723.         'SAVE',
  724.         'SAVEPOINT',
  725.         'SCHEMA',
  726.         'SCOPE',
  727.         'SCROLL',
  728.         'SEARCH',
  729.         'SECOND',
  730.         'SECOND_MICROSECOND',
  731.         'SECTION',
  732.         'SELECT',
  733.         'SENSITIVE',
  734.         'SEPARATOR',
  735.         'SEQUENCE',
  736.         'SESSION',
  737.         'SESSION_USER',
  738.         'SET',
  739.         'SETS',
  740.         'SETUSER',
  741.         'SHARE',
  742.         'SHOW',
  743.         'SHUTDOWN',
  744.         'SIMILAR',
  745.         'SIZE',
  746.         'SMALLINT',
  747.         'SOME',
  748.         'SONAME',
  749.         'SPACE',
  750.         'SPATIAL',
  751.         'SPECIFIC',
  752.         'SPECIFICTYPE',
  753.         'SQL',
  754.         'SQL_BIG_RESULT',
  755.         'SQL_CALC_FOUND_ROWS',
  756.         'SQL_SMALL_RESULT',
  757.         'SQL_TSI_DAY',
  758.         'SQL_TSI_FRAC_SECOND',
  759.         'SQL_TSI_HOUR',
  760.         'SQL_TSI_MINUTE',
  761.         'SQL_TSI_MONTH',
  762.         'SQL_TSI_QUARTER',
  763.         'SQL_TSI_SECOND',
  764.         'SQL_TSI_WEEK',
  765.         'SQL_TSI_YEAR',
  766.         'SQLCODE',
  767.         'SQLERROR',
  768.         'SQLEXCEPTION',
  769.         'SQLITE_MASTER',
  770.         'SQLITE_TEMP_MASTER',
  771.         'SQLSTATE',
  772.         'SQLWARNING',
  773.         'SSL',
  774.         'START',
  775.         'STARTING',
  776.         'STATE',
  777.         'STATEMENT',
  778.         'STATIC',
  779.         'STATISTICS',
  780.         'STRAIGHT_JOIN',
  781.         'STRIPED',
  782.         'STRUCTURE',
  783.         'SUBSTRING',
  784.         'SUCCESSFUL',
  785.         'SUM',
  786.         'SYNONYM',
  787.         'SYSDATE',
  788.         'SYSTEM_USER',
  789.         'TABLE',
  790.         'TABLES',
  791.         'TEMPORARY',
  792.         'TERMINATE',
  793.         'TERMINATED',
  794.         'TEXTSIZE',
  795.         'THAN',
  796.         'THEN',
  797.         'TIME',
  798.         'TIMESTAMP',
  799.         'TIMESTAMPADD',
  800.         'TIMESTAMPDIFF',
  801.         'TIMEZONE_HOUR',
  802.         'TIMEZONE_MINUTE',
  803.         'TINYBLOB',
  804.         'TINYINT',
  805.         'TINYTEXT',
  806.         'TO',
  807.         'TOP',
  808.         'TRAILING',
  809.         'TRAN',
  810.         'TRANSACTION',
  811.         'TRANSLATE',
  812.         'TRANSLATION',
  813.         'TREAT',
  814.         'TRIGGER',
  815.         'TRIM',
  816.         'TRUE',
  817.         'TRUNCATE',
  818.         'TSEQUAL',
  819.         'UID',
  820.         'UNDER',
  821.         'UNDO',
  822.         'UNION',
  823.         'UNIQUE',
  824.         'UNKNOWN',
  825.         'UNLOCK',
  826.         'UNNEST',
  827.         'UNSIGNED',
  828.         'UPDATE',
  829.         'UPDATETEXT',
  830.         'UPPER',
  831.         'USAGE',
  832.         'USE',
  833.         'USER',
  834.         'USER_RESOURCES',
  835.         'USING',
  836.         'UTC_DATE',
  837.         'UTC_TIME',
  838.         'UTC_TIMESTAMP',
  839.         'VALIDATE',
  840.         'VALUE',
  841.         'VALUES',
  842.         'VARBINARY',
  843.         'VARCHAR',
  844.         'VARCHAR2',
  845.         'VARCHARACTER',
  846.         'VARIABLE',
  847.         'VARYING',
  848.         'VERBOSE',
  849.         'VIEW',
  850.         'WAITFOR',
  851.         'WHEN',
  852.         'WHENEVER',
  853.         'WHERE',
  854.         'WHILE',
  855.         'WITH',
  856.         'WITHOUT',
  857.         'WORK',
  858.         'WRITE',
  859.         'WRITETEXT',
  860.         'XOR',
  861.         'YEAR',
  862.         'YEAR_MONTH',
  863.         'ZEROFILL',
  864.         'ZONE',
  865.     );
  866. }
  867.         
  868. ?>

Documentation generated on Mon, 11 Mar 2019 14:10:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.