Remove old and unused code

This commit is contained in:
Tobie Morgan Hitchcock 2017-11-27 14:21:56 +00:00
parent 93d154a099
commit 4437b2b8a5

View file

@ -23,12 +23,10 @@ import (
"strconv" "strconv"
"time" "time"
// "github.com/abcum/surreal/cnf"
"github.com/abcum/surreal/sql" "github.com/abcum/surreal/sql"
"github.com/abcum/surreal/util/data" "github.com/abcum/surreal/util/data"
"github.com/abcum/surreal/util/deep" "github.com/abcum/surreal/util/deep"
"github.com/abcum/surreal/util/fncs" "github.com/abcum/surreal/util/fncs"
// "github.com/abcum/surreal/util/keys"
) )
var ign = data.New() var ign = data.New()
@ -51,29 +49,6 @@ func (e *executor) fetch(ctx context.Context, val interface{}, doc *data.Doc) (o
// TODO do we really need to copy? // TODO do we really need to copy?
return deep.Copy(val), nil return deep.Copy(val), nil
// case *sql.Thing:
// if doc == nil {
// return val, nil
// }
// s := &sql.SelectStatement{
// KV: cnf.Settings.DB.Base, NS: "test", DB: "test",
// Expr: []*sql.Field{{Expr: &sql.All{}, Field: "*"}},
// What: []sql.Expr{val},
// }
// i := newIterator(e, ctx, s, false)
// key := &keys.Thing{KV: s.KV, NS: s.NS, DB: s.DB, TB: val.TB, ID: val.ID}
// i.processThing(ctx, key)
// res, err := i.Yield(ctx)
// if err != nil {
// return nil, err
// }
// if len(res) > 0 {
// return res[0], nil
// }
// return val, nil
case *sql.Ident: case *sql.Ident:
switch { switch {