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
8232e3b8
Commit
8232e3b8
authored
Aug 08, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
edc0f47c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
go/zodb/persistent.go
go/zodb/persistent.go
+2
-2
go/zodb/persistent_api.go
go/zodb/persistent_api.go
+6
-6
No files found.
go/zodb/persistent.go
View file @
8232e3b8
...
...
@@ -216,7 +216,7 @@ func (obj *Persistent) PDeactivate() {
}
}
obj
.
serial
=
0
obj
.
serial
=
InvalidTid
obj
.
istate
()
.
DropState
()
obj
.
state
=
GHOST
obj
.
loading
=
nil
...
...
@@ -232,7 +232,7 @@ func (obj *Persistent) PInvalidate() {
panic
(
"invalidate: refcnt != 0"
)
}
obj
.
serial
=
0
obj
.
serial
=
InvalidTid
obj
.
istate
()
.
DropState
()
obj
.
state
=
GHOST
obj
.
loading
=
nil
...
...
go/zodb/persistent_api.go
View file @
8232e3b8
...
...
@@ -30,11 +30,11 @@ import (
//
// Use Persistent as the base for application-level types that need to provide persistency.
type
IPersistent
interface
{
PJar
()
*
Connection
// Connection this in-RAM object is part of.
POid
()
Oid
// object ID in the database.
PJar
()
*
Connection
// Connection this in-RAM object is part of.
POid
()
Oid
// object ID in the database.
// object serial in the database as of particular Connection (PJar) view.
//
0 (invalid tid)
if not yet loaded.
//
InvalidTid
if not yet loaded.
PSerial
()
Tid
...
...
@@ -103,8 +103,8 @@ type IPersistent interface {
type
ObjectState
int
const
(
GHOST
ObjectState
=
-
1
// object data is not yet loaded from the database
UPTODATE
ObjectState
=
0
// object is live and in-RAM data is the same as in database
CHANGED
ObjectState
=
1
// object is live and in-RAM data was changed
GHOST
ObjectState
=
-
1
// object data is not yet loaded from the database
UPTODATE
ObjectState
=
0
// object is live and in-RAM data is the same as in database
CHANGED
ObjectState
=
1
// object is live and in-RAM data was changed
// no STICKY - we pin objects in RAM with PActivate
)
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