diff --git a/db/create.go b/db/create.go index e1a518de..1622fb48 100644 --- a/db/create.go +++ b/db/create.go @@ -81,10 +81,6 @@ func create(txn kvs.TX, doc *item.Doc, ast *sql.CreateStatement) (out interface{ return nil, err } - if err = doc.StoreTrail(txn); err != nil { - return nil, err - } - out = doc.Yield(ast.Echo, sql.AFTER) return diff --git a/db/delete.go b/db/delete.go index 0fa23910..d35c0bf3 100644 --- a/db/delete.go +++ b/db/delete.go @@ -75,10 +75,6 @@ func delete(txn kvs.TX, doc *item.Doc, ast *sql.DeleteStatement) (out interface{ return nil, err } - if err = doc.StoreTrail(txn); err != nil { - return nil, err - } - if err = doc.PurgeIndex(txn); err != nil { return nil, err } diff --git a/db/modify.go b/db/modify.go index 8ef84033..97d7d01c 100644 --- a/db/modify.go +++ b/db/modify.go @@ -73,10 +73,6 @@ func modify(txn kvs.TX, doc *item.Doc, ast *sql.ModifyStatement) (out interface{ return nil, err } - if err = doc.StoreTrail(txn); err != nil { - return nil, err - } - out = doc.Yield(ast.Echo, sql.DIFF) return diff --git a/db/update.go b/db/update.go index 5cab2e5f..c1d1e152 100644 --- a/db/update.go +++ b/db/update.go @@ -87,10 +87,6 @@ func update(txn kvs.TX, doc *item.Doc, ast *sql.UpdateStatement) (out interface{ return nil, err } - if err = doc.StoreTrail(txn); err != nil { - return nil, err - } - out = doc.Yield(ast.Echo, sql.AFTER) return diff --git a/util/item/item.go b/util/item/item.go index 01a639d2..ebd216a3 100644 --- a/util/item/item.go +++ b/util/item/item.go @@ -214,21 +214,6 @@ func (this *Doc) StorePatch(txn kvs.TX) (err error) { } -func (this *Doc) PurgeTrail(txn kvs.TX) (err error) { - - beg := &keys.Trail{KV: this.key.KV, NS: this.key.NS, DB: this.key.DB, AT: keys.StartOfTime} - end := &keys.Trail{KV: this.key.KV, NS: this.key.NS, DB: this.key.DB, AT: keys.EndOfTime} - return txn.RDel(beg.Encode(), end.Encode(), 0) - -} - -func (this *Doc) StoreTrail(txn kvs.TX) (err error) { - - key := &keys.Trail{KV: this.key.KV, NS: this.key.NS, DB: this.key.DB} - return txn.CPut(key.Encode(), this.diff(), nil) - -} - func (this *Doc) PurgeIndex(txn kvs.TX) (err error) { for _, index := range this.indexes {