Questions tagged [reql]

ReQL is the RethinkDB query language. It offers a convenient way to manipulate JSON documents.

ReQL is the RethinkDB query language. It offers a convenient way to manipulate JSON documents.

http://www.rethinkdb.com/docs/introduction-to-reql/

99 questions
2
votes
1 answer

RethinkDB GetNearest and Filter for Multi-Index

Is it possible to query nearby point that match with one or more tags? This is the data that I have: r.db("test").table("Member"): { "POSTALCODE": "526494" , "lat": "1.3640" , "lon": "103.9531" , "memberId": …
totoro
  • 195
  • 1
  • 9
2
votes
3 answers

Building RethinkDB filter dynamically

I want to filter my data using filter specified as below: var filter = { minAge: 2, maxAge: 11, country:'uk', city':'london'}; In which case the filtering will be: r.db(dbName).table(tableName) .filter(r.row("minAge").ge(filter.minAge) …
slobodan.blazeski
  • 1,040
  • 9
  • 20
2
votes
1 answer

MySQL distinct count type query with RethinkDB

I'm having some problems implementing the following SQL query in rethinkdb, I wanna get the 5 most popular channels in a community, based on user_count. SELECT channels.*, COUNT(distinct channel_users.user_id) as user_count FROM…
jesperado
  • 25
  • 3
2
votes
1 answer

How to create readable result of group function in RethinkDB without group and reduction field?

I have a query that uses group() function: ...group('a','b','c','na').count() the now the result is returns like in the form of group and reduction like this: How can I get result without group and reduce in the form of { "na": 1285 "c" :…
Prakash Thapa
  • 1,285
  • 14
  • 27
2
votes
2 answers

How can I perform a join/merge of a nested attribute across tables?

I have a table (db name is libstats, table name is flowcells) full of documents, all of which have a structure like this: { "barcode": "C3W9UACXX", "id": "0021732f-2c42-4e9a-90fd-c68bb0d998dc", "libraries": [ { …
DeeDee
  • 2,641
  • 2
  • 17
  • 21
2
votes
1 answer

How to remove unnecessary field after grouping in rethinkdb, display just key-value pair?

I got some result like this in rethinkdb using group [ { "group":[ 0, "A" ], "reduction":14 }, { "group":[ "B", 0 ], "reduction":2 } ] I used like…
Prakash Thapa
  • 1,285
  • 14
  • 27
2
votes
1 answer

How to extract / Filter on array objects in JSON using RethinkDB

I have a simple JSON structure, for example {'a' : 'value' , 'b': ['b1','b2','b3'] , c: 'value'} , { 'a' : 'value' , 'b': ['b5','b6','b7'] , c: 'value'}, and so on . . . I was wondering on how do I filter json data which only have b1 or b2 . It…
Rahul
  • 11,129
  • 17
  • 63
  • 76
2
votes
2 answers

How to print server execution time and roundup time after query execution in RethinkDB?

Is there any easy way to print server time and round-trip time after execution Query complete in Javascipt? I have seen this in webadmin, but could not found in API. For the Benchmarking purpose of Query, which one should we consider?
Prakash Thapa
  • 1,285
  • 14
  • 27
1
vote
1 answer

RethinkDB how to delete duplicated values in a list except for the latest value

I want to reduce a list of adbKeys if there are duplicated title. I want to keep the latest, or the last, value in a list. Query: r.db('stf').table('users').filter(r.row('adbKeys').count().gt(5))('adbKeys') Result: [ [{ "adbKeys": [{ …
John
  • 1,139
  • 3
  • 16
  • 33
1
vote
1 answer

How to filter a Table based on appartenance to a list

I am trying to filter a table , the predicate being the appartenance to a list in Code. Can this be done from code and without needing the list to be added in a RethinkDB table? var list=new List{1,2,3}; var…
Bercovici Adrian
  • 8,794
  • 17
  • 73
  • 152
1
vote
0 answers

Databases similar to RethinkDB's ReQL?

Are there any databases which have a query language similar to RethinkDB's ReQL? Many use SQL, while Mongo uses an 'object' API, and others use a REST API. ReQL's core characteristic is that it embeds into native programming languages. This makes it…
Chris Talman
  • 1,059
  • 2
  • 14
  • 24
1
vote
1 answer

RethinkDB Node.js - Subtract values from each field in a document, using another object

Given a table which contains objects that look something like this: { someString: 'something', foo: 100, bar: 53, baz: 230, ignore: 'everything but numbers' } and a given JSON object that contains only number values: { foo: 20, bar:…
chrispytoes
  • 1,714
  • 1
  • 20
  • 53
1
vote
0 answers

Run functions on objects in RethinkDB from R

After opening a connection between a RethinkDB database and R using the rethinker package in R, how might I alter the following ReQL code (which runs in Data Explorer of RethinkDB web admin UI) so that the query may be executed directly from…
JMarshall
  • 11
  • 2
1
vote
2 answers

rethinkdb: How to orderby two attributes and use between on one of those

we have a rethinkdb with tickets in it. They have a createdAt with a timestamp in milliseconds and a priority attribute. e.g. { createdAt: 12345, priority: 4, owner: "Bob", description: "test", status:…
1
vote
1 answer

How to use ReQL filter and match command on arrays

I have a table in rethinkdb where each row has following structure - { 'name':'clustername', 'services':[ { 'name':'service1' }, { 'name':'service2' } ] } I am running a query to filter service2 object like…
Pavan Kishore
  • 91
  • 2
  • 9