updated adodb package to work with php 7.1
[openemr.git] / vendor / adodb / adodb-php / datadict / datadict-informix.inc.php
blob25726f499cd2e73c9803584107d4f2a7327870b4
1 <?php
3 /**
4 @version v5.20.9 21-Dec-2016
5 @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
6 @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
7 Released under both BSD license and Lesser GPL library license.
8 Whenever there is any discrepancy between the two licenses,
9 the BSD license will take precedence.
11 Set tabs to 4 for best viewing.
15 // security - hide paths
16 if (!defined('ADODB_DIR')) die();
18 class ADODB2_informix extends ADODB_DataDict {
20 var $databaseType = 'informix';
21 var $seqField = false;
24 function ActualType($meta)
26 switch($meta) {
27 case 'C': return 'VARCHAR';// 255
28 case 'XL':
29 case 'X': return 'TEXT';
31 case 'C2': return 'NVARCHAR';
32 case 'X2': return 'TEXT';
34 case 'B': return 'BLOB';
36 case 'D': return 'DATE';
37 case 'TS':
38 case 'T': return 'DATETIME YEAR TO SECOND';
40 case 'L': return 'SMALLINT';
41 case 'I': return 'INTEGER';
42 case 'I1': return 'SMALLINT';
43 case 'I2': return 'SMALLINT';
44 case 'I4': return 'INTEGER';
45 case 'I8': return 'DECIMAL(20)';
47 case 'F': return 'FLOAT';
48 case 'N': return 'DECIMAL';
49 default:
50 return $meta;
54 function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
56 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
57 return array();
61 function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
63 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
64 return array();
67 // return string must begin with space
68 function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
70 if ($fautoinc) {
71 $ftype = 'SERIAL';
72 return '';
74 $suffix = '';
75 if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
76 if ($fnotnull) $suffix .= ' NOT NULL';
77 if ($fconstraint) $suffix .= ' '.$fconstraint;
78 return $suffix;