Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
a3127b62
Commit
a3127b62
authored
Feb 20, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ec815f60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
t/neo/proto_test.go
t/neo/proto_test.go
+5
-3
t/neo/zodb/zodb.go
t/neo/zodb/zodb.go
+19
-5
No files found.
t/neo/proto_test.go
View file @
a3127b62
...
...
@@ -23,6 +23,8 @@ import (
"strings"
"testing"
"unsafe"
"./zodb"
)
// decode string as hex; panic on error
...
...
@@ -192,9 +194,9 @@ func TestPktMarshal(t *testing.T) {
// map[Oid]struct {Tid,Tid,bool}
{
&
AnswerObjectUndoSerial
{
ObjectTIDDict
:
map
[
Oid
]
struct
{
CurrentSerial
Tid
UndoSerial
Tid
ObjectTIDDict
:
map
[
zodb
.
Oid
]
struct
{
CurrentSerial
zodb
.
Tid
UndoSerial
zodb
.
Tid
IsCurrent
bool
}
{
1
:
{
1
,
0
,
false
},
...
...
t/neo/zodb/zodb.go
View file @
a3127b62
...
...
@@ -2,6 +2,8 @@
// Package zodb defines types and interfaces used in ZODB databases
// XXX partly based on ZODB/py
package
zodb
// ZODB types
...
...
@@ -27,8 +29,15 @@ const (
// ----------------------------------------
// TxnStatus represents status of a transaction
type
TxnStatus
byte
const
(
TxnComplete
TxnStatus
=
' '
// completed transaction that hasn't been packed
TxnPacked
=
'p'
// completed transaction that has been packed
TxnInprogress
=
'c'
// checkpoint -- a transaction in progress; it's been thru vote() but not finish()
)
// TODO Tid.String(), Oid.String() +verbose, scanning (?)
// Information about single storage transaction
...
...
@@ -59,13 +68,18 @@ type StorageRecordInformation struct {
type
IStorage
interface
{
Close
()
error
// TODO:
// Name()
// Name returns storage name
Name
()
string
// History(oid, size=1)
// LastTid()
// LoadBefore(oid Oid, beforeTid Tid) (data []bytes, tid Tid, err error)
// LoadSerial(oid Oid, serial Tid) (data []bytes, err error)
// LastTid returns the id of the last committed transaction.
// if not transactions have been committed yet, LastTid returns Tid zero value
// XXX ^^^ ok ?
LastTid
()
Tid
// XXX -> Tid, ok ?
LoadBefore
(
oid
Oid
,
beforeTid
Tid
)
(
data
[]
byte
,
tid
Tid
,
err
error
)
LoadSerial
(
oid
Oid
,
serial
Tid
)
(
data
[]
byte
,
err
error
)
// PrefetchBefore(oidv []Oid, beforeTid Tid) error (?)
// Store(oid Oid, serial Tid, data []byte, txn ITransaction) error
...
...
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