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

.

parent 49581d4b
......@@ -19,6 +19,9 @@
// 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 link to DemoStorage
package demo
......@@ -59,8 +62,12 @@ func (d *Storage) Close() error {
}
// Sync implements zodb.IStorageDriver .
func (d *Storage) Sync(ctx context.Context) (head zodb.Tid, _ error) {
// XXX errctx?
func (d *Storage) Sync(ctx context.Context) (head zodb.Tid, err error) {
defer func() {
if err != nil {
err = &zodb.OpError{URL: d.URL(), Op: "sync", Args: xid, Err: err}
}
}()
head, err := d.δ.Sync(ctx)
if err != nil {
......@@ -136,8 +143,7 @@ func (d *Storage) Load(ctx context.Context, xid zodb.Xid) (_ *mem.Buf, _ zodb.Ti
// Iterator implements zodb.IStorageDriver .
func (d *Storage) Iterate(ctx context.Context, tidMin, tidMax zodb.Tid) zodb.ITxnIterator {
// XXX errctx?
panic("TODO") // XXX
panic("TODO")
}
// 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