Skip to content

Apply Jorge's example query to other select-intensive RethinkDB queries #145

Description

@pzduniak
r.table('labels').getAll(owner,{index: 'owner'}).map(function(label){returnr.table('threads').getAll(label('id'),{index: 'labels'}).coerceTo('array').do(function(threads){returnlabel.merge({'total_threads_count': threads.count(),'unread_threads_count': threads.filter(function(thread){returnthread('is_read').not().and(thread('labels').contains(function(label){returnr.expr(spamTrashSent).map(function(row){returnrow('id');}).contains(label);}).not())}).count()});});});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions