mirror of https://github.com/tidwall/tile38.git
fixes #13, invalid object keyword, panic on missing key
This commit is contained in:
parent
b211d9fe15
commit
cd217f05d2
2
build.sh
2
build.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION="1.1.3"
|
VERSION="1.1.4"
|
||||||
PROTECTED_MODE="no"
|
PROTECTED_MODE="no"
|
||||||
|
|
||||||
# Hardcode some values to the core package
|
# Hardcode some values to the core package
|
||||||
|
|
|
@ -215,7 +215,7 @@ func (c *Controller) cmdSearchArgs(cmd string, vs []resp.Value, types []string)
|
||||||
}
|
}
|
||||||
|
|
||||||
var nearbyTypes = []string{"point"}
|
var nearbyTypes = []string{"point"}
|
||||||
var withinOrIntersectsTypes = []string{"geo", "bounds", "hash", "tile", "quadkey", "get"}
|
var withinOrIntersectsTypes = []string{"geo", "bounds", "hash", "tile", "quadkey", "get", "object"}
|
||||||
|
|
||||||
func (c *Controller) cmdNearby(msg *server.Message) (res string, err error) {
|
func (c *Controller) cmdNearby(msg *server.Message) (res string, err error) {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
|
@ -274,6 +274,9 @@ func (c *Controller) cmdWithinOrIntersects(cmd string, msg *server.Message) (res
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
if sw.col == nil {
|
||||||
|
return "", errKeyNotFound
|
||||||
|
}
|
||||||
wr.WriteString(`{"ok":true`)
|
wr.WriteString(`{"ok":true`)
|
||||||
sw.writeHead()
|
sw.writeHead()
|
||||||
if cmd == "within" {
|
if cmd == "within" {
|
||||||
|
|
Loading…
Reference in New Issue