syncbase: Implementation and tests for Glob and Scan.
This CL includes a few smaller changes on the side:
- Implements row-level Get/Put/Delete, needed so we can
test the behavior of Scan. Includes tests for those
methods.
- Enables TestTableCreate and TestTableDelete (since Table
Create/Delete is a prereq for Scan). This required
extending the utilities in testutil/layer.go a bit, and
implementing Table.{Get,Set}Permissions for the "empty
prefix" case.
- Adds FullName() methods to all levels of hierarchy.
I ended up not needing these, but they seem worth keeping
nonetheless.
- Adds various util functions (along with tests for them)
and fixes a few small TODOs.
Change-Id: I55a4b0da9fb8f5551958d09c5ac8afd88dff2ebb
diff --git a/services/syncbase/server/dispatcher.go b/services/syncbase/server/dispatcher.go
index a6127cd..c676f97 100644
--- a/services/syncbase/server/dispatcher.go
+++ b/services/syncbase/server/dispatcher.go
@@ -8,8 +8,8 @@
"strings"
wire "v.io/syncbase/v23/services/syncbase"
+ pubutil "v.io/syncbase/v23/syncbase/util"
"v.io/syncbase/x/ref/services/syncbase/server/nosql"
- "v.io/syncbase/x/ref/services/syncbase/server/util"
"v.io/v23/rpc"
"v.io/v23/security"
"v.io/v23/verror"
@@ -37,7 +37,7 @@
// Validate all key atoms up front, so that we can avoid doing so in all our
// method implementations.
appName := parts[0]
- if !util.ValidKeyAtom(appName) {
+ if !pubutil.ValidName(appName) {
return nil, nil, wire.NewErrInvalidName(nil, suffix)
}