TBR: todos: syncbase: update apps to use new SyncGroupSpec API
MultiPart: 5/6
Change-Id: I861fe42dce5e19d7d66e6154ff214708cf3c77cb
diff --git a/browser/syncbase_dispatcher.js b/browser/syncbase_dispatcher.js
index ded0849..7772409 100644
--- a/browser/syncbase_dispatcher.js
+++ b/browser/syncbase_dispatcher.js
@@ -186,7 +186,7 @@
var listId = list._id;
_.forEach(sgs, function(sg) {
console.assert(sg.spec.prefixes.length === 1);
- if (listId === sg.spec.prefixes[0].slice(3)) { // drop 'tb:' prefix
+ if (listId === sg.spec.prefixes[0].rowPrefix) {
list.sg = sg;
}
});
@@ -358,8 +358,10 @@
['Resolve', {'in': blessings}],
['Debug', {'in': blessings}]
]),
- // TODO(sadovsky): Update this once we switch to {table, prefix} tuples.
- prefixes: ['tb:' + this.sgNameToListId(sgName)],
+ prefixes: [new nosql.SyncGroupPrefix({
+ tableName: 'tb',
+ rowPrefix: this.sgNameToListId(sgName)
+ })],
mountTables: [vanadium.naming.join(mtName, 'rendezvous')]
});
sg.create(ctx, spec, MEMBER_INFO, this.maybeEmit_(cb));