public function testGeneratesCreateIndexWithAdvancedPlatformOptionsSQL() { $this->assertEquals('CREATE VIRTUAL UNIQUE CLUSTERED INDEX fooindex ON footable (a, b) WITH NULLS NOT DISTINCT FOR OLAP WORKLOAD', $this->_platform->getCreateIndexSQL(new Index('fooindex', array('a', 'b'), true, false, array('virtual', 'clustered', 'with_nulls_not_distinct', 'for_olap_workload')), 'footable')); $this->assertEquals('CREATE VIRTUAL CLUSTERED INDEX fooindex ON footable (a, b) FOR OLAP WORKLOAD', $this->_platform->getCreateIndexSQL(new Index('fooindex', array('a', 'b'), false, false, array('virtual', 'clustered', 'with_nulls_not_distinct', 'for_olap_workload')), 'footable')); // WITH NULLS NOT DISTINCT clause not available on primary indexes. $this->assertEquals('ALTER TABLE footable ADD PRIMARY KEY (a, b)', $this->_platform->getCreateIndexSQL(new Index('fooindex', array('a', 'b'), false, true, array('with_nulls_not_distinct')), 'footable')); // WITH NULLS NOT DISTINCT clause not available on non-unique indexes. $this->assertEquals('CREATE INDEX fooindex ON footable (a, b)', $this->_platform->getCreateIndexSQL(new Index('fooindex', array('a', 'b'), false, false, array('with_nulls_not_distinct')), 'footable')); }