Is there a way to get shorter unique IDs for entries in RethinkDB?
We have a URL scheme where /:ID URLs get very long with the default ID
Their docs don't seem to talk about this...
https://rethinkdb.com/api/javascript/uuid/
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 following in myREQL console-…
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("entity")
…
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().round(),
'retweet_count',
…
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 keeps inserting never actually detecting a…
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("Profiles").filter({mcname : user}).toString())
…
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 generates a primary key and returns a variable…
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 "number" and is just new…
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([]).append({
dateAchieved: "2017-01-01",
…
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({
dateAchieved: date,
…
Suppose I have record like this:
{
id: 1,
statistics: {
stat1: 1,
global: {
stat2: 3
},
stat111: 99
}
}
I want to make update on record with object:
{
statistics: {
stat1: 8,
…
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: 'serverId'})
.group({index: 'userId'})
…
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)
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 looking…