Add invisible meta object on items
This commit is contained in:
parent
8eaa4e6eda
commit
bb6387c69b
2 changed files with 5 additions and 1 deletions
|
@ -25,11 +25,13 @@ func (this *Doc) Blaze(ast *sql.SelectStatement) (res interface{}) {
|
|||
|
||||
for _, v := range ast.Expr {
|
||||
if _, ok := v.Expr.(*sql.All); ok {
|
||||
doc = this.current
|
||||
doc = data.Consume(this.current.Copy())
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
doc.Del("meta")
|
||||
|
||||
for _, v := range ast.Expr {
|
||||
switch e := v.Expr.(type) {
|
||||
default:
|
||||
|
|
|
@ -72,6 +72,8 @@ func (this *Doc) Merge(data []sql.Expr) (err error) {
|
|||
func (this *Doc) setFld() (err error) {
|
||||
|
||||
this.current.Set(this.id, "id")
|
||||
this.current.Set(this.key.ID, "meta.id")
|
||||
this.current.Set(this.key.TB, "meta.tb")
|
||||
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue