Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
6c9c45ec
Commit
6c9c45ec
authored
Jul 13, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
073f3f17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
wcfs/btree.go
wcfs/btree.go
+11
-1
wcfs/zblk.go
wcfs/zblk.go
+7
-4
No files found.
wcfs/btree.go
View file @
6c9c45ec
...
...
@@ -14,6 +14,16 @@
package
main
// ZODB BTree handling
import
(
"context"
"lab.nexedi.com/kirr/neo/go/zodb"
)
// XXX -> template
type
KEY
int64
// ZBucket mimics ?OBucket from btree/py, with ? being any integer.
//
// py description:
...
...
@@ -32,7 +42,7 @@ type ZBucket struct {
}
// zBTreeItem mimics BTreeItem from btree/py.
type
zBTreeItem
{
type
zBTreeItem
struct
{
key
KEY
child
interface
{}
// ZBTree or ZBucket
}
...
...
wcfs/zblk.go
View file @
6c9c45ec
...
...
@@ -34,7 +34,9 @@ package main
import
(
//"lab.nexedi.com/kirr/neo/go/zodb"
"context"
"lab.nexedi.com/kirr/neo/go/zodb"
)
...
...
@@ -51,11 +53,11 @@ type ZBigFile struct {
pyobj
*
zodb
.
PyObject
blksize
int64
blktab
...
// LOBtree{} blk -> ZBlk*(blkdata)
blktab
*
ZBTree
// LOBtree{} blk -> ZBlk*(blkdata)
}
// module of Wendelin ZODB py objects
const
zwendelin
"wendelin.bigfile.file_zodb"
const
zwendelin
=
"wendelin.bigfile.file_zodb"
// loadZBigFile loads ZBigFile object from specified oid.
func
(
conn
*
zpyconn
)
loadZBigFile
(
ctx
context
.
Context
,
oid
zodb
.
Oid
)
(
*
ZBigFile
,
error
)
{
...
...
@@ -92,7 +94,8 @@ func (conn *zpyconn) loadZBigFile(ctx context.Context, oid zodb.Oid) (*ZBigFile,
taboid
,
err
=
decodeOID
(
t
[
0
])
// XXX err
if
t
[
1
]
!=
pickle
.
Class
{
Module
:
"BTrees.LOBTree"
,
Name
:
"LOBTree"
}
{
lobtreeClass
:=
pickle
.
Class
{
Module
:
"BTrees.LOBTree"
,
Name
:
"LOBTree"
}
if
t
[
1
]
!=
lobtreeClass
{
// XXX err
}
...
...
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