[TASK] Update ADOdb to 5.18
[Packages/TYPO3.CMS.git] / typo3 / sysext / adodb / adodb / datadict / datadict-generic.inc.php
1 <?php
2
3 /**
4 V5.18 3 Sep 2012 (c) 2000-2012 John Lim (jlim#natsoft.com). 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_generic extends ADODB_DataDict {
17
18 var $databaseType = 'generic';
19 var $seqField = false;
20
21
22 function ActualType($meta)
23 {
24 switch($meta) {
25 case 'C': return 'VARCHAR';
26 case 'XL':
27 case 'X': return 'VARCHAR(250)';
28
29 case 'C2': return 'VARCHAR';
30 case 'X2': return 'VARCHAR(250)';
31
32 case 'B': return 'VARCHAR';
33
34 case 'D': return 'DATE';
35 case 'TS':
36 case 'T': return 'DATE';
37
38 case 'L': return 'DECIMAL(1)';
39 case 'I': return 'DECIMAL(10)';
40 case 'I1': return 'DECIMAL(3)';
41 case 'I2': return 'DECIMAL(5)';
42 case 'I4': return 'DECIMAL(10)';
43 case 'I8': return 'DECIMAL(20)';
44
45 case 'F': return 'DECIMAL(32,8)';
46 case 'N': return 'DECIMAL';
47 default:
48 return $meta;
49 }
50 }
51
52 function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
53 {
54 if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
55 return array();
56 }
57
58
59 function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
60 {
61 if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
62 return array();
63 }
64
65 }
66
67 /*
68 //db2
69 function ActualType($meta)
70 {
71 switch($meta) {
72 case 'C': return 'VARCHAR';
73 case 'X': return 'VARCHAR';
74
75 case 'C2': return 'VARCHAR'; // up to 32K
76 case 'X2': return 'VARCHAR';
77
78 case 'B': return 'BLOB';
79
80 case 'D': return 'DATE';
81 case 'T': return 'TIMESTAMP';
82
83 case 'L': return 'SMALLINT';
84 case 'I': return 'INTEGER';
85 case 'I1': return 'SMALLINT';
86 case 'I2': return 'SMALLINT';
87 case 'I4': return 'INTEGER';
88 case 'I8': return 'BIGINT';
89
90 case 'F': return 'DOUBLE';
91 case 'N': return 'DECIMAL';
92 default:
93 return $meta;
94 }
95 }
96
97 // ifx
98 function ActualType($meta)
99 {
100 switch($meta) {
101 case 'C': return 'VARCHAR';// 255
102 case 'X': return 'TEXT';
103
104 case 'C2': return 'NVARCHAR';
105 case 'X2': return 'TEXT';
106
107 case 'B': return 'BLOB';
108
109 case 'D': return 'DATE';
110 case 'T': return 'DATETIME';
111
112 case 'L': return 'SMALLINT';
113 case 'I': return 'INTEGER';
114 case 'I1': return 'SMALLINT';
115 case 'I2': return 'SMALLINT';
116 case 'I4': return 'INTEGER';
117 case 'I8': return 'DECIMAL(20)';
118
119 case 'F': return 'FLOAT';
120 case 'N': return 'DECIMAL';
121 default:
122 return $meta;
123 }
124 }
125 */
126 ?>