revert code change

master
Oliver Tonnhofer 2013-10-29 17:05:59 +01:00
parent 93edef2681
commit 122afae480
1 changed files with 4 additions and 4 deletions

View File

@ -60,13 +60,13 @@ func addGeometryColumn(tx *sql.Tx, tableName string, spec TableSpec) error {
if geomType == "POLYGON" { if geomType == "POLYGON" {
geomType = "GEOMETRY" // for multipolygon support geomType = "GEOMETRY" // for multipolygon support
} }
stmt := fmt.Sprintf("SELECT AddGeometryColumn('%s', '%s', 'geometry', '%d', '%s', 2);", sql := fmt.Sprintf("SELECT AddGeometryColumn('%s', '%s', 'geometry', '%d', '%s', 2);",
spec.Schema, tableName, spec.Srid, geomType) spec.Schema, tableName, spec.Srid, geomType)
row := tx.QueryRow(stmt) row := tx.QueryRow(sql)
var void interface{} var void interface{}
err := row.Scan(&void) err := row.Scan(&void)
if err != nil && err != sql.ErrNoRows { if err != nil {
return &SQLError{stmt, err} return &SQLError{sql, err}
} }
return nil return nil
} }