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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
18be70c7
Commit
18be70c7
authored
Mar 14, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e87b841b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
go/neo/storage/sqlite/sqlite.go
go/neo/storage/sqlite/sqlite.go
+10
-7
No files found.
go/neo/storage/sqlite/sqlite.go
View file @
18be70c7
...
@@ -301,13 +301,16 @@ func (b *Backend) LastOid(ctx context.Context) (zodb.Oid, error) {
...
@@ -301,13 +301,16 @@ func (b *Backend) LastOid(ctx context.Context) (zodb.Oid, error) {
return
lastOid
,
nil
return
lastOid
,
nil
}
}
func
(
b
*
Backend
)
Load
(
ctx
context
.
Context
,
xid
zodb
.
Xid
)
(
_
*
proto
.
AnswerObject
,
err
error
)
{
func
(
b
*
Backend
)
Load
(
ctx
context
.
Context
,
xid
zodb
.
Xid
)
(
*
proto
.
AnswerObject
,
error
)
{
defer
func
()
{
// XXX instead of defer
if
err
!=
nil
{
obj
,
err
:=
b
.
load
(
xid
)
err
=
&
zodb
.
OpError
{
URL
:
b
.
url
,
Op
:
"load"
,
Err
:
err
}
if
err
!=
nil
{
}
err
=
&
zodb
.
OpError
{
URL
:
b
.
url
,
Op
:
"load"
,
Err
:
err
}
}()
}
return
obj
,
err
}
func
(
b
*
Backend
)
load
(
xid
zodb
.
Xid
)
(
*
proto
.
AnswerObject
,
error
)
{
obj
:=
&
proto
.
AnswerObject
{
Oid
:
xid
.
Oid
,
DataSerial
:
0
}
obj
:=
&
proto
.
AnswerObject
{
Oid
:
xid
.
Oid
,
DataSerial
:
0
}
// TODO reenable, but XXX we have to use Query, not QueryRow for RawBytes support
// TODO reenable, but XXX we have to use Query, not QueryRow for RawBytes support
//var data sql.RawBytes
//var data sql.RawBytes
...
@@ -330,7 +333,7 @@ func (b *Backend) Load(ctx context.Context, xid zodb.Xid) (_ *proto.AnswerObject
...
@@ -330,7 +333,7 @@ func (b *Backend) Load(ctx context.Context, xid zodb.Xid) (_ *proto.AnswerObject
// XXX use conn for several query1 (see below) without intermediate returns to pool?
// XXX use conn for several query1 (see below) without intermediate returns to pool?
err
=
b
.
query1
(
err
:
=
b
.
query1
(
"SELECT tid, compression, data.hash, value, value_tid"
+
"SELECT tid, compression, data.hash, value, value_tid"
+
" FROM obj LEFT JOIN data ON obj.data_id = data.id"
+
" FROM obj LEFT JOIN data ON obj.data_id = data.id"
+
" WHERE partition=? AND oid=? AND tid<=?"
+
" WHERE partition=? AND oid=? AND tid<=?"
+
...
...
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