Questions tagged [rethinkdb-javascript]

JavaScript driver for RethinkDB

JavaScript driver for RethinkDB.

197 questions
0
votes
1 answer

Rethinkdb, wrong cluster setup or something else?

I am having huge problems with my cluster. Servers keeps disconnecting for unknown reason (there is nothing in logs) and crashing for unknown reason. I think I might have cluster setup wrong. First this is first, I understand sharding and that is…
pregmatch
  • 2,629
  • 6
  • 31
  • 68
0
votes
1 answer

.getField() returning empty result

Using the RethinkdbDash package for Node.js and Rethink, I'm able to use this ReQL: r.db('').table('').get('') ...to get the desired object out of the database with the following format... { "address": …
m_callens
  • 6,100
  • 8
  • 32
  • 54
0
votes
1 answer

ReathinkDB:Query multiple tables with chaining

In RethinkDB I am trying to chain multiple queries to multiple database tables. The idea is the same as stored procs for traditional dB's. Basically I query all the users connected to a device and then for each users try to get the rules attached…
Sourav Chatterjee
  • 780
  • 2
  • 13
  • 26
0
votes
1 answer

Listen change feed of complex queries in RethinkDB

When i have a query like this: r.db('universe') .table('Star') .getAll( r.db('universe').table('Ship').get(idShip)('idCurrentGalaxy'), {index: 'idGalaxy'} ) .changes({includeInitial: true}) I expect it to update the changefeed…
0
votes
2 answers

formulate query in rethinkdb

I have the next document in Rethinkdb. { "id": 678 , "author": 0 , "body": "

text

" , "category": "category" , "optionlist": { "option_A": "text 1" , "option_B": "text 2" , …
E.Im
  • 3
  • 2
0
votes
2 answers

Rethinkdb - Not Equal (ne) on multiple fields

I have a document that looks similar to the following { ... reactions: [ { user: 'user_id', reaction: 'reaction_name' }, { user: 'user_id', reaction: 'reaction_name' } ] ... } I'm trying to remove an…
millejo3
  • 13
  • 3
0
votes
1 answer

Can I access a Horizon RethinkDB instance from outside of the Horizon app?

I tried to put together a Horizon app with an externally hosted RethinkDB and I couldn't seem to get it to work with existing tools. I understand Horizon includes a server-side API component, which may be why. I want to be able to directly insert…
Erik J
  • 828
  • 9
  • 22
0
votes
1 answer

how to enforce hard limit 16MB on document size in rethinkdb

As rethinkdb suggest to keep the document size 16MB max for the performance reason. In my nodejs rest api app user can insert data using api. I cannot control how much data would be for an user. each user has individual document in a users table.…
Know Nothing
  • 1,121
  • 2
  • 10
  • 21
0
votes
1 answer

how to implement conditions on innerjoin in rethinkdb

i have this query: r.db('test').table('users').getAll("amazon_11",{index:"parent"}) .innerJoin(r.table("posts"),function (posts, user) {return posts("employeeId").eq(user("employeeId"));}).zip() …
0
votes
1 answer

Rethinkdb Select multiple rows from selection/sequence by array of row number

For a given sequence, how can I fetch rows of certain row numbers(indices). I know that nth() can select the nth index. But what if I want to select multiple rows by index ? r.expr([0, 10, 20, 30, 40, 50]).nth(3) // gives 30 The above works.…
0
votes
1 answer

RethinkDB - Query with count and join

I have two "tables" such as: PEOPLE (ID / NAME) 1 | JOHN 2 | MARY 3 | PETER MESSAGES (ID / PERSON_ID / TEXT) 1 | 1 | 'Text' 1 | 1 | 'Text 2' 1 | 2 | 'Text 3' 1 | 3 | 'Text 4' How can I get the number of messages of each person? Just…
diegocmaia
  • 79
  • 1
  • 10
0
votes
1 answer

Update column with array entry; create column if it does not exist

r.table("bets").filter({id: betID}).update({ votes: r.row('votes').append({ userID: userID, vote: vote …
Chris
  • 4,255
  • 7
  • 42
  • 83
0
votes
1 answer

Iterative commands to across different tables with forEach and/or toArray

I need to iterate through a primary table and add new documents to a different table each with id: and name: entries that match documents in the primary table. I have read the relevant documentation, which is shamefully sparse, and I found this SO…
Andrew
  • 737
  • 2
  • 8
  • 24
0
votes
1 answer

rethinkdb grouping to calculate balance of user funds

i am using rethinkdb with nodejs. i have a funds table and i am trying to calculate balance of any user by adding all the credit entries minus total debit entries. So far i was able to run following…
Najam Awan
  • 1,113
  • 3
  • 13
  • 30
0
votes
1 answer

Compile Error on line r.db("test").tableCreate("authors").run(conn);

I have setup Rethinkdb to use and I am trying to connect to DB via Java program using Java Driver. I downloaded RethinkDB java driver 2.3.1 from http://mvnrepository.com/artifact/com.rethinkdb/rethinkdb-driver/2.3.1. But I am getting the…