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
71e5833a
Commit
71e5833a
authored
Jul 03, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
26f53db1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
7 deletions
+38
-7
go/zodb/py/pydata-gen-testdata
go/zodb/py/pydata-gen-testdata
+2
-2
go/zodb/pydata.go
go/zodb/pydata.go
+1
-0
go/zodb/pydata_test.go
go/zodb/pydata_test.go
+6
-0
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+1
-1
go/zodb/storage/zeo/zrpc.go
go/zodb/storage/zeo/zrpc.go
+1
-1
go/zodb/time.go
go/zodb/time.go
+1
-1
go/zodb/zodb.go
go/zodb/zodb.go
+26
-2
No files found.
go/zodb/py/pydata-gen-testdata
View file @
71e5833a
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
# Copyright (C) 2017
-2018
Nexedi SA and Contributors.
#
Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
...
...
go/zodb/pydata.go
View file @
71e5833a
...
...
@@ -106,6 +106,7 @@ func normPyClass(xklass interface{}) (pickle.Class, error) {
if
len
(
t
)
!=
2
{
return
pickle
.
Class
{},
errInvalidPyClass
}
// XXX newargs is ignored (zodb/py uses it only for persistent classes)
xklass
=
t
[
0
]
if
t
,
ok
:=
xklass
.
(
pickle
.
Tuple
);
ok
{
// t = (modname, classname)
...
...
go/zodb/pydata_test.go
View file @
71e5833a
...
...
@@ -30,6 +30,8 @@ type _PyDataClassName_TestEntry struct {
className
string
}
// XXX + test with zodbpickle.binary (see 12ee41c4 in ZODB)
func
TestPyClassName
(
t
*
testing
.
T
)
{
for
_
,
tt
:=
range
_PyData_ClassName_Testv
{
className
:=
PyData
(
tt
.
pydata
)
.
ClassName
()
...
...
@@ -39,3 +41,7 @@ func TestPyClassName(t *testing.T) {
}
}
}
func
TestPyDecode
(
t
*
testing
.
T
)
{
// XXX
}
go/zodb/storage/zeo/zeo.go
View file @
71e5833a
...
...
@@ -234,7 +234,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
call
,
ok
:=
targ
[
1
]
.
(
pickle
.
Call
)
if
!
ok
{
// not a call - the best we can do is to guess
return
r
.
ereplyf
(
"excep4: %s: inst %#v; expect call"
,
exc
,
targ
[
1
:
])
return
r
.
ereplyf
(
"excep
t
4: %s: inst %#v; expect call"
,
exc
,
targ
[
1
:
])
}
exc
=
call
.
Callable
.
Module
+
"."
+
call
.
Callable
.
Name
...
...
go/zodb/storage/zeo/zrpc.go
View file @
71e5833a
...
...
@@ -271,7 +271,7 @@ func (zl *zLink) _call(ctx context.Context, method string, argv ...interface{})
// ---- raw IO ----
// pktBuf is buffer
for preparing outgoing packet
.
// pktBuf is buffer
with packet data
.
//
// alloc via allocPkb and free via pkb.Free.
// similar to skb in Linux.
...
...
go/zodb/time.go
View file @
71e5833a
...
...
@@ -41,7 +41,7 @@ func (t TimeStamp) XFmtString(b []byte) []byte {
}
// Time converts tid to time
// Time converts tid to time
.
func
(
tid
Tid
)
Time
()
TimeStamp
{
// the same as _parseRaw in TimeStamp/py
// https://github.com/zopefoundation/persistent/blob/aba23595/persistent/timestamp.py#L75
...
...
go/zodb/zodb.go
View file @
71e5833a
...
...
@@ -23,6 +23,30 @@
// Data model this package provides is partly based on ZODB/py
// (https://github.com/zopefoundation/ZODB) to maintain compatibility in
// between Python and Go implementations.
//
// Data model
//
// Tid, Oid, ? Xid.
//
//
// Operation
//
// Load(oid, at), iteration.
// OpenStorage
//
//
// Python data
//
// PyData, PyObject, ...
//
//
// Storage drivers
//
// IStorageDriver, RegisterDriver + wks (FileStorage, ZEO and NEO).
//
// ----
//
// XXX link to zodbtools / `zodb` cmd?
package
zodb
import
(
...
...
@@ -106,7 +130,7 @@ type DataInfo struct {
DataTidHint
Tid
}
// TxnStatus represents status of a transaction
// TxnStatus represents status of a transaction
.
type
TxnStatus
byte
const
(
...
...
@@ -118,7 +142,7 @@ const (
// ---- interfaces ----
// NoObjectError is the error which tells that there is no such object in the database at all
// NoObjectError is the error which tells that there is no such object in the database at all
.
type
NoObjectError
struct
{
Oid
Oid
}
...
...
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