forked from MTSR/mapserver
go fmt
This commit is contained in:
parent
75bf921b54
commit
bd2f794af8
@ -17,7 +17,6 @@ and o.posx <= ? and o.posy <= ? and o.posz <= ?
|
|||||||
order by o.id
|
order by o.id
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
||||||
func (db *Sqlite3Accessor) GetMapData(q SearchQuery) ([]*MapObject, error) {
|
func (db *Sqlite3Accessor) GetMapData(q SearchQuery) ([]*MapObject, error) {
|
||||||
rows, err := db.db.Query(getMapDataPosQuery,
|
rows, err := db.db.Query(getMapDataPosQuery,
|
||||||
q.Type,
|
q.Type,
|
||||||
@ -43,7 +42,6 @@ func (db *Sqlite3Accessor) GetMapData(q SearchQuery) ([]*MapObject, error) {
|
|||||||
var posx, posy, posz int
|
var posx, posy, posz int
|
||||||
var key, value string
|
var key, value string
|
||||||
|
|
||||||
|
|
||||||
err = rows.Scan(&id, &Type, &mtime,
|
err = rows.Scan(&id, &Type, &mtime,
|
||||||
&x, &y, &z, &posx, &posy, &posz,
|
&x, &y, &z, &posx, &posy, &posz,
|
||||||
&key, &value,
|
&key, &value,
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func NewSqliteAccessor(filename string) (*Sqlite3Accessor, error) {
|
func NewSqliteAccessor(filename string) (*Sqlite3Accessor, error) {
|
||||||
//TODO: flag/config for unsafe db access
|
//TODO: flag/config for unsafe db access
|
||||||
db, err := sql.Open("sqlite3", filename+"?_timeout=500&_journal_mode=MEMORY&_synchronous=OFF")
|
db, err := sql.Open("sqlite3", filename+"?_timeout=500&_journal_mode=MEMORY&_synchronous=OFF")
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package mapobjectdb
|
package mapobjectdb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mapserver/coords"
|
"mapserver/coords"
|
||||||
"os"
|
"os"
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user