Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing documents #4

Closed
Maarten-p opened this issue Aug 23, 2015 · 1 comment
Closed

Replacing documents #4

Maarten-p opened this issue Aug 23, 2015 · 1 comment

Comments

@Maarten-p
Copy link

Is the replace() command already implemented? And what is the type of the JSON object that needs to be used as input? I tried a normal string but that didn't work. It would be nice if you could put up an example where you add something to the database.

@AtnNn
Copy link
Owner

AtnNn commented Aug 23, 2015

The replace command is implemented and can be used just like in Python.

There are many ways of constructing an object that can be passed to replace:

  • The object command: R::object("id", 2, "a", 5)
  • The json command: R::json("{\"id\":2,\"a\":5}")
  • as a literal: map<string, double>{{"id", 2}, {"a", 5}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants