本文整理汇总了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)]];
}
示例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);
}
示例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));
}
示例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));
}