adodb 최신버전으로 변경
<? 를 <?php 로 변경
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
V4.50 6 July 2004 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
@version v5.20.9 21-Dec-2016
|
||||
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
|
||||
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
|
||||
Released under both BSD license and Lesser GPL library license.
|
||||
Whenever there is any discrepancy between the two licenses,
|
||||
the BSD license will take precedence.
|
||||
|
||||
|
||||
Set tabs to 4 for best viewing.
|
||||
|
||||
|
||||
Modified from datadict-generic.inc.php for sapdb by RalfBecker-AT-outdoor-training.de
|
||||
*/
|
||||
|
||||
@@ -15,41 +17,41 @@
|
||||
if (!defined('ADODB_DIR')) die();
|
||||
|
||||
class ADODB2_sapdb extends ADODB_DataDict {
|
||||
|
||||
|
||||
var $databaseType = 'sapdb';
|
||||
var $seqField = false;
|
||||
var $seqField = false;
|
||||
var $renameColumn = 'RENAME COLUMN %s.%s TO %s';
|
||||
|
||||
|
||||
function ActualType($meta)
|
||||
{
|
||||
switch($meta) {
|
||||
case 'C': return 'VARCHAR';
|
||||
case 'XL':
|
||||
case 'X': return 'LONG';
|
||||
|
||||
|
||||
case 'C2': return 'VARCHAR UNICODE';
|
||||
case 'X2': return 'LONG UNICODE';
|
||||
|
||||
|
||||
case 'B': return 'LONG';
|
||||
|
||||
|
||||
case 'D': return 'DATE';
|
||||
case 'TS':
|
||||
case 'T': return 'TIMESTAMP';
|
||||
|
||||
|
||||
case 'L': return 'BOOLEAN';
|
||||
case 'I': return 'INTEGER';
|
||||
case 'I1': return 'FIXED(3)';
|
||||
case 'I2': return 'SMALLINT';
|
||||
case 'I4': return 'INTEGER';
|
||||
case 'I8': return 'FIXED(20)';
|
||||
|
||||
|
||||
case 'F': return 'FLOAT(38)';
|
||||
case 'N': return 'FIXED';
|
||||
default:
|
||||
return $meta;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function MetaType($t,$len=-1,$fieldobj=false)
|
||||
{
|
||||
if (is_object($t)) {
|
||||
@@ -79,10 +81,10 @@ class ADODB2_sapdb extends ADODB_DataDict {
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
|
||||
// return string must begin with space
|
||||
function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
|
||||
{
|
||||
{
|
||||
$suffix = '';
|
||||
if ($funsigned) $suffix .= ' UNSIGNED';
|
||||
if ($fnotnull) $suffix .= ' NOT NULL';
|
||||
@@ -99,8 +101,8 @@ class ADODB2_sapdb extends ADODB_DataDict {
|
||||
list($lines,$pkey) = $this->_GenFields($flds);
|
||||
return array( 'ALTER TABLE ' . $tabname . ' ADD (' . implode(', ',$lines) . ')' );
|
||||
}
|
||||
|
||||
function AlterColumnSQL($tabname, $flds)
|
||||
|
||||
function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
|
||||
{
|
||||
$tabname = $this->TableName ($tabname);
|
||||
$sql = array();
|
||||
@@ -108,7 +110,7 @@ class ADODB2_sapdb extends ADODB_DataDict {
|
||||
return array( 'ALTER TABLE ' . $tabname . ' MODIFY (' . implode(', ',$lines) . ')' );
|
||||
}
|
||||
|
||||
function DropColumnSQL($tabname, $flds)
|
||||
function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
|
||||
{
|
||||
$tabname = $this->TableName ($tabname);
|
||||
if (!is_array($flds)) $flds = explode(',',$flds);
|
||||
@@ -116,7 +118,5 @@ class ADODB2_sapdb extends ADODB_DataDict {
|
||||
$flds[$k] = $this->NameQuote($v);
|
||||
}
|
||||
return array( 'ALTER TABLE ' . $tabname . ' DROP (' . implode(', ',$flds) . ')' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user