Questions tagged [rethinkdb-javascript]

JavaScript driver for RethinkDB

JavaScript driver for RethinkDB.

197 questions
1
vote
0 answers

how to get previous and next records for a specific record in rethinkdb

I am trying to get the surrounding records based on a given record id. For example I have this records: [{id: 1, name: 'a'},{id: 2, name: 'b'},{id: 3, name: 'c'},{id: 4, name: 'd'},{id: 5, name: 'e'},{id: 6, name: 'f'}] Let's say I got the record…
1
vote
0 answers

RethinkDB: Update multiple array entries using ReQL with high performance

Inside a single document of my table, I'm trying to achieve an update of several entries of an array with high performance. The array is around 20k entries, and I'm trying to merge 5k element changes. Here's an example : "entities": [ { …
Barklight
  • 33
  • 3
1
vote
1 answer

Embed RethinkDB into Electron (or NodeJS) app

I'm building an Electron app, specifically a crypto-currency wallet, so I need all the information stored locally on the user's machine and should not be synced to any server. I like RethinkDB and would like to use it, but I can't find a way to…
parliament
  • 21,544
  • 38
  • 148
  • 238
1
vote
1 answer

How to view document UUID in RethinkDB

I can view all the documents in a table with this: r.db('database').table('users') But how can I list the uuid for each document/user?
1
vote
1 answer

rethinkdb, How could I pluck the result by a value in particular "array index"?

sample data [ { "createdDate": 1508588333821, "data": { "image_extension": "png", "name": "Golden", "qty": 1, "remark": "#296-2", "status": "RETURN", "owner": [ { "name": "app1emaker", …
Atk
  • 149
  • 7
1
vote
1 answer

Accessing nested fields with Rethinkdb

So I have a result that looks like this "data": { "randomkeyllasdkjflk": { "name": "John Doe" }, "anotherrandomkeyadf": { "name": "Mona Lee" } } and I want to access the name. This is what I tried: r.table('users').filter(function…
kjames
  • 646
  • 1
  • 7
  • 20
1
vote
1 answer

rethinkdb 'or' filter still returning result even filter params is invalid

I'm trying to retrieve a result where row 'origin' is equal to 'person' or row 'type' is equal to 'human', below is what I've tried r.db('identitydb').table('connections').filter( ( { "origin" : "person" } ) | ( { "type" : "human" } ) ); yes it…
Juliver Galleto
  • 8,831
  • 27
  • 86
  • 164
1
vote
1 answer

dump real data from rethinkdb table

I'm using the recommended PHP client driver for rethinkdb and I created a database and also a table unto that database, now I'm trying to retrieved all the documents from the specific table from a newly created database by $conn =…
Juliver Galleto
  • 8,831
  • 27
  • 86
  • 164
1
vote
1 answer

rethinkdb delete nested property

I have following table structure - { "id": 1, "prop": { "1": { "bunch-of-stuffs": "foo" }, "2": { "bunch-of-stuffs": "bar" } } } I want to remove "prop" with the key "2" so that it looks like: { "id": 1, …
Bopsi
  • 2,090
  • 5
  • 36
  • 58
1
vote
1 answer

RethinkDB generate key-value pair from rows

I have following query which returns the number of request for each status - r.db.table("request").group("status").count() result - [ { "group": "ACCEPTED", "reduction": 1 }, { "group": "DECLINED", "reduction": 1 }, { …
Bopsi
  • 2,090
  • 5
  • 36
  • 58
1
vote
1 answer

Update a subdocument list object value in RethinkDB

{ "id": 1, "subdocuments": [ { "id": "A", "name": 1 }, { "id": "B", "name": 2 }, { "id": "C", "name": 3 } ] } How do…
Ben
  • 2,122
  • 2
  • 28
  • 48
1
vote
1 answer

RethinkDB indexing two fields with time

I have RethinkDB with data/table let say "news" with huge number of data row : [ { "author": "author1", "category_id": "business", "country": "id", "created_at": "Wed Aug 15 2018 09:26:52 GMT+07:00", "description":…
andri_sasuke
  • 211
  • 3
  • 10
1
vote
2 answers

rethinkdb: How to orderby two attributes and use between on one of those

we have a rethinkdb with tickets in it. They have a createdAt with a timestamp in milliseconds and a priority attribute. e.g. { createdAt: 12345, priority: 4, owner: "Bob", description: "test", status:…
1
vote
1 answer

Left join query with rethinkDB

I have two tables, users and authors. A user can be an author and if so, in the author document there is the id of the user. What I want to query are all the users that are NOT authors. The equivalent mySQL query would be something like select *…
Tres
  • 571
  • 1
  • 5
  • 19
1
vote
1 answer

match atleast one element of given array of data in RethinkDB

I have a data set like follows- [{ "name": "new name", "tags":[{ "addedBy": "userABCe3" , "addedDTS": Tue Jan 23 2018 13:02:37 GMT+00:00 , "tagId": "08d679c8-31b6-48d3-b8f3-3ab89f7bb821" },{ "addedBy": …
1 2
3
13 14