Questions tagged [rethinkdb-javascript]

JavaScript driver for RethinkDB

JavaScript driver for RethinkDB.

197 questions
0
votes
1 answer

How can I use RethinkDB with EmberJS framework?

I'm new to EmberJS and RethinkDB. I'm using changefeeds of rethinkDB for user specific data to create web push notification application with emberjs. I have created the same with nodejs and socket.io. it is working fine. I want to convert it to…
0
votes
1 answer

Rethinkdb replace with getAll

I have a table with users, each row looks like this: { id: , email: } Where id is the primary key and there's a secondary index for email. I want to add a user only if no other use with the same email exists. Normally…
Juan Campa
  • 1,181
  • 2
  • 14
  • 20
0
votes
1 answer

Properly chaining RethinkDB table and object creation commands with rethinkdbdash

I am processing a stream of text data where I don't know ahead of time what the distribution of its values are, but I know each one looks like this: { "datetime": "1986-11-03T08:30:00-07:00", "word": "wordA", "value": "someValue" } I'm trying…
Brideau
  • 4,564
  • 4
  • 24
  • 33
0
votes
2 answers

rethinkdb eqJoin matching

Hi I'm using javascript with rethinkdb, and I'm trying to figure out how to use eqJoin when the id of the target is not on the maintable but on the second table. The examples on the website shows this. first table /players [{name: 'anna',…
Stellan
  • 183
  • 11
0
votes
1 answer

Filter for hits on two arrays in RethinkDB ReQL?

Given the table checkpointAttempts, with schema: { id: primary_key, userId: secondary_key & index, checkpointId: secondary_key & index } I'm trying to find all of the checkpointAttempts matching both an array of userIds and an array of…
gristow
  • 45
  • 2
  • 7
0
votes
1 answer

Allowing `undefined` values in array in `thinky` schema validation

The schema looks like this: import Game from './Game' import {io, thinky} from '../' const type = thinky.type export const playerSchema = { id: type.string(), createdAt: type.date().default(thinky.r.now()), modifiedAt: type.date(), …
demux
  • 4,544
  • 2
  • 32
  • 56
0
votes
1 answer

rethinkdb update nested array

I have the following structure: { "id": "3065e957-56e9-4084-8e32-bb4de8d9265a", "id_service": "570b4abe-70fe-44e0-845e-74eb60081fc4", "tweets": [ { "created_at": "2013-10-13 00:58:11", "id_tweet":…
Gabriel M
  • 3
  • 2
0
votes
1 answer

RethinkDB: does reduce iterate all grouped data?

I thought I had it with rethinkdb :) but now I'm a bit confused - for this query, counting grouped data: groupedRql.count() I'm getting the expected results (numbers): [{"group": "a", "reduction": 41}, {"group": "b", "reduction": 39}...] all…
Kludge
  • 2,653
  • 4
  • 20
  • 42
0
votes
1 answer

Multiple Queries same route endpoint in node express

I'm trying to make 2 queries for 2 different tables inside the same endpoint. I can do this for simple get queries, but not for more complex update/replace queries. Also I'm not sure how to properly handle errors in this case. Below is what I…
João Lima
  • 430
  • 1
  • 6
  • 11
0
votes
1 answer

Rethinkdb Geospatial: getIntersecting

I have a query that searches through a list of polygons and checks to see if any of a list of points is included. My problem is I need to some how insert a indicator of which polygon the point was found in. Here is my query: function…
0
votes
1 answer

Maximizing RethinkDB efficiency by data structure

I'm loving RethinkDB! I have a quick question in regards to efficiency of fetching data. I'm building a CRUD model for managing people's contacts. Making one document containing an array of all the userID's contacts and access it by the primary…
0
votes
1 answer

append to nested array in rethinkdb

I have a data structure as follows: { id: blah-blah-blah, settings: { stuff: {}, other_stuff: {}, provided: [] }, .... } I need to update various items with dynamically generated…
BarthesSimpson
  • 926
  • 8
  • 21
0
votes
2 answers

Rethinkdb insert query results into a table

I'm trying to insert the results of a query from one table into another table. However, when I attempt to run the query I am receiving an error. { "deleted": 0 , "errors": 1 , "first_error": "Expected type OBJECT but found ARRAY." , …
scull7
  • 105
  • 1
  • 5
0
votes
1 answer

Isolate customers in RethinkDB database

I am looking for a strategy to implement a shared RethinkDB cluster between customers with data isolation. I would like to have multiple customers that would use a shared RethinkDB cluster, but I'm not sure about how to enforce the separation of the…
nha
  • 17,623
  • 13
  • 87
  • 133
0
votes
1 answer

Get an array of from a squashed changefeed event with RethinkDB

I have a simple database in which I insert messages. I use the the change() method with the squash option to get the new messages every 10 seconds: r.table('wall_posts').orderBy({ index: r.asc('date') }).limit(100).changes({ squash: 10 …
1 2 3
13
14