Added CAMOS form and 'Patient Photograph' document category to pre-installed.
[openemr.git] / library / adodb / datadict / datadict-generic.inc.php
blobcb4fc462d11520f753279ca5a58f3386d1d8d5da
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_generic extends ADODB_DataDict {
15 var $databaseType = 'generic';
16 var $seqField = false;
19 function ActualType($meta)
21 switch($meta) {
22 case 'C': return 'VARCHAR';
23 case 'XL':
24 case 'X': return 'VARCHAR(250)';
26 case 'C2': return 'VARCHAR';
27 case 'X2': return 'VARCHAR(250)';
29 case 'B': return 'VARCHAR';
31 case 'D': return 'DATE';
32 case 'T': return 'DATE';
34 case 'L': return 'DECIMAL(1)';
35 case 'I': return 'DECIMAL(10)';
36 case 'I1': return 'DECIMAL(3)';
37 case 'I2': return 'DECIMAL(5)';
38 case 'I4': return 'DECIMAL(10)';
39 case 'I8': return 'DECIMAL(20)';
41 case 'F': return 'DECIMAL(32,8)';
42 case 'N': return 'DECIMAL';
43 default:
44 return $meta;
48 function AlterColumnSQL($tabname, $flds)
50 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
51 return array();
55 function DropColumnSQL($tabname, $flds)
57 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
58 return array();
64 //db2
65 function ActualType($meta)
67 switch($meta) {
68 case 'C': return 'VARCHAR';
69 case 'X': return 'VARCHAR';
71 case 'C2': return 'VARCHAR'; // up to 32K
72 case 'X2': return 'VARCHAR';
74 case 'B': return 'BLOB';
76 case 'D': return 'DATE';
77 case 'T': return 'TIMESTAMP';
79 case 'L': return 'SMALLINT';
80 case 'I': return 'INTEGER';
81 case 'I1': return 'SMALLINT';
82 case 'I2': return 'SMALLINT';
83 case 'I4': return 'INTEGER';
84 case 'I8': return 'BIGINT';
86 case 'F': return 'DOUBLE';
87 case 'N': return 'DECIMAL';
88 default:
89 return $meta;
93 // ifx
94 function ActualType($meta)
96 switch($meta) {
97 case 'C': return 'VARCHAR';// 255
98 case 'X': return 'TEXT';
100 case 'C2': return 'NVARCHAR';
101 case 'X2': return 'TEXT';
103 case 'B': return 'BLOB';
105 case 'D': return 'DATE';
106 case 'T': return 'DATETIME';
108 case 'L': return 'SMALLINT';
109 case 'I': return 'INTEGER';
110 case 'I1': return 'SMALLINT';
111 case 'I2': return 'SMALLINT';
112 case 'I4': return 'INTEGER';
113 case 'I8': return 'DECIMAL(20)';
115 case 'F': return 'FLOAT';
116 case 'N': return 'DECIMAL';
117 default:
118 return $meta;