Reputation: 27
hello i have this in the data explorer on the webinterface but i have a error
code:
r.db("discordboatsclubv1").table("users").get("355995885085392896").insert({
"admin":"true"
})
error:
e: Expected type TABLE but found SINGLE_SELECTION: { "badges": [], "createdAt": 1573923739827, "discordAT": "94GXMoWf1Anhn5neKsV2o4nWS9HVFS", "discordRT": "akv9HS1nY9dqP9dfXou8jpNowv2Gw5", "id": "355995885085392896" } in: r.db("discordboatsclubv1").table("users").get("355995885085392896").insert({"admin": "true"}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Upvotes: 2
Views: 298
Reputation: 3040
When you call the .get
you are accessing to a single document with that id. From there you can only insert additional element with an update statement:
r.db("discordboatsclubv1").table("users").get("355995885085392896").update({
"admin":"true"
})
Upvotes: 2