Commit 351d5dfa authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 49581d4b
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
// Package demo provides overlayed storage, similar to DemoStorage in ZODB/py. // Package demo provides overlayed storage, similar to DemoStorage in ZODB/py.
// //
// Storage combines base and δ storages as if δ transactional log was logically
// appended to base.
//
// XXX // XXX
// XXX link to DemoStorage // XXX link to DemoStorage
package demo package demo
...@@ -59,8 +62,12 @@ func (d *Storage) Close() error { ...@@ -59,8 +62,12 @@ func (d *Storage) Close() error {
} }
// Sync implements zodb.IStorageDriver . // Sync implements zodb.IStorageDriver .
func (d *Storage) Sync(ctx context.Context) (head zodb.Tid, _ error) { func (d *Storage) Sync(ctx context.Context) (head zodb.Tid, err error) {
// XXX errctx? defer func() {
if err != nil {
err = &zodb.OpError{URL: d.URL(), Op: "sync", Args: xid, Err: err}
}
}()
head, err := d.δ.Sync(ctx) head, err := d.δ.Sync(ctx)
if err != nil { if err != nil {
...@@ -136,8 +143,7 @@ func (d *Storage) Load(ctx context.Context, xid zodb.Xid) (_ *mem.Buf, _ zodb.Ti ...@@ -136,8 +143,7 @@ func (d *Storage) Load(ctx context.Context, xid zodb.Xid) (_ *mem.Buf, _ zodb.Ti
// Iterator implements zodb.IStorageDriver . // Iterator implements zodb.IStorageDriver .
func (d *Storage) Iterate(ctx context.Context, tidMin, tidMax zodb.Tid) zodb.ITxnIterator { func (d *Storage) Iterate(ctx context.Context, tidMin, tidMax zodb.Tid) zodb.ITxnIterator {
// XXX errctx? panic("TODO")
panic("TODO") // XXX
} }
// URL implements zodb.IStorageDriver . // URL implements zodb.IStorageDriver .
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment