Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
f319974a
Commit
f319974a
authored
Oct 17, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6db32a78
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
2 deletions
+45
-2
go/zodb/btree/btree.go
go/zodb/btree/btree.go
+2
-0
go/zodb/btree/btree.go.in
go/zodb/btree/btree.go.in
+13
-0
go/zodb/btree/ziobtree.go
go/zodb/btree/ziobtree.go
+12
-0
go/zodb/btree/zlobtree.go
go/zodb/btree/zlobtree.go
+12
-0
go/zodb/persistent.go
go/zodb/persistent.go
+1
-0
go/zodb/zodb.go
go/zodb/zodb.go
+5
-2
No files found.
go/zodb/btree/btree.go
View file @
f319974a
...
...
@@ -26,6 +26,8 @@
//
// node.Entryv() returns [] of (key, child/value).
//
// BTree.FirstBucket() and Bucket.Next() allows to iterate in terms of B⁺ tree nodes.
//
// --------
//
// (*) https://github.com/zopefoundation/ZODB/blob/3.10.7-4-gb8d7a8567/src/BTrees/Development.txt#L211
...
...
go/zodb/btree/btree.go.in
View file @
f319974a
...
...
@@ -133,6 +133,18 @@ func (b *Bucket) Entryv() []BucketEntry {
return ev
}
// ---- node-level iteration ----
// XXX
func (t *BTree) FirstBucket() *Bucket {
return t.firstbucket
}
// XXX
func (b *Bucket) Next() *Bucket {
return b.next
}
// ---- point query ----
// Get searches BTree by key.
...
...
@@ -226,6 +238,7 @@ func (t *BTree) MinKey(ctx context.Context) (_ KEY, _ bool, err error) {
return 0, false, nil
}
// XXX -> just use t.firstBucket
for {
child := t.data[0].child.(zodb.IPersistent)
t.PDeactivate()
...
...
go/zodb/btree/ziobtree.go
View file @
f319974a
...
...
@@ -135,6 +135,18 @@ func (b *IOBucket) Entryv() []IOBucketEntry {
return
ev
}
// ---- node-level iteration ----
// XXX
func
(
t
*
IOBTree
)
FirstBucket
()
*
IOBucket
{
return
t
.
firstbucket
}
// XXX
func
(
b
*
IOBucket
)
Next
()
*
IOBucket
{
return
b
.
next
}
// ---- point query ----
// Get searches IOBTree by key.
...
...
go/zodb/btree/zlobtree.go
View file @
f319974a
...
...
@@ -135,6 +135,18 @@ func (b *LOBucket) Entryv() []LOBucketEntry {
return
ev
}
// ---- node-level iteration ----
// XXX
func
(
t
*
LOBTree
)
FirstBucket
()
*
LOBucket
{
return
t
.
firstbucket
}
// XXX
func
(
b
*
LOBucket
)
Next
()
*
LOBucket
{
return
b
.
next
}
// ---- point query ----
// Get searches LOBTree by key.
...
...
go/zodb/persistent.go
View file @
f319974a
...
...
@@ -58,6 +58,7 @@ import (
type
Persistent
struct
{
// ZODB class of this object.
// XXX it could be deduced via typeTab[reflect.TypeOf(.instance)]
// XXX or better drop .instance and deduce it via casting to .zclass.typ
zclass
*
zclass
jar
*
Connection
...
...
go/zodb/zodb.go
View file @
f319974a
...
...
@@ -326,6 +326,9 @@ type IStorage interface {
IStorageDriver
Prefetcher
//Loader
//Iterator
//XXXNotifier() -> Notifier // dedicated notifier for every open?
}
// Prefetcher provides functionality to prefetch objects.
...
...
@@ -362,8 +365,8 @@ type IStorageDriver interface {
// The notifier represents invalidation channel (notify about changes
// made to DB not by us from outside). XXX
//
// To simplify drive
t
s, there must be only 1 logical user of
// storage-driver level notifier interface. C
c
ontrary IStorage allows
// To simplify drive
r
s, there must be only 1 logical user of
// storage-driver level notifier interface. Contrary IStorage allows
// for several users of notification channel. XXX ok?
//
// XXX -> nil, if driver does not support notifications?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment