types / rethinkdb

Types for https://github.com/rethinkdb/rethinkdb
MIT License
11 stars 6 forks source link

merge operator on RTableSlice #5

Closed ktersius closed 7 years ago

ktersius commented 7 years ago

Seems that the merge operator is missing on RTableSlice ? For example this query is valid.

r.db('devDB')
.table('RoleMapping')
.filter({"principalId": 'fd079f60-adf0-4470-af08-df074774703c', principalType: 'USER'})
.merge(roleMapping => {
                return r.db('devDB').table("Role").filter({"id": roleMapping("roleId")}).nth(0).pluck("name", "id");
            })
.pluck("name", "id");
blakeembrey commented 7 years ago

Thanks, I just added it to RTableSlice. Since there's a lot of duplication going on to support the correct types, it's likely a few things have been missed.