forked from MTSR/mapserver
db interface
This commit is contained in:
parent
ab660ca622
commit
5f9180efaf
@ -9,10 +9,7 @@ type Block struct {
|
|||||||
type DBAccessor interface {
|
type DBAccessor interface {
|
||||||
IsMigrated() (bool, error)
|
IsMigrated() (bool, error)
|
||||||
Migrate() error
|
Migrate() error
|
||||||
FindLatestBlocks(time int64, limit int) []Block
|
FindLatestBlocks(mintime int64, limit int) []Block, error
|
||||||
|
FindBlocks(posx int, posz int, posystart int, posyend int) []Block, error
|
||||||
//Block range lookup
|
CountBlocks(x1, x2, y1, y2, z1, z2 int) int, error
|
||||||
FindBlocks(posx int, posz int, posystart int, posyend int) []Block
|
|
||||||
GetXRange(posystart int, posyend int) (int, int)
|
|
||||||
GetZRange(posystart int, posyend int) (int, int)
|
|
||||||
}
|
}
|
||||||
|
16
db/sqlite.go
16
db/sqlite.go
@ -11,22 +11,18 @@ func (db *Sqlite3Accessor) Migrate() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *Sqlite3Accessor) FindLatestBlocks(time int64, limit int) []Block {
|
func (db *Sqlite3Accessor) FindLatestBlocks(mintime int64, limit int) ([]Block, error) {
|
||||||
return make([]Block, 0)
|
return make([]Block, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *Sqlite3Accessor) FindBlocks(posx int, posz int, posystart int, posyend int) []Block {
|
func (db *Sqlite3Accessor) FindBlocks(posx int, posz int, posystart int, posyend int) ([]Block, error) {
|
||||||
return make([]Block, 0)
|
return make([]Block, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *Sqlite3Accessor) GetXRange(posystart int, posyend int) (int, int) {
|
func (db *Sqlite3Accessor) CountBlocks(x1, x2, y1, y2, z1, z2 int) (int, error) {
|
||||||
return 0, 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *Sqlite3Accessor) GetZRange(posystart int, posyend int) (int, int) {
|
func NewSqliteAccessor(filename string) (*Sqlite3Accessor, error) {
|
||||||
return 0, 0
|
return nil, nil
|
||||||
}
|
|
||||||
|
|
||||||
func NewSqliteAccessor(filename string) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user