diff --git a/apijson/query_node.go b/apijson/query_node.go index be1065c..1484a74 100644 --- a/apijson/query_node.go +++ b/apijson/query_node.go @@ -5,8 +5,6 @@ import ( "net/http" "strings" "time" - - "github.com/micro/go-micro/logger" ) func NewQueryNode(c *QueryContext, path, key string, queryMap map[string]interface{}) *QueryNode { @@ -119,7 +117,6 @@ func (n *QueryNode) parseOne() { func (n *QueryNode) parseKVs(kvs map[string]interface{}) { root := n.ctx for field, value := range kvs { - logger.Debugf("%s -> parse %s %v", n.Key, field, value) if value == nil { root.err = fmt.Errorf("field value error, %s is nil", field) root.code = http.StatusBadRequest diff --git a/query_node_test.go b/query_node_test.go deleted file mode 100644 index d94d771..0000000 --- a/query_node_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package vql - -import ( - "encoding/json" - "log" - "testing" - - "git.ouxuan.net/3136352472/vql/apijson" -) - -func TestNewQueryNode(t *testing.T) { - apijson.SetQueryAll(func(sql string, args ...interface{}) ([]map[string]interface{}, error) { - log.Println(sql, args) - sqlx, err := Analyze(sql) - if err != nil { - return nil, err - } - log.Println(sqlx.ToSql()) - return nil, nil - }) - - reqStr := `{ "Moment": { "id":12 } }` - req := make(map[string]interface{}) - json.Unmarshal([]byte(reqStr), &req) - - ctx := apijson.NewQueryContext(req) - - log.Println(ctx.Response()) -}