fix for the BACK link so it goes to the main notes screen, not the calendar
[openemr.git] / library / adodb / datadict / datadict-db2.inc.php
blobcadf516107799561cbd110ab90060a75e262703b
1 <?php
3 /**
4 V4.20 22 Feb 2004 (c) 2000-2004 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.
9 Set tabs to 4 for best viewing.
13 class ADODB2_db2 extends ADODB_DataDict {
15 var $databaseType = 'db2';
16 var $seqField = false;
18 function ActualType($meta)
20 switch($meta) {
21 case 'C': return 'VARCHAR';
22 case 'XL':
23 case 'X': return 'VARCHAR(3600)';
25 case 'C2': return 'VARCHAR'; // up to 32K
26 case 'X2': return 'VARCHAR(3600)'; // up to 32000, but default page size too small
28 case 'B': return 'BLOB';
30 case 'D': return 'DATE';
31 case 'T': return 'TIMESTAMP';
33 case 'L': return 'SMALLINT';
34 case 'I': return 'INTEGER';
35 case 'I1': return 'SMALLINT';
36 case 'I2': return 'SMALLINT';
37 case 'I4': return 'INTEGER';
38 case 'I8': return 'BIGINT';
40 case 'F': return 'DOUBLE';
41 case 'N': return 'DECIMAL';
42 default:
43 return $meta;
47 // return string must begin with space
48 function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint)
50 $suffix = '';
51 if ($fautoinc) return ' GENERATED ALWAYS AS IDENTITY'; # as identity start with
52 if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
53 if ($fnotnull) $suffix .= ' NOT NULL';
54 if ($fconstraint) $suffix .= ' '.$fconstraint;
55 return $suffix;
58 function AlterColumnSQL($tabname, $flds)
60 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
61 return array();
65 function DropColumnSQL($tabname, $flds)
67 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
68 return array();