Zikula 1.0.1
[ class tree: Zikula 1.0.1 ] [ index: Zikula 1.0.1 ] [ all elements ]

Source for file datadict-informix.inc.php

Documentation is available at datadict-informix.inc.php

  1. <?php
  2.  
  3. /**
  4.   V4.97 22 Jan 2008  (c) 2000-2008 John Lim (jlim#natsoft.com.my). All rights reserved.
  5.   Released under both BSD license and Lesser GPL library license. 
  6.   Whenever there is any discrepancy between the two licenses, 
  7.   the BSD license will take precedence.
  8.     
  9.   Set tabs to 4 for best viewing.
  10.  
  11. */
  12.  
  13. // security - hide paths
  14. if (!defined('ADODB_DIR')) die();
  15.  
  16. class ADODB2_informix extends ADODB_DataDict {
  17.     
  18.     var $databaseType = 'informix';
  19.     var $seqField = false;
  20.     
  21.      
  22.     function ActualType($meta)
  23.     {
  24.         switch($meta{
  25.         case 'C'return 'VARCHAR';// 255
  26.         case 'XL':
  27.         case 'X'return 'TEXT'
  28.         
  29.         case 'C2'return 'NVARCHAR';
  30.         case 'X2'return 'TEXT';
  31.         
  32.         case 'B'return 'BLOB';
  33.             
  34.         case 'D'return 'DATE';
  35.         case 'T'return 'DATETIME YEAR TO SECOND';
  36.         
  37.         case 'L'return 'SMALLINT';
  38.         case 'I'return 'INTEGER';
  39.         case 'I1'return 'SMALLINT';
  40.         case 'I2'return 'SMALLINT';
  41.         case 'I4'return 'INTEGER';
  42.         case 'I8'return 'DECIMAL(20)';
  43.         
  44.         case 'F'return 'FLOAT';
  45.         case 'N'return 'DECIMAL';
  46.         default:
  47.             return $meta;
  48.         }
  49.     }
  50.  
  51.     function AlterColumnSQL($tabname$flds)
  52.     {
  53.         if ($this->debugADOConnection::outp("AlterColumnSQL not supported");
  54.         return array();
  55.     }
  56.     
  57.     
  58.     function DropColumnSQL($tabname$flds)
  59.     {
  60.         if ($this->debugADOConnection::outp("DropColumnSQL not supported");
  61.         return array();
  62.     }
  63.     
  64.     // return string must begin with space
  65.     function _CreateSuffix($fname&$ftype$fnotnull,$fdefault,$fautoinc,$fconstraint)
  66.     {
  67.         if ($fautoinc{
  68.             $ftype 'SERIAL';
  69.             return '';
  70.         }
  71.         $suffix '';
  72.         if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
  73.         if ($fnotnull$suffix .= ' NOT NULL';
  74.         if ($fconstraint$suffix .= ' '.$fconstraint;
  75.         return $suffix;
  76.     }
  77.     
  78. }
  79.  
  80. ?>

Documentation generated on Fri, 18 Jul 2008 21:44:23 +0200 by phpDocumentor 1.4.1