Mirrors the per-dialect createSpatialIndex implementations found under
src/dialects/*/index.ts, and is consistent with the dialects that
DataTypes.GEOMETRY/GEOGRAPHY (src/models/data-types.ts) actually
generate column syntax for:
PostgreSQL/PostGIS: CREATE INDEX ... USING gist (col)
MySQL/MariaDB: CREATE SPATIAL INDEX ...
Oracle: CREATE INDEX ... INDEXTYPE IS MDSYS.SPATIAL_INDEX
MSSQL: CREATE SPATIAL INDEX ... (default grid tessellation)
SQLite: CREATE VIRTUAL TABLE ... USING rtree(...) (SQLite has no
native spatial index — the R-Tree virtual table module is the closest
equivalent)
Parameters
tableName: string
The table to index
columnName: string
The spatial column to index
OptionalindexName: string
Optional explicit index name
dialect: SpatialDialect = 'mysql'
The target SQL dialect (defaults to 'mysql' for backwards compatibility)
Generate SQL for spatial index creation.
Mirrors the per-dialect
createSpatialIndeximplementations found undersrc/dialects/*/index.ts, and is consistent with the dialects thatDataTypes.GEOMETRY/GEOGRAPHY(src/models/data-types.ts) actually generate column syntax for:CREATE INDEX ... USING gist (col)CREATE SPATIAL INDEX ...CREATE INDEX ... INDEXTYPE IS MDSYS.SPATIAL_INDEXCREATE SPATIAL INDEX ...(default grid tessellation)CREATE VIRTUAL TABLE ... USING rtree(...)(SQLite has no native spatial index — the R-Tree virtual table module is the closest equivalent)