Dear ALL
I am a primary developer to couchbase mobile solution. Could help me finish
my first push filter.
My requirements are as the followings.
At mobile (lite) site ,each user creates and modifies his profile doc.
This profile doc will be pushed to sync gateway and only pulled to this
user's other signed-on devices filtered by username. So I need to figure
out the mobile site code and sync config.
This is my doc property:
var properties = new Dictionary<string, object>()
{
{"username", "jacob"}
{"type", "profiles"},
{"message", "jacob's Personal Data"}
{"created_at", DateTime.UtcNow.ToString("o")},
};
This is the code from Official website. But I don't know how to adapt it
to my requirement.
database.SetFilter("byOwner", (revision, filterParams) =>
{
var nameParam = filterParams["name"];
var owner = (string)revision.GetProperty("owner");
return (nameParam != null) && nameParam.Equals(owner);
});
var push = database.CreatePushReplication(url);
push.Filter = "byOwner";
push.FilterParams = new Dictionary<string, object> { {"name", "Waldo"} };
This is my sync config.json. How to code it's sync part ?
"profiles":{
"server":"http://172.16.84.217:8091",
"bucket": "profiles",
"users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } }
},
Thinks a lot.
Jacob L. @ Taiwan
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/d79e39e6-cf5d-41aa-b54a-6c95132e3c35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.