本文整理汇总了PHP中Propel\Generator\Model\Table::setSkipSql方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::setSkipSql方法的具体用法?PHP Table::setSkipSql怎么用?PHP Table::setSkipSql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Propel\Generator\Model\Table
的用法示例。
在下文中一共展示了Table::setSkipSql方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testValidateReturnsTrueWhenTableHasNoPkButIsAView
public function testValidateReturnsTrueWhenTableHasNoPkButIsAView()
{
$table = new Table('foo');
$table->setSkipSql(true);
$appData = $this->getAppDataForTable($table);
$validator = new SchemaValidator($appData);
$this->assertTrue($validator->validate());
}
示例2: testSetSkipSql
public function testSetSkipSql()
{
$table = new Table('books');
$table->setSkipSql(true);
$this->assertTrue($table->isSkipSql());
}
示例3: testCompareRemovedTableSkipSql
public function testCompareRemovedTableSkipSql()
{
$d1 = new Database();
$t1 = new Table('Foo_Table');
$c1 = new Column('Foo');
$c1->getDomain()->copy($this->platform->getDomainForType('DOUBLE'));
$c1->getDomain()->replaceScale(2);
$c1->getDomain()->replaceSize(3);
$c1->setNotNull(true);
$c1->getDomain()->setDefaultValue(new ColumnDefaultValue(123, ColumnDefaultValue::TYPE_VALUE));
$t1->addColumn($c1);
$d1->addTable($t1);
$t2 = new Table('Bar');
$t2->setSkipSql(true);
$d1->addTable($t2);
$d2 = new Database();
$t3 = new Table('Foo_Table');
$c3 = new Column('Foo');
$c3->getDomain()->copy($this->platform->getDomainForType('DOUBLE'));
$c3->getDomain()->replaceScale(2);
$c3->getDomain()->replaceSize(3);
$c3->setNotNull(true);
$c3->getDomain()->setDefaultValue(new ColumnDefaultValue(123, ColumnDefaultValue::TYPE_VALUE));
$t3->addColumn($c3);
$d2->addTable($t3);
$dc = new DatabaseComparator();
$dc->setFromDatabase($d1);
$dc->setToDatabase($d2);
$nbDiffs = $dc->compareTables();
$databaseDiff = $dc->getDatabaseDiff();
$this->assertEquals(0, $nbDiffs);
}