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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
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 @@
...
@@ -14,6 +14,16 @@
package
main
package
main
// ZODB BTree handling
// 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.
// ZBucket mimics ?OBucket from btree/py, with ? being any integer.
//
//
// py description:
// py description:
...
@@ -32,7 +42,7 @@ type ZBucket struct {
...
@@ -32,7 +42,7 @@ type ZBucket struct {
}
}
// zBTreeItem mimics BTreeItem from btree/py.
// zBTreeItem mimics BTreeItem from btree/py.
type
zBTreeItem
{
type
zBTreeItem
struct
{
key
KEY
key
KEY
child
interface
{}
// ZBTree or ZBucket
child
interface
{}
// ZBTree or ZBucket
}
}
...
...
wcfs/zblk.go
View file @
6c9c45ec
...
@@ -34,7 +34,9 @@ package main
...
@@ -34,7 +34,9 @@ package main
import
(
import
(
//"lab.nexedi.com/kirr/neo/go/zodb"
"context"
"lab.nexedi.com/kirr/neo/go/zodb"
)
)
...
@@ -51,11 +53,11 @@ type ZBigFile struct {
...
@@ -51,11 +53,11 @@ type ZBigFile struct {
pyobj
*
zodb
.
PyObject
pyobj
*
zodb
.
PyObject
blksize
int64
blksize
int64
blktab
...
// LOBtree{} blk -> ZBlk*(blkdata)
blktab
*
ZBTree
// LOBtree{} blk -> ZBlk*(blkdata)
}
}
// module of Wendelin ZODB py objects
// 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.
// loadZBigFile loads ZBigFile object from specified oid.
func
(
conn
*
zpyconn
)
loadZBigFile
(
ctx
context
.
Context
,
oid
zodb
.
Oid
)
(
*
ZBigFile
,
error
)
{
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,
...
@@ -92,7 +94,8 @@ func (conn *zpyconn) loadZBigFile(ctx context.Context, oid zodb.Oid) (*ZBigFile,
taboid
,
err
=
decodeOID
(
t
[
0
])
taboid
,
err
=
decodeOID
(
t
[
0
])
// XXX err
// 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
// 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