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
1395e9a5
Commit
1395e9a5
authored
Feb 13, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
355ffc66
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
t/neo/neo.go
t/neo/neo.go
+1
-8
t/neo/storage/filestorage.go
t/neo/storage/filestorage.go
+8
-8
t/neo/storage/fs1/b/fsbtree.go
t/neo/storage/fs1/b/fsbtree.go
+1
-1
t/neo/storage/fs1/b/gen-fsbtree
t/neo/storage/fs1/b/gen-fsbtree
+1
-1
t/neo/zodb/zodb.go
t/neo/zodb/zodb.go
+7
-0
No files found.
t/neo/neo.go
View file @
1395e9a5
...
...
@@ -13,15 +13,8 @@ const (
INVALID_TID
zodb
.
Tid
=
1
<<
64
-
1
// 0xffffffffffffffff
INVALID_OID
zodb
.
Oid
=
1
<<
64
-
1
// XXX vvv move to ZODB ?
ZERO_TID
zodb
.
Tid
=
0
// XXX or simply TID{} ?
TID0
zodb
.
Tid
=
ZERO_TID
// XXX ^^^ choose 1
// // XXX vvv move to ZODB ?
ZERO_OID
zodb
.
Oid
=
0
// XXX or simply OID{} ? // XXX -> OID0
// OID_LEN = 8
// TID_LEN = 8
MAX_TID
zodb
.
Tid
=
1
<<
63
-
1
// 0x7fffffffffffffff
// SQLite does not accept numbers above 2^63-1
// ZODB also defines maxtid to be max signed int64 since baee84a6 (Jun 7 2016)
TIDMAX
zodb
.
Tid
=
MAX_TID
// XXX ^^^ choose 1
)
t/neo/storage/filestorage.go
View file @
1395e9a5
...
...
@@ -5,7 +5,7 @@ package storage
import
(
"os"
.
"../
"
"../zodb
"
)
type
FileStorage
struct
{
...
...
@@ -13,12 +13,12 @@ type FileStorage struct {
}
// IStorage
var
_
IStorage
=
(
*
FileStorage
)(
nil
)
var
_
zodb
.
IStorage
=
(
*
FileStorage
)(
nil
)
type
TxnRecHead
struct
{
Tid
Tid
Tid
zodb
.
Tid
RecLenm8
uint64
Status
TxnStatus
Status
zodb
.
TxnStatus
//UserLen uint16
//DescriptionLen uint16
//ExtensionLen uint16
...
...
@@ -30,8 +30,8 @@ type TxnRecHead struct {
}
type
DataRec
struct
{
Oid
Oid
Tid
Tid
Oid
zodb
.
Oid
Tid
zodb
.
Tid
PrevDataRecPos
uint64
// previous-record file-position
TxnPos
uint64
// beginning of transaction record file position
// 2-bytes with zero values. (Was version length.)
...
...
@@ -70,8 +70,8 @@ func (f *FileStorage) Close() error {
return
nil
}
func
(
f
*
FileStorage
)
Iterate
(
start
,
stop
Tid
)
IStorageIterator
{
if
start
!=
TID0
||
stop
!=
TIDMAX
{
func
(
f
*
FileStorage
)
Iterate
(
start
,
stop
zodb
.
Tid
)
zodb
.
IStorageIterator
{
if
start
!=
zodb
.
Tid0
||
stop
!=
zodb
.
TidMax
{
panic
(
"TODO start/stop support"
)
}
...
...
t/neo/storage/fs1/b/fsbtree.go
View file @
1395e9a5
...
...
@@ -8,7 +8,7 @@
package
b
import
"zodb"
import
"
../../../
zodb"
import
(
"fmt"
...
...
t/neo/storage/fs1/b/gen-fsbtree
View file @
1395e9a5
...
...
@@ -14,7 +14,7 @@ echo "// KEY=$KEY VALUE=$VALUE" >>$out
echo
"// ---- 8< ----"
>>
$out
echo
>>
$out
make
-s
-C
$Bdir
generic |sed
\
-e
'/package b/a \\nimport "zodb"'
\
-e
'/package b/a \\nimport "
../../../
zodb"'
\
-e
"s/KEY/
$KEY
/g"
\
-e
"s/VALUE/
$VALUE
/g"
\
>>
$out
t/neo/zodb/zodb.go
View file @
1395e9a5
...
...
@@ -16,6 +16,13 @@ type Xid struct {
}
*/
const
(
Tid0
Tid
=
0
TidMax
Tid
=
1
<<
63
-
1
// 0x7fffffffffffffff
// ZODB defines maxtid to be max signed int64 since baee84a6 (Jun 7 2016)
// (XXX in neo: SQLite does not accept numbers above 2^63-1)
)
// ----------------------------------------
type
TxnStatus
byte
...
...
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