首页 文章
  • 0 votes
     answers
     views

    Rethinkdb替换为getAll

    我有一个用户表,每行看起来像这样: { id: <user's id>, email: <user's email> } id 是主键, email 有二级索引 . 我想仅在没有其他用途存在同一电子邮件的情况下添加用户 . 通常我会使用两个查询: getAll(<user's email>, {index: 'email'}) 以确保不接收电子邮件,然...
  • 0 votes
     answers
     views

    Rethinkdb按特定用户的orderBy获取行位置

    我有以下rethinkdb数据模式: user_id -- generated by the application point -- given to the user on a successful completion of task 当按分数DESC排序时,如何选择单个文档及其在集合中其他文档中的位置 . 因此,如果集合数据看起来像这样,则按分数排序: user_id | score...
  • 2 votes
     answers
     views

    在rethinkdb中链接查询

    假设我有一个“类别”表,每个类别在“数据”表中都有关联的数据,并且它在“关联”的其他表中有相关数据,我想删除一个包含所有相关数据的类别 . 我目前正在做的是这样的: getAllDataIdsFromCategory() .then(removeAllAssociated) .then(handleChanges) .then(removeDatas...
  • 0 votes
     answers
     views

    rethinkdb更新嵌套数组

    我有以下结构: { "id": "3065e957-56e9-4084-8e32-bb4de8d9265a", "id_service": "570b4abe-70fe-44e0-845e-74eb60081fc4", "tweets": [ { ...
  • 0 votes
     answers
     views

    Rethinkdb - 在多个字段上不等于(ne)

    我有一个类似于以下内容的文档 { ... reactions: [ { user: 'user_id', reaction: 'reaction_name' }, { user: 'user_id', reaction: 'reaction_name' } ] ... } 我试图根据“用户”和“反应”的组...
  • 1 votes
     answers
     views

    RethinkDB简单地从嵌套数组中提取

    我是RethinkDB的新手,已经在这里和其他地方寻找答案 . 我发现有几件事情很接近,但似乎仍然无法弄清楚它应该是什么样的简单 . 我有一个问题: r.db('common').table("counters").filter({org: 'myorg'}).pluck('counters').run() 这给出了以下结果: { "counters"...
  • 1 votes
     answers
     views

    RethinkDB:我如何查询嵌套数组?

    我在RethinkDB中有一个 person 对象,如下所示: { "email": "user@domain.com", "orders": {, "id": 1, "additionalInvoices": [ { "descri...
  • 0 votes
     answers
     views

    更新嵌套文档数组rethinkdb

    我有一个这样的文档架构: { "name":"", "type":"", "posts":[ { "url":"", "content":"", ... }, { "url":""...
  • 1 votes
     answers
     views

    使用rethinkDB进行左连接查询

    我有两个表, users 和 authors . 用户可以是作者,如果是,则在作者文档中有用户的 id . 我想要查询的是非作者的所有用户 . 等效的mySQL查询就像是 select * from users left join authors on users.id=authors.userId where authors.userId is null 我试过的是 r.db('journ...
  • 1 votes
     answers
     views

    rethinkdb删除嵌套属性

    我有以下表格结构 - { "id": 1, "prop": { "1": { "bunch-of-stuffs": "foo" }, "2": { "bunch-of-stuffs": "bar...

热门问题