當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DefaultPlatform類代碼示例

本文整理匯總了PHP中DefaultPlatform的典型用法代碼示例。如果您正苦於以下問題:PHP DefaultPlatform類的具體用法?PHP DefaultPlatform怎麽用?PHP DefaultPlatform使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了DefaultPlatform類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getDropIndexDDL

 /**
  * Overrides the implementation from DefaultPlatform
  *
  * @author     Niklas Närhinen <niklas@narhinen.net>
  * @return string
  * @see        DefaultPlatform::getDropIndexDDL
  */
 public function getDropIndexDDL(Index $index)
 {
     if ($index instanceof Unique) {
         $pattern = "\n    ALTER TABLE %s DROP CONSTRAINT %s;\n    ";
         return sprintf($pattern, $this->quoteIdentifier($index->getTable()->getName()), $this->quoteIdentifier($index->getName()));
     } else {
         return parent::getDropIndexDDL($index);
     }
 }
開發者ID:kalaspuffar,項目名稱:php-orm-benchmark,代碼行數:16,代碼來源:PgsqlPlatform.php

示例2: getBooleanString

 /**
  * @see        Platform::getBooleanString()
  */
 public function getBooleanString($b)
 {
     // parent method does the checking for allowes tring
     // representations & returns integer
     $b = parent::getBooleanString($b);
     return $b ? "'t'" : "'f'";
 }
開發者ID:nextbigsound,項目名稱:propel-orm,代碼行數:10,代碼來源:PgsqlPlatform.php

示例3: disconnectedEscapeText

 /**
  * Escape the string for RDBMS.
  * @param      string $text
  * @return     string
  */
 public function disconnectedEscapeText($text)
 {
     if (function_exists('sqlite_escape_string')) {
         return sqlite_escape_string($text);
     } else {
         return parent::disconnectedEscapeText($text);
     }
 }
開發者ID:nextbigsound,項目名稱:propel-orm,代碼行數:13,代碼來源:SqlitePlatform.php

示例4: initialize

 /**
  * Initializes db specific domain mapping.
  */
 protected function initialize()
 {
     parent::initialize();
     $this->setSchemaDomainMapping(new Domain(PropelTypes::NUMERIC, "DECIMAL"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, "MEDIUMTEXT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::DATE, "DATETIME"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, "BLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, "MEDIUMBLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, "LONGBLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, "LONGBLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, "LONGTEXT"));
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:15,代碼來源:SqlitePlatform.php

示例5: initialize

 /**
  * Initializes db specific domain mapping.
  */
 protected function initialize()
 {
     parent::initialize();
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BOOLEAN, "TINYINT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::NUMERIC, "DECIMAL"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, "TEXT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, "BLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, "MEDIUMBLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, "LONGBLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, "LONGBLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, "LONGTEXT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::TIMESTAMP, "DATETIME"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::OBJECT, "TEXT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::PHP_ARRAY, "TEXT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::ENUM, "TINYINT"));
 }
開發者ID:rubensayshi,項目名稱:propelsandbox,代碼行數:19,代碼來源:MysqlPlatform.php

示例6: initialize

 /**
  * Initializes db specific domain mapping.
  */
 protected function initialize()
 {
     parent::initialize();
     $this->setSchemaDomainMapping(new Domain(PropelTypes::INTEGER, "INT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BOOLEAN, "INT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::DOUBLE, "FLOAT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, "TEXT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, "TEXT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::DATE, "DATETIME"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BU_DATE, "DATETIME"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::TIME, "DATETIME"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::TIMESTAMP, "DATETIME"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BU_TIMESTAMP, "DATETIME"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, "BINARY(7132)"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, "IMAGE"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, "IMAGE"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, "IMAGE"));
 }
開發者ID:nhemsley,項目名稱:propel,代碼行數:21,代碼來源:MssqlPlatform.php

示例7: initialize

 /**
  * Initializes db specific domain mapping.
  */
 protected function initialize()
 {
     parent::initialize();
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BOOLEAN, "NUMBER", "1", "0"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::TINYINT, "NUMBER", "3", "0"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::SMALLINT, "NUMBER", "5", "0"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::INTEGER, "NUMBER"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BIGINT, "NUMBER", "20", "0"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::REAL, "NUMBER"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::DOUBLE, "FLOAT"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::DECIMAL, "NUMBER"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::NUMERIC, "NUMBER"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::VARCHAR, "VARCHAR2"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, "VARCHAR2", "2000"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::TIME, "DATE"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::TIMESTAMP, "DATE"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, "LONG RAW"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, "BLOB"));
     $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, "LONG RAW"));
 }
開發者ID:Daniel-Marynicz,項目名稱:symfony1-legacy,代碼行數:23,代碼來源:OraclePlatform.php

示例8: getColumnBindingPHP

 public function getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = "\t\t\t")
 {
     // FIXME - This is a temporary hack to get around apparent bugs w/ PDO+MYSQL
     // See http://pecl.php.net/bugs/bug.php?id=9919
     if ($column->getPDOType() == PDO::PARAM_BOOL) {
         return sprintf("\n%s\$stmt->bindValue(%s, (int) %s, PDO::PARAM_INT);", $tab, $identifier, $columnValueAccessor);
     }
     return parent::getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab);
 }
開發者ID:ketheriel,項目名稱:ETVA,代碼行數:9,代碼來源:MysqlPlatform.php

示例9: getColumnBindingPHP

 /**
  * Get the PHP snippet for binding a value to a column.
  * Warning: duplicates logic from DBOracle::bindValue().
  * Any code modification here must be ported there.
  */
 public function getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab = "\t\t\t")
 {
     if ($column->getPDOType() == PropelTypes::CLOB_EMU) {
         return sprintf("%s\$stmt->bindParam(%s, %s, %s, strlen(%s));\r\n", $tab, $identifier, $columnValueAccessor, PropelTypes::getPdoTypeString($column->getType()), $columnValueAccessor);
     }
     return parent::getColumnBindingPHP($column, $identifier, $columnValueAccessor, $tab);
 }
開發者ID:kcornejo,項目名稱:estadistica,代碼行數:12,代碼來源:OraclePlatform.php

示例10: getAddPrimaryKeyDDL

 public function getAddPrimaryKeyDDL(Table $table)
 {
     if (is_array($table->getPrimaryKey()) && count($table->getPrimaryKey())) {
         return parent::getAddPrimaryKeyDDL($table);
     }
 }
開發者ID:homer6,項目名稱:Propel,代碼行數:6,代碼來源:OraclePlatform.php


注:本文中的DefaultPlatform類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。