Exemplo n.º 1
0
 public function testCreateSpatialIndexSQL()
 {
     $sql = 'CREATE INDEX test_index ON some_schema.test_table' . ' USING GIST (geometry)';
     $table = 'some_schema.test_table';
     $index = new Index('test_index', array('geometry'));
     $this->assertEquals($sql, DriverTest::getConnection()->getDatabasePlatform()->getCreateSpatialIndexSQL($index, $table));
 }
 protected function setUp()
 {
     $this->connection = DriverTest::getConnection();
     $id = new Column('id', Type::getType("integer"));
     $name = new Column('name', Type::getType("string"));
     $geometry = new Column('geometry', Type::getType('geometry'), array('customSchemaOptions' => array('geometryType' => 'multipolygon', 'srid' => 4326, 'indexName' => 'multipolygon_sx')));
     $pk = new Index('testpkey', array('id'), false, true);
     $this->table = new Table('test_table', array($id, $name, $geometry), array($pk));
 }
 public function testInsertGeometry()
 {
     parent::testInsertGeometry(DriverTest::getConnection());
 }