listSpatialIndexes() публичный Метод

public listSpatialIndexes ( $table )
 public function onSchemaIndexDefinition(SchemaIndexDefinitionEventArgs $args)
 {
     $index = $args->getTableIndex();
     $spatialIndexes = $this->schemaManager->listSpatialIndexes($args->getTable());
     if (!isset($spatialIndexes[$index['name']])) {
         return;
     }
     $spatialIndex = new Index($index['name'], $index['columns'], $index['unique'], $index['primary'], array_merge($index['flags'], array('SPATIAL')));
     $args->setIndex($spatialIndex)->preventDefault();
 }
Пример #2
0
 public function testListSpatialIndexes()
 {
     $schemaManager = new SchemaManager($this->_getConnection());
     $expected = array('idx_27ba8e29b7a5f324' => array(0 => 'point'), 'idx_27ba8e2999674a3d' => array(0 => 'point_2d'), 'idx_27ba8e293be136c3' => array(0 => 'point_3dz'), 'idx_27ba8e29b832b304' => array(0 => 'point_3dm'), 'idx_27ba8e29cf3dedbb' => array(0 => 'point_4d'), 'idx_27ba8e293c257075' => array(0 => 'point_2d_nullable'), 'idx_27ba8e293d5fe69e' => array(0 => 'point_2d_nosrid'), 'idx_27ba8e295f51a43c' => array(0 => 'point_geography_2d'), 'idx_27ba8e295afbb72d' => array(0 => 'point_geography_2d_srid'));
     $this->assertEquals($expected, $schemaManager->listSpatialIndexes('foo.points'));
 }