Questions tagged [thinky]

Thinky is a JavaScript ORM for RethinkDB.

21 questions
0
votes
0 answers

Rethinkdb thinky export model

Im currently trying to export a model on nodejs using thinky(rethinkdb orm). I separate my models in different files for more clarity. The pattern goes likes this. var modelA = think.createModel ... //API methods exports.list = ... exports.add =…
Diego Gallegos
  • 1,722
  • 2
  • 18
  • 31
0
votes
1 answer

Filter where attribute is in supplied array

Suppose I have these documents in a Things table: { "name": "Cali", "state": "CA" }, { "name": "Vega", "state": "NV", }, { "name": "Wash", "state": "WA" } My UI is a state-picker where the user can select multiple states. I want to…
000
  • 26,951
  • 10
  • 71
  • 101
0
votes
1 answer

Storing a buffer in RethinkDB

I'm uploading a file (multipart/form-data) to a Koa and want to store it into RethinkDB. I parse it with co-busboy, which results in a stream. Then I convert the stream into a buffer by attaching data/end listeners to it, gathering all buffers and…
K..
  • 4,044
  • 6
  • 40
  • 85
0
votes
1 answer

Allowing `undefined` values in array in `thinky` schema validation

The schema looks like this: import Game from './Game' import {io, thinky} from '../' const type = thinky.type export const playerSchema = { id: type.string(), createdAt: type.date().default(thinky.r.now()), modifiedAt: type.date(), …
demux
  • 4,544
  • 2
  • 32
  • 56
0
votes
1 answer

Populate array of keys while joining with RethinkDb

I wasn't able to populate a list of keys while joining on an other table so I was wondering if my models are correct and if what I'm trying to do is possible with Thinky, here is my code: Group model var Group = thinky.createModel('group', { …
Ouad
  • 33
  • 1
  • 5
0
votes
1 answer

How do I run a filter on a getNearest() query in RethinkDB?

I have a table with users and their locations saved as r.point datatypes & a geo index set on them. I am trying to run a .getNearest() query, which returns all the users closest to the given user (say, Mr. X). The results return all the users…
GPX
  • 3,506
  • 10
  • 52
  • 69
1
2