Questions tagged [rethinkdb-javascript]

JavaScript driver for RethinkDB

JavaScript driver for RethinkDB.

197 questions
8
votes
1 answer

Time pseudotype instead of ISO8601 when using group operator

I'm getting started with RethinkDB and I'm having some trouble understanding what's going on with some queries I'm running. The problem is querying objects with date time types from a NodeJS app (using the rethinkdbdash driver) which exposes a JSON…
Marc
  • 213
  • 2
  • 12
6
votes
2 answers

rethinkdb | nested vs chained queries, any difference?

is there any difference between chained: r.db('catbox').table("bw_mobile").filter( r.row("value")("appVersion")("major").le(2) ).filter( r.row("value")("appVersion")("minor").le(2) ).filter( …
lito
  • 3,105
  • 11
  • 43
  • 71
5
votes
0 answers

How to do a Rethink bulk 'upsert' while only setting 'createdDT' on insert (first update)?

Is it possible to do an bulk upsert that behaves such that a particular field (e.g.: createdDT) is only set on first upsert, but not during later upserts of the same record? EDIT Got a crude version working which does a server-side executed loop,…
Geert-Jan
  • 18,623
  • 16
  • 75
  • 137
5
votes
1 answer

RethinkDB connection "must be open" but never gets closed

I'm using RethinkDB together with hapi.js in Node.js. My main application passes an open connection to a hapi.js plugin. Using the connection inside the main-script works fine, but running something inside the plugin throws the following…
tobi
  • 1,924
  • 2
  • 20
  • 25
4
votes
1 answer

Rethinkdb predicate function 'contains' for multiple values not working

I have a data schema that looks like this: { "datetime": "1453845345493", "someIds": ["id2000-4", "id1000-34"] } Where the array someIds can contain many different values. Filtering based on one id using the following query works without issue…
Brideau
  • 4,564
  • 4
  • 24
  • 33
4
votes
2 answers

How do I unsubscribe or change a changefeed in rethinkdb?

Is there a way to unsubscribe or change an existing changefeed observer in rethinkdb? Setting the return value of the changes() function to null doesn't seem to do anything, is there a unsubscribe() function? What I'd ideally like to do is change…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
3
votes
1 answer

RethinkDB: Javascript - How to deleted nested objects

I'm having a rather large amount of difficulty with trying to remove nested objects from my table, without accidentally deleting all my data in the process (happened three times now, thank god I made copies). My Object: { "value1": thing, …
Laz
  • 63
  • 1
  • 5
3
votes
1 answer

Allow user to only access specific data in a RethinkDB table

I am implementing an application (HTML and AngularJS) that uses RethinkDB to store data. Basically, anyone can get the RethinkDB connection credentials from the .js file. So how can I allow the user to only get their own data? In the RethinkDB…
Nabeel
  • 557
  • 4
  • 15
3
votes
1 answer

RethinkDb OrderBy Before Filter, Performance

The data table is the biggest table in my db. I would like to query the db and then order it by the entries timestamps. Common sense would be to filter first and then manipulate the data. queryA =…
Andi Giga
  • 3,744
  • 9
  • 38
  • 68
3
votes
1 answer

Rethinkdb execute multiple avg in one query

I have a review table with multiple number columns. I would like to count he avg of all columns in one query. So if the table looks like: { foo : 2, bar : 5, foobar : 10 }, { foo : 4, bar : 3, foobar : 12 } then i would like to…
John
  • 43
  • 4
3
votes
2 answers

How to prevent RethinkDB from creating test database

When you launch a rethinkdb instance, it will automatically create a database called 'test'. When you run multiple instances and cluster them using rethinkdb proxy this leads to the issue: Database name conflict: test is the name of more than one…
nardeas
  • 633
  • 6
  • 14
3
votes
1 answer

RethinkDB update transaction performance

I'm a newbie here and also newbie for rethinkdb. First of all, I'm sorry for my bad english and I have a questions about update transaction performance of rethinkdb. Im using Nodejs with Native JS API of rethinkdb. I need to handle with read file…
Pikachu
  • 31
  • 3
3
votes
1 answer

Should I explicitly close RethinkDB connections?

I'm a little hazy on how connections in RethinkDB work. I'm opening a new connection every time I execute queries without closing them once the queries finish. Is this a good practice? Or should I be explicitly closing connections once queries are…
wle8300.com
  • 2,588
  • 1
  • 23
  • 29
3
votes
2 answers

Create or append to an array in a rethinkdb document

How should we append an item to an array if the array exists, or create an array and insert to it. I tried the merge command but that doesn't allow merging arrays, only replacing…
anandaravindan
  • 2,401
  • 6
  • 25
  • 35
3
votes
1 answer

Chain filter conditions dynamically

How to chain multiple conditions in RethinkDB? This is what I got right now and what works if I only pass live or sports as a parameter. As soon as I pass the live and sports parameter, sports obviously always overwrites the filter variable and the…
Chris
  • 4,255
  • 7
  • 42
  • 83
1
2 3
13 14