Questions tagged [rethinkdb-javascript]

JavaScript driver for RethinkDB

JavaScript driver for RethinkDB.

197 questions
1
vote
0 answers

Optimize query with filter and orderBy

I have a table Items with ~20k records. I need to be able to filter on multiple tags (or) and maintain order of the items, sorted by sticky then created-date. For example I may fetch items tagged with tagA, tagB or tagC etc. If an item is sticky…
nifty
  • 45
  • 4
1
vote
2 answers

Proper Upsert (Atomic Update Counter Field or Insert Document) with RethinkDB

After looking at some SO questions and issues on RethinkDB github, I failed to come to a clear conclusion if atomic Upsert is possible? Essentially I would like to perform the same operation as ZINCRBY using Redis. If member does not exist in the…
Astronaut
  • 6,691
  • 18
  • 61
  • 99
1
vote
0 answers

How can I create UML and ER diagram from existing rethinkDB ?

I have lots of tables in database in rethinkDB. so I want document whole system with ER and UML diagram. Is there any way to generate ER or UML diagram from existing database ? Or any thing which helps me to create easily ?
1
vote
1 answer

starting rethinkdb in commandline doesn't coming back to shell prompt

I need to change the server_name of a running rethinkdb instance. I have stopped the server and update the /etc/rethinkdb/instances.d/default.conf file and then removed the metadata & rethinkdb_data from /var/lib/rethinkdb/default/data location. …
1
vote
2 answers

rethinkdb - hasFields to find all documents with multiple multiple missing conditions

I found an answer for finding all documents in a table with missing fields in this SO thread RethinkDB - Find documents with missing field, however I want to filter according to a missing field AND a certain value in a different field. I want to…
Andrew
  • 737
  • 2
  • 8
  • 24
1
vote
0 answers

RethinkDB: JOIN with dynamic property/field names

The solution to this RethinkDB query has eluded me for days now. Does not help that I'm a t-SQL developer... Given a document structure like this: var messages = { "Category A" : { catName: 'Category A', …
MojoDBA
  • 118
  • 7
1
vote
1 answer

Use result from another query in filter in RethinkDB/ReQL

Any idea how can I select the Agent IDs inside the clients filter? This is what I have now and it works, but I do not like that first we are waiting for the Agents to be selected and then we do another trip to the database to select the clients. Is…
Ivo Sabev
  • 5,230
  • 1
  • 26
  • 38
1
vote
1 answer

Limit server resources for a query in RethinkDB

I want to run a heavy query and somehow limit the resources it uses, so it never affects other client's queries. Is it possible?
sergiodebcn
  • 310
  • 1
  • 12
1
vote
1 answer

rethinkdb nodejs container in cluster environment

rethinkdb and nodejs+express app fit well in container for cluster environment?? The situation is below in a docker container 1. Running rethinkdb and nodjs+express app in one container 2. During the boot up of nodejs app it checks if there is a…
Know Nothing
  • 1,121
  • 2
  • 10
  • 21
1
vote
1 answer

RethinkDB - Filtering and matching at the same time

Hello I'm new to RethinkDB and javascript in general. I was wondering what the best way is to perform a query with multiple filters including a regex match. e.g. merge these two queries into one with the goal of finding all messages in a given…
millejo3
  • 13
  • 3
1
vote
2 answers

Join tables with concatMap

r.table('users').hasFields('name').concatMap(function(user) { return r.table("bets").getAll( user('userID'), { index: "userID" } ).map(function(bet) { return { left: user, right: bet } }) }) Goal: Read all users…
Chris
  • 4,255
  • 7
  • 42
  • 83
1
vote
1 answer

rethinkdb join: Cannot reduce over an empty stream

I have two simple tables: Users Table: { "activated": true , "created": Wed Jun 22 2016 15:22:32 GMT+00:00 , "email": email@email.com, » "id": "5071f620-576a-49c0-ae84-e9f32db2a034" , "roles": [ "Admin" ] , "sso": "123456789" } Roles…
ApathyBear
  • 9,057
  • 14
  • 56
  • 90
1
vote
1 answer

Updating/merging a document through nested array

Context: On the client, a field is modified and that change is propagated to the server as a keypath-value pair. I start out with a keypath, something like foo.bar.baz = cat, which I can convert to {foo: {bar: {baz: "cat"}}} and then merge into my…
Max
  • 4,882
  • 2
  • 29
  • 43
1
vote
2 answers

RethinkDB: .get() with just part of the uuid?

Let's say this is the uuid of one of my documents in RethinkDB: 594a64ab-b78b-4838-a79f-318020a352a9 Normally, to retrieve the document, I do: r.db("databasename").table("tablename").get('594a64ab-b78b-4838-a79f-318020a352a9') Is there some way I…
Anson Kao
  • 5,256
  • 4
  • 28
  • 37
1
vote
2 answers

Combining multiple tables with r.union in RethinkDB

I will be dynamically combining a range of tables with the exact same structure in RethinkDB. I have my dynamically-generated list of tables in an array as follows: tables = [r.table('table1'), r.table('table2'), ...] And I am trying to do…
lyzazel
  • 164
  • 1
  • 5