Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-datastore
Commits
d46c7c6f
Commit
d46c7c6f
authored
Jul 17, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keytransform datastore doesnt need to implement batching
parent
d79a7af4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
keytransform/interface.go
keytransform/interface.go
+0
-2
namespace/namespace.go
namespace/namespace.go
+8
-0
No files found.
keytransform/interface.go
View file @
d46c7c6f
...
...
@@ -16,8 +16,6 @@ type KeyTransform interface {
type
Datastore
interface
{
ds
.
Shim
KeyTransform
Batch
()
(
ds
.
Batch
,
error
)
}
// Wrap wraps a given datastore with a KeyTransform function.
...
...
namespace/namespace.go
View file @
d46c7c6f
...
...
@@ -81,3 +81,11 @@ func (d *datastore) Query(q dsq.Query) (dsq.Results, error) {
return
dsq
.
DerivedResults
(
qr
,
ch
),
nil
}
func
(
d
*
datastore
)
Batch
()
(
ds
.
Batch
,
error
)
{
if
bds
,
ok
:=
d
.
Datastore
.
(
ds
.
Batching
);
ok
{
return
bds
.
Batch
()
}
return
nil
,
ds
.
ErrBatchUnsupported
}
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