Questions tagged [rethinkdb-javascript]

JavaScript driver for RethinkDB

JavaScript driver for RethinkDB.

197 questions
1
vote
1 answer

RethinkDB REQL Query to find number occurrences of distinct values in an array

I have a table like this in rethinkDB. [{ "Id": [ 12, 13 ], "group": "79", "go_Id": [] }, { "Id": [ 12, 12, 12, 14 14 ], "group": "91", "go_Id": [ 16, …
1
vote
1 answer

How to setup rethinkdb proxy server

we have two client machines, how do we connect both of them using proxy server? As you said earlier: "To start a RethinkDB proxy on the client: rethinkdb proxy -j -j ..." only of the clients can connect in this way, since the ports will already be…
hellodk
  • 316
  • 4
  • 11
1
vote
1 answer

Multidatacenter Replication with Rethinkdb

I have two servers in two different geographic locations (alfa1 and alfa2). r.tableCreate('dados', {shards:1, replicas:{alfa1:1, alfa2:1}, primaryReplicaTag:'alfa1'}) I need to be able to write for both servers, but when I try to shutdown alfa1, and…
1
vote
1 answer

Rethink DB Cross Cluster Replication

I have 3 different pool of clients in 3 different geographical locations. I need configure Rethinkdb with 3 different clusters and replicate data between the (insert, update and deletes). I do not want to use shard, only replication. I didn't found…
1
vote
1 answer

Self join in rethinkdb

I have a table such as the following (implementing tree structure) in rethinkdb: id label parent 1 Node 1 2 Node 2 1 3 Node 3 1 4 Node 4 2 I want to write a query that gives me the following output: id label …
0
votes
1 answer

How to connect rethinkdb in Openshift using rethinkdbdash

Could someone help to connect to rethinkdb in openshift using rethinkdbdash I have deployed rethinkdb in openshift & create 3 clusterIP services 1.8080 - admin 2.29015 - intracluster communicated 3.28015 - client connection I have created a route…
0
votes
1 answer

Get inserted document directly in RethinkDB

I have been starting with RethinkDB. I have gone through the documentation. I have a simple use case of returning the inserted document when a POST call is made. This is something I have done so far. router.post('/user', jsonParser, async (req:…
chandan_kr_jha
  • 557
  • 4
  • 12
0
votes
1 answer

RethinkDB: Filter documents based on filtered field

I have a table of documents (entity) with a field that is a list of objects: { "field": { "content": [ { "url": "https://www.google.com" }, { "url": "" } ] }, { "field": { "content": [ …
ebbishop
  • 1,833
  • 2
  • 20
  • 45
0
votes
1 answer

How can I filter if any value of an array is contained in another array in rethinkdb/reql?

I want to find any user who is member of a group I can manage (using the webinterface/javascript): Users: { "id": 1 "member_in_groups": ["all", "de-south"] }, { "id": 2 "member_in_groups": ["all", "de-north"] } I…
anli
  • 515
  • 6
  • 9
0
votes
1 answer

Cannot Grab Data From Primary Key In RethinkDB

I'm attempting to grab data in RethinkDB by the primary key. However, my code cannot find the data. I'm using the RethinkDBDash driver to grab the data and such, I defined Rethink as client.db. The ID is a sliced array from data I'm grabbing from an…
Facto Man
  • 15
  • 1
  • 4
0
votes
0 answers

Compare index function with JavaScript function?

Is it possible to compare the function of an existing index with an ordinary native function in JavaScript? For instance, I might create an index with the following code: r.table('Table').indexCreate('index', document =>…
Chris Talman
  • 1,059
  • 2
  • 14
  • 24
0
votes
1 answer

rethinkdb web interface error looking for other database even a database name has been specified

I'm trying to join two tables by parent id to child row name 'users_id' from the specific database via rethinkdb web interface, below is what I've tried r.db('cn_chat').table('chat_que').eqJoin('users_id', r.table('connections')); below is the…
Juliver Galleto
  • 8,831
  • 27
  • 86
  • 164
0
votes
1 answer

Unable insert data to table in RethinkDB database

I got the error: ReqlLogicError: Expected type TABLE but found SINGLE_SELECTION with the ReQL await client.db.table('userData').get('249923459738632194').insert({money: money}).run();. Why does that happen, how can I fix it? The table…
Facto Man
  • 15
  • 1
  • 4
0
votes
1 answer

Ignoring diacritics in orderBy in RethinkDB?

The query r.table('categories').orderBy('name') returns my documents in the following order: Cerveja Refrigerante Suco Água The correct order would take "Água" first: Água Cerveja Refrigerante Suco How can I make orderBy ignore the diacritics?
gustavopch
  • 796
  • 9
  • 16
0
votes
1 answer

Displaying data for each day of the week with rethinkDB

Displaying data for each day of the week with rethinkDB r.row('time_create').dayOfWeek() [ { detail: "no", order_id: "03", status: "Delivery", time_create: "2018-09-23T11:06:30.164Z", time_success: "2018-09-23T11:06:30.164Z" } ] To be like this { …