-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Currently you can do
const iterator = table
.query(`hash = N(songs) AND begins_with(range, S(moth))`)
.filter(`contains(artists.name, S(danzig)`)
.properties('artists.weight', 'artists.height')First of all the method is properties but the documentation is projection expression; Can we change the method to .projection() ?
To apply filters and properties we chain onto the iterator. This mutates the query()
To me its confusing what the behavior of the following code is
const iterator = table
.query(`hash = N(songs) AND begins_with(range, S(moth))`)
const filterItr = iterator
.filter(`contains(artists.name, S(danzig)`)
const projetedItr = filterItr
.properties('artists.weight', 'artists.height')
await iterator.next()
await filterItr.next()
await projectedItr.next()
Instead of using mutating method & chaining would it be simpler to just pass an options object to query()
const iterator = table
.query(`hash = N(songs) AND begins_with(range, S(moth))`, {
filter: `contains(artists.name, S(danzig)`
properties: ['artists.weight', 'artists.height']
})heapwolf
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers