197 questions
1
vote
0
answers
57
views
how to get previous and next records for a specific record in rethinkdb
I am trying to get the surrounding records based on a given record id.
For example I have this records:
[{id: 1, name: 'a'},{id: 2, name: 'b'},{id: 3, name: 'c'},{id: 4, name: 'd'},{id: 5, name: 'e'},{...
2
votes
1
answer
207
views
Issue with connecting to rethinkdb from Windows 11 via thinky (nodejs)
I'm trying to onboard a new developer, that is using Windows 11 as the only one on our small team. I've guided him through installing WSL2 and Ubuntu 20.04.3 LTS (linux kernel: 5.10.93.2-microsoft-...
1
vote
0
answers
182
views
RethinkDB: Update multiple array entries using ReQL with high performance
Inside a single document of my table, I'm trying to achieve an update of several entries of an array with high performance.
The array is around 20k entries, and I'm trying to merge 5k element changes.
...
2
votes
1
answer
336
views
Embed RethinkDB into Electron (or NodeJS) app
I'm building an Electron app, specifically a crypto-currency wallet, so I need all the information stored locally on the user's machine and should not be synced to any server.
I like RethinkDB and ...
2
votes
1
answer
233
views
Using secondary index for .lt() with .filter() in RethinkDB
Currently trying to solve a problem by using RethinkDB to find those objects which has a createdAt date key with less than the given value by using .lt().
The following query works just fine with ....
0
votes
1
answer
111
views
How to connect rethinkdb in Openshift using rethinkdbdash
Could someone help to connect to rethinkdb in openshift using rethinkdbdash
I have deployed rethinkdb in openshift & create 3 clusterIP services
1.8080 - admin
2.29015 - intracluster communicated
...
0
votes
1
answer
99
views
Get inserted document directly in RethinkDB
I have been starting with RethinkDB. I have gone through the documentation. I have a simple use case of returning the inserted document when a POST call is made. This is something I have done so far.
...
-1
votes
1
answer
164
views
run multiple instances of Rethinkdb on the same machine
I would like to run multiple instances of Rethinkdb on the same machine.
Is that possible? if so, what is the set up?
0
votes
1
answer
164
views
RethinkDB: Filter documents based on filtered field
I have a table of documents (entity) with a field that is a list of objects:
{
"field": {
"content": [
{ "url": "https://www.google.com" },
{ "url": "" }
]...
0
votes
1
answer
426
views
How can I filter if any value of an array is contained in another array in rethinkdb/reql?
I want to find any user who is member of a group I can manage (using the webinterface/javascript):
Users:
{
"id": 1
"member_in_groups": ["all", "de-south"]
},
{
"id": 2
"member_in_groups": ["...
1
vote
1
answer
50
views
How to view document UUID in RethinkDB
I can view all the documents in a table with this:
r.db('database').table('users')
But how can I list the uuid for each document/user?
2
votes
1
answer
316
views
ReQL | RethinkDB error: Expected type TABLE but found SINGLE_SELECTION
hello i have this in the data explorer on the webinterface but i have a error
code:
r.db("discordboatsclubv1").table("users").get("355995885085392896").insert({
"admin":"true"
})
error:
e: ...
1
vote
1
answer
170
views
rethinkdb, How could I pluck the result by a value in particular "array index"?
sample data
[
{
"createdDate": 1508588333821,
"data": {
"image_extension": "png",
"name": "Golden",
"qty": 1,
"remark": "#296-2",
"status": "RETURN",
"...
1
vote
1
answer
135
views
Accessing nested fields with Rethinkdb
So I have a result that looks like this
"data": {
"randomkeyllasdkjflk": {
"name": "John Doe"
},
"anotherrandomkeyadf": {
"name": "Mona Lee"
}
}
and I want to access the name.
This ...
0
votes
1
answer
115
views
Cannot Grab Data From Primary Key In RethinkDB
I'm attempting to grab data in RethinkDB by the primary key. However, my code cannot find the data.
I'm using the RethinkDBDash driver to grab the data and such, I defined Rethink as client.db. The ...
0
votes
0
answers
163
views
Compare index function with JavaScript function?
Is it possible to compare the function of an existing index with an ordinary native function in JavaScript?
For instance, I might create an index with the following code:
r.table('Table')....
0
votes
1
answer
31
views
rethinkdb web interface error looking for other database even a database name has been specified
I'm trying to join two tables by parent id to child row name 'users_id' from the specific database via rethinkdb web interface, below is what I've tried
r.db('cn_chat').table('chat_que').eqJoin('...
1
vote
1
answer
44
views
rethinkdb 'or' filter still returning result even filter params is invalid
I'm trying to retrieve a result where row 'origin' is equal to 'person' or row 'type' is equal to 'human', below is what I've tried
r.db('identitydb').table('connections').filter(
( { "origin" : "...
1
vote
1
answer
108
views
dump real data from rethinkdb table
I'm using the recommended PHP client driver for rethinkdb and I created a database and also a table unto that database, now I'm trying to retrieved all the documents from the specific table from a ...
1
vote
1
answer
210
views
rethinkdb delete nested property
I have following table structure -
{
"id": 1,
"prop": {
"1": {
"bunch-of-stuffs": "foo"
},
"2": {
"bunch-of-stuffs": "bar"
}
}
}
I want to remove "prop" with the key ...
1
vote
1
answer
63
views
RethinkDB generate key-value pair from rows
I have following query which returns the number of request for each status -
r.db.table("request").group("status").count()
result -
[
{
"group": "ACCEPTED",
"reduction": 1
},
{
"...
0
votes
1
answer
96
views
Unable insert data to table in RethinkDB database
I got the error:
ReqlLogicError: Expected type TABLE but found SINGLE_SELECTION
with the ReQL await
client.db.table('userData').get('249923459738632194').insert({money: money}).run();.
...
0
votes
1
answer
34
views
Ignoring diacritics in orderBy in RethinkDB?
The query r.table('categories').orderBy('name') returns my documents in the following order:
Cerveja
Refrigerante
Suco
Água
The correct order would take "Água" first:
Água
Cerveja
Refrigerante
Suco
...
1
vote
1
answer
185
views
Update a subdocument list object value in RethinkDB
{
"id": 1,
"subdocuments": [
{
"id": "A",
"name": 1
},
{
"id": "B",
"name": 2
},
{
"id": "C",...
2
votes
2
answers
697
views
Rethinkdb full search by contains text
I have a lot of tries to search by same part of the string in the rethinkdb but I can not do it yet.
And I receive this error:
db.table("jobs")
.filter(db.row("title").contains(title))
...
0
votes
1
answer
44
views
Displaying data for each day of the week with rethinkDB
Displaying data for each day of the week with rethinkDB
r.row('time_create').dayOfWeek()
[
{
detail: "no",
order_id: "03",
status: "Delivery",
time_create: "2018-09-23T11:06:30.164Z",
time_success: "...
0
votes
2
answers
83
views
Can I get shorter UUIDs in RethinkDB?
Is there a way to get shorter unique IDs for entries in RethinkDB?
We have a URL scheme where <url>/:ID URLs get very long with the default ID
Their docs don't seem to talk about this...
...
1
vote
1
answer
101
views
RethinkDB indexing two fields with time
I have RethinkDB with data/table let say "news" with huge number of data row :
[
{
"author": "author1",
"category_id": "business",
"country": "id",
"created_at": "Wed Aug 15 2018 09:...
0
votes
1
answer
146
views
ReQL equivalent of Select * from table where id in ()
I am new to RethinkDB, I have an array of object ids, I want to fetch object from a table whose id belong to this array.
SQL query would be -
SELECT * FROM orgs WHERE id IN ('ID1','ID2');
I tried ...
2
votes
1
answer
2k
views
How to delete elements of a table in Rethinkdb from Data Explorer?
I have an application created in Node.js with a Rethinkdb database, I load images from the application, but from the Data Explorer, to which you can connect from localhost: 8080, I can not delete the ...
1
vote
2
answers
815
views
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: "...
1
vote
1
answer
167
views
Left join query with rethinkDB
I have two tables, users and authors.
A user can be an author and if so, in the author document there is the id of the user.
What I want to query are all the users that are NOT authors.
The ...
3
votes
1
answer
398
views
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 ...
0
votes
1
answer
82
views
Condition inside getAll for compound index
what will be the equivalent query for
select * from emails where to="someemail" and from="some@email"
need to use get instead of filter
0
votes
2
answers
82
views
Rethinkdb The many-to-many relationship
I have tables of the following kind
entity
|id|title|
entity_authors
|id|authorName|
entity_to_authors
|id|entityId|authorId|
I managed to join the tables entity and entity_to_authors
r.table("...
0
votes
2
answers
170
views
Aggregate multiple fields in one rethinkdb query
How to reduce / aggregate multiple fields in a table? This does not seem efficient:
r.object(
'favorite_count',
r.db('twitterdb').table('tweets').map(tweet => tweet('favorite_count')).avg()....
6
votes
2
answers
295
views
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(
...
0
votes
1
answer
51
views
conflict="error" not being honoured with rethinkdbdash
I am using rethinkdbdash for the first time and I am attempting to simply create a user but error out if it exists. From all of the documentation I have read the following code should work, however it ...
0
votes
1
answer
35
views
r.table('table').filter({thing : 'thing'}).run(conn, function(err, result) {}) returning undefined
So I,m trying to filter my database for names with this code:
r.table('Profiles').filter({mcname : user}).run(connection, function (err, profiles) {
console.log(r.table("...
0
votes
1
answer
135
views
RethinkDB - Automatically generating primary keys that are linear
Is there a way to make rethinkdb generate primary key automatically and to ensure the key is in an increasing order., like say 1 to n
I know when we insert a row into rethinkdb it automatically ...
1
vote
1
answer
51
views
match atleast one element of given array of data in RethinkDB
I have a data set like follows-
[{
"name": "new name",
"tags":[{
"addedBy": "userABCe3" ,
"addedDTS": Tue Jan 23 2018 13:02:37 GMT+00:00 ,
"tagId": "08d679c8-31b6-48d3-...
1
vote
1
answer
448
views
RethinkDB filter array, return only matched values
I have a table like this
{
dummy: [
"new val",
"new val 2",
"new val 3",
"other",
]
}
want to get only matched values to "new", I am using query like this:
r.db('db')....
0
votes
1
answer
262
views
Rethinkdb query to fetch data between 2 epoch times
I'm trying to run a ReQL query to fetch the data between 2 epoch times, i have a field called "lastUpdatedDttm" using which i'm trying to run the query like below. The lastUpdatedDttm field type is "...
0
votes
1
answer
349
views
Why can't I append an object to an array in rethinkdb?
I am trying to append an object into an array in rethink. Here is how I am trying to append it:
rethink.table('shifts')
.get(shiftId)
.update(row => row("milestones").default([])....
0
votes
1
answer
134
views
Why can't I append an object in an array in Rethinkdb?
I am trying to append an object into an array in rethink. Here is how I am trying to append it:
rethink('shifts')
.get(shiftId)
.update(row => row("milestones").default([]).append(...
0
votes
1
answer
165
views
Apply delta values on nested fields
Suppose I have record like this:
{
id: 1,
statistics: {
stat1: 1,
global: {
stat2: 3
},
stat111: 99
}
}
I want to make update on record with ...
0
votes
1
answer
171
views
How to use multiple indexes to filter and group?
In RethinkDB, is it possible to filter and group in a single query using indexes for efficiency in both operations? For instance:
r
.db('db')
.table('table')
.getAll('123', {index: '...
0
votes
1
answer
63
views
How can I do eqJoin with two or more fields in rethinkdb?
I need to do a join operation in rethinkdb (eqJoin) but using two or more fields and not only 'gameId'
r.table('players').eqJoin('gameId', r.table('games')).run(conn, callback)
1
vote
1
answer
566
views
How to increase the responding time for ReQL query in RethinkDB
By now I've 1Million records in my table. When I trying to add a new column/variable to the table it is showing time out error.I even tried to limit the data intake but it doesn't. Can anyone tell me ...
0
votes
1
answer
156
views
RethinkDB - Reduce results of list field
I have a dataset with a field that contains a list of strings for each document. I'm looking for a query that will give me the list of unique strings in that field
I thought reduce might be what I'm ...