Questions tagged [rethinkdb-javascript]

JavaScript driver for RethinkDB

JavaScript driver for RethinkDB.

197 questions
0
votes
1 answer

Retrieve changefeeds of rethinkDB if node server crashes

I have a meteor app where user can insert or update into rethink db table and I am watching the change feeds from a node worker and pushing it in rethink-node-job-queue. Now if somehow my node-worker crashes sometimes , I will loose those changes or…
Nabarag Paul
  • 319
  • 5
  • 19
0
votes
1 answer

RethinkDB: Outer Join from Table to Array

I have three tables, classes, courses and userSchedules that look like this: classes { "classId": "24ab7b14-f935-44c1-b91b-8598123ea54a", "courseNumber": "PO101" , "days": "MWF" , "professor": "Abramius Darksbayn" , "seatsAvailable": 23…
Jim Cooper
  • 5,113
  • 5
  • 30
  • 35
0
votes
1 answer

How to optimize filtering : Rethink db

introduction I have been working with the ReThink Db using data explorer tab. I am new to Rethink Db. I have created this query to filter record on date base. I needed to optimize the query so that it can take less time for large records.…
Suhail Mumtaz Awan
  • 3,295
  • 8
  • 43
  • 77
0
votes
2 answers

calculate sum of values of a specific attribute in a table in rethinkDB?

I have the following dataset in my rethinkdb Database. I want to calculate the sum of one attribute named Min. I want to sum the all values of Min. For example with the following dataset the query should return 8 { "completedAt": Fri Dec 30 2016…
DEO
  • 316
  • 2
  • 4
  • 18
0
votes
0 answers

Calculate total sum of dates stored in array in rehtinkdb

I have date objects which are stored in array. I want to calculate sum of all these dates by rethinkdb query my data is stored in JSON. The array size can vary.
DEO
  • 316
  • 2
  • 4
  • 18
0
votes
1 answer

RethinkDb: Has many query

Have two table, Quiz and Questions Quiz table store questions id and its display position. Display position is different for every Quiz. Quiz table: { id: '1' name: 'Quiz 1' questions: [ { question_id: '1', position: 4 }, { …
Jawad
  • 193
  • 2
  • 4
  • 10
0
votes
1 answer

Rethinkdb create if not exists

What I'm trying to do is the following: Check if a record with a filter criteria exists If it does, do nothing If it does not, create it with some default settings. Now I could do it with 2 queries: function ensureDocumentExists(connection,…
Balázs Édes
  • 13,452
  • 6
  • 54
  • 89
0
votes
1 answer

Merge Object of type PTYPE with other objects in RethinkDb

i have following in my database and i want to merge it with other table . i have successfully merge other objects but when i run the following query r.db('test').table('jaguar').get('7').merge(function(j) { return { jId: j("id"), …
DEO
  • 316
  • 2
  • 4
  • 18
0
votes
2 answers

rethink/couch db manual trigger and executing a script

I am working on a project where I have to send a campaign mail to the users on specific date and time. Technology : Node, Rethinkdb/Couchdb Please do not suggest a cron job. What I have thought to use : I will be using a custom trigger where db will…
pravindot17
  • 1,199
  • 1
  • 15
  • 32
0
votes
1 answer

Filtering a join based on foreign keys in list values in RethinkDB

I'm using RethinkDB (2.3.5~0trusty) and python (2.7.6) and python-rethinkdb bindings (2.3.0.post6), and trying to query a pre-existing database. (ie please assume I can't change the schema that I'm working with) This is a simplified example of the…
0
votes
1 answer

rethinkDB search in a string

I'm using rethinkDB (Just started). I just wanted to search a particular string(or even a substring). For example, if I search for microsoft, give me all the products which contain title microsoft (case insensitive) and price less than $100 This is…
TechnoCorner
  • 4,879
  • 10
  • 43
  • 81
0
votes
1 answer

RethinkDb Join array in object with objects

I'm using rethinkdb with JS. I have a rethinkdb table 'users'. One user object looks like this: { id: '1', friends: [ '2', '4' ], items: [ { id: '1', name: 'test item 1' } ] } A user is allowed to see all items…
0
votes
0 answers

Rethinkdb get row position in orderBy of a particular user

I have the following rethinkdb data schema : user_id -- generated by the application point -- given to the user on a successful completion of task How can I select a single document AND its position amongst the other document in the collection,…
0
votes
1 answer

Export functions or variables to another module in node.js

I know there are lots of questions similar to mine but I could not find the best solution. I am creating a web app with node and rethinkdb. I want to organise different js files (modules) so that each has specific task. I have this query.js file…
codeyashu
  • 55
  • 2
  • 7
0
votes
1 answer

How to query RethinkDB based on a list of IDs

Suppose I have the following table in RethinkDB: I would like to query based on a list of IDs, for example the first two. It seems like the getAll function should do this, but I can't seem to get it to work: The query returns no results, even…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526