当前位置: 首页>>代码示例>>PHP>>正文


PHP Table::setIdentifierQuoting方法代码示例

本文整理汇总了PHP中Propel\Generator\Model\Table::setIdentifierQuoting方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::setIdentifierQuoting方法的具体用法?PHP Table::setIdentifierQuoting怎么用?PHP Table::setIdentifierQuoting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Propel\Generator\Model\Table的用法示例。


在下文中一共展示了Table::setIdentifierQuoting方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: providerForTestGetModifyColumnRemoveDefaultValueDDL

 public function providerForTestGetModifyColumnRemoveDefaultValueDDL()
 {
     $t1 = new Table('test');
     $t1->setIdentifierQuoting(true);
     $c1 = new Column();
     $c1->setName('test');
     $c1->getDomain()->setType('INTEGER');
     $c1->setDefaultValue(0);
     $t1->addColumn($c1);
     $t2 = new Table('test');
     $t2->setIdentifierQuoting(true);
     $c2 = new Column();
     $c2->setName('test');
     $c2->getDomain()->setType('INTEGER');
     $t2->addColumn($c2);
     return [[ColumnComparator::computeDiff($c1, $c2)]];
 }
开发者ID:disider,项目名称:Propel2,代码行数:17,代码来源:PlatformMigrationTestProvider.php

示例2: testGetModifyColumnDDLWithVarcharWithoutSizeAndPlatform

    public function testGetModifyColumnDDLWithVarcharWithoutSizeAndPlatform()
    {
        $t1 = new Table('foo');
        $t1->setIdentifierQuoting(true);
        $c1 = new Column('bar');
        $c1->setTable($t1);
        $c1->getDomain()->copy($this->getPlatform()->getDomainForType('VARCHAR'));
        $c1->getDomain()->replaceSize(null);
        $c1->getDomain()->replaceScale(null);
        $t1->addColumn($c1);
        $schema = <<<EOF
<database name="test" identifierQuoting="true">
    <table name="foo">
        <column name="id" primaryKey="true" type="INTEGER" autoIncrement="true" />
        <column name="bar"/>
    </table>
</database>
EOF;
        $xtad = new SchemaReader(null);
        $appData = $xtad->parseString($schema);
        $db = $appData->getDatabase();
        $table = $db->getTable('foo');
        $c2 = $table->getColumn('bar');
        $columnDiff = ColumnComparator::computeDiff($c1, $c2);
        $expected = false;
        $this->assertSame($expected, $columnDiff);
    }
开发者ID:disider,项目名称:Propel2,代码行数:27,代码来源:PgsqlPlatformMigrationTest.php

示例3: testGetIndexDDLFulltext

 public function testGetIndexDDLFulltext()
 {
     $table = new Table('foo');
     $table->setIdentifierQuoting(true);
     $column1 = new Column('bar1');
     $column1->getDomain()->copy($this->getPlatform()->getDomainForType('LONGVARCHAR'));
     $table->addColumn($column1);
     $index = new Index('bar_index');
     $index->addColumn($column1);
     $vendor = new VendorInfo('mysql');
     $vendor->setParameter('Index_type', 'FULLTEXT');
     $index->addVendorInfo($vendor);
     $table->addIndex($index);
     $expected = 'FULLTEXT INDEX `bar_index` (`bar1`)';
     $this->assertEquals($expected, $this->getPlatform()->getIndexDDL($index));
 }
开发者ID:SwissalpS,项目名称:Propel2,代码行数:16,代码来源:MysqlPlatformMyISAMTest.php

示例4: providerForTestPrimaryKeyDDL

 public function providerForTestPrimaryKeyDDL()
 {
     $table = new Table('foo');
     $table->setIdentifierQuoting(true);
     $column = new Column('bar');
     $column->setPrimaryKey(true);
     $table->addColumn($column);
     return array(array($table));
 }
开发者ID:dracony,项目名称:forked-php-orm-benchmark,代码行数:9,代码来源:PlatformTestProvider.php


注:本文中的Propel\Generator\Model\Table::setIdentifierQuoting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。