ADODB_pdo_mysql Klassenreferenz

Klassendiagramm für ADODB_pdo_mysql:
Inheritance graph
[Legende]
Zusammengehörigkeiten von ADODB_pdo_mysql:
Collaboration graph
[Legende]

Öffentliche Methoden

 _init ($parentDriver)
 OffsetDate ($dayFraction, $date=false)
 Concat ()
 ServerInfo ()
 MetaTables ($ttype=false, $showSchema=false, $mask=false)
 SetTransactionMode ($transaction_mode)
 MetaColumns ($table, $normalize=true)
 SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs=0)

Datenfelder

 $metaTablesSQL = "SHOW TABLES"
 $metaColumnsSQL = "SHOW COLUMNS FROM `%s`"
 $sysDate = 'CURDATE()'
 $sysTimeStamp = 'NOW()'
 $hasGenID = true
 $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);"
 $_dropSeqSQL = "drop table %s"
 $fmtTimeStamp = "'Y-m-d, H:i:s'"
 $nameQuote = '`'

Ausführliche Beschreibung

Definiert in Zeile 13 der Datei adodb-pdo_mysql.inc.php.


Dokumentation der Elementfunktionen

_init ( parentDriver  ) 

Definiert in Zeile 24 der Datei adodb-pdo_mysql.inc.php.

00025         {
00026         
00027                 $parentDriver->hasTransactions = false;
00028                 #$parentDriver->_bindInputArray = false;
00029                 $parentDriver->hasInsertID = true;
00030                 $parentDriver->_connectionID->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true);
00031         }

Concat (  ) 

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 44 der Datei adodb-pdo_mysql.inc.php.

00045         {       
00046                 $s = "";
00047                 $arr = func_get_args();
00048 
00049                 // suggestion by andrew005#mnogo.ru
00050                 $s = implode(',',$arr);
00051                 if (strlen($s) > 0) return "CONCAT($s)"; return ''; 
00052         }

MetaColumns ( table,
normalize = true 
)

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 89 der Datei adodb-pdo_mysql.inc.php.

00090         {
00091                 $this->_findschema($table,$schema);
00092                 if ($schema) {
00093                         $dbName = $this->database;
00094                         $this->SelectDB($schema);
00095                 }
00096                 global $ADODB_FETCH_MODE;
00097                 $save = $ADODB_FETCH_MODE;
00098                 $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
00099                 
00100                 if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
00101                 $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
00102                 
00103                 if ($schema) {
00104                         $this->SelectDB($dbName);
00105                 }
00106                 
00107                 if (isset($savem)) $this->SetFetchMode($savem);
00108                 $ADODB_FETCH_MODE = $save;
00109                 if (!is_object($rs)) {
00110                         $false = false;
00111                         return $false;
00112                 }
00113                         
00114                 $retarr = array();
00115                 while (!$rs->EOF){
00116                         $fld = new ADOFieldObject();
00117                         $fld->name = $rs->fields[0];
00118                         $type = $rs->fields[1];
00119                         
00120                         // split type into type(length):
00121                         $fld->scale = null;
00122                         if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) {
00123                                 $fld->type = $query_array[1];
00124                                 $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
00125                                 $fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1;
00126                         } elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) {
00127                                 $fld->type = $query_array[1];
00128                                 $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
00129                         } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) {
00130                                 $fld->type = $query_array[1];
00131                                 $arr = explode(",",$query_array[2]);
00132                                 $fld->enums = $arr;
00133                                 $zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6
00134                                 $fld->max_length = ($zlen > 0) ? $zlen : 1;
00135                         } else {
00136                                 $fld->type = $type;
00137                                 $fld->max_length = -1;
00138                         }
00139                         $fld->not_null = ($rs->fields[2] != 'YES');
00140                         $fld->primary_key = ($rs->fields[3] == 'PRI');
00141                         $fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false);
00142                         $fld->binary = (strpos($type,'blob') !== false);
00143                         $fld->unsigned = (strpos($type,'unsigned') !== false);
00144                                 
00145                         if (!$fld->binary) {
00146                                 $d = $rs->fields[4];
00147                                 if ($d != '' && $d != 'NULL') {
00148                                         $fld->has_default = true;
00149                                         $fld->default_value = $d;
00150                                 } else {
00151                                         $fld->has_default = false;
00152                                 }
00153                         }
00154                         
00155                         if ($save == ADODB_FETCH_NUM) {
00156                                 $retarr[] = $fld;
00157                         } else {
00158                                 $retarr[strtoupper($fld->name)] = $fld;
00159                         }
00160                                 $rs->MoveNext();
00161                         }
00162                 
00163                         $rs->Close();
00164                         return $retarr; 
00165         }

MetaTables ( ttype = false,
showSchema = false,
mask = false 
)

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 61 der Datei adodb-pdo_mysql.inc.php.

00062         {       
00063                 $save = $this->metaTablesSQL;
00064                 if ($showSchema && is_string($showSchema)) {
00065                         $this->metaTablesSQL .= " from $showSchema";
00066                 }
00067                 
00068                 if ($mask) {
00069                         $mask = $this->qstr($mask);
00070                         $this->metaTablesSQL .= " like $mask";
00071                 }
00072                 $ret = ADOConnection::MetaTables($ttype,$showSchema);
00073                 
00074                 $this->metaTablesSQL = $save;
00075                 return $ret;
00076         }

OffsetDate ( dayFraction,
date = false 
)

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 34 der Datei adodb-pdo_mysql.inc.php.

00035         {               
00036                 if (!$date) $date = $this->sysDate;
00037                 
00038                 $fraction = $dayFraction * 24 * 3600;
00039                 return $date . ' + INTERVAL ' .  $fraction.' SECOND';
00040                 
00041 //              return "from_unixtime(unix_timestamp($date)+$fraction)";
00042         }

SelectLimit ( sql,
nrows = -1,
offset = -1,
inputarr = false,
secs = 0 
)

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 169 der Datei adodb-pdo_mysql.inc.php.

00170         {
00171                 $offsetStr =($offset>=0) ? "$offset," : '';
00172                 // jason judge, see http://phplens.com/lens/lensforum/msgs.php?id=9220
00173                 if ($nrows < 0) $nrows = '18446744073709551615'; 
00174                 
00175                 if ($secs)
00176                         $rs = $this->CacheExecute($secs,$sql." LIMIT $offsetStr$nrows",$inputarr);
00177                 else
00178                         $rs = $this->Execute($sql." LIMIT $offsetStr$nrows",$inputarr);
00179                 return $rs;
00180         }

ServerInfo (  ) 

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 54 der Datei adodb-pdo_mysql.inc.php.

00055         {
00056                 $arr['description'] = ADOConnection::GetOne("select version()");
00057                 $arr['version'] = ADOConnection::_findvers($arr['description']);
00058                 return $arr;
00059         }

SetTransactionMode ( transaction_mode  ) 

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 78 der Datei adodb-pdo_mysql.inc.php.

00079         {
00080                 $this->_transmode  = $transaction_mode;
00081                 if (empty($transaction_mode)) {
00082                         $this->Execute('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ');
00083                         return;
00084                 }
00085                 if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
00086                 $this->Execute("SET SESSION TRANSACTION ".$transaction_mode);
00087         }


Dokumentation der Datenelemente

$_dropSeqSQL = "drop table %s"

Definiert in Zeile 20 der Datei adodb-pdo_mysql.inc.php.

$_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);"

Definiert in Zeile 19 der Datei adodb-pdo_mysql.inc.php.

$fmtTimeStamp = "'Y-m-d, H:i:s'"

Erneute Implementation von ADODB_pdo.

Definiert in Zeile 21 der Datei adodb-pdo_mysql.inc.php.

$hasGenID = true

Definiert in Zeile 18 der Datei adodb-pdo_mysql.inc.php.

$metaColumnsSQL = "SHOW COLUMNS FROM `%s`"

Definiert in Zeile 15 der Datei adodb-pdo_mysql.inc.php.

$metaTablesSQL = "SHOW TABLES"

Definiert in Zeile 14 der Datei adodb-pdo_mysql.inc.php.

$nameQuote = '`'

Definiert in Zeile 22 der Datei adodb-pdo_mysql.inc.php.

$sysDate = 'CURDATE()'

Definiert in Zeile 16 der Datei adodb-pdo_mysql.inc.php.

$sysTimeStamp = 'NOW()'

Definiert in Zeile 17 der Datei adodb-pdo_mysql.inc.php.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Copyright © 2003 - 2010 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen