Closed jaberbu closed 3 years ago
Options: Results:
But if you want access to first element you need to know its id:
results['1ARo7ZoCFcwETOtVjjAI'].BRAND
I'll take it
@ezequieltejada
The idea is add _id
automatically to the interface created by the user.
Interface created buy user and passed to Onfirework<Schema>('COLLECTION')
And gets _id
too
Ups! Sorry, I miss understood. Please reject the pull request
Close #20
@ezequieltejada bad news :( works 50%
Works great as Filter suggest 👍
Not work 👎
We need reopen an issue to try solved this bug.
There is also the problem that requires importing Results to declared filters outside the listDocs(where)
const where:Filter<Result<BikeSchema>>[] = [
['BRAND', '==', 'Ducati']
]
I'll take a look on it
@ezequieltejada We should revert type for param Filter to Filter<T>[]
is not necesary filtering by _ID
eg: bikes.listDocs([['_id', '==', '1234']])
This is other thing:
const where:Filter<Result<BikeSchema>>[] = [['BRAND', '==', 'Ducati']]
const ducati:Promise<Result<BikeSchema>[]> = bike.listDocs(where)
Fixed in Pull Request #22
Would be great not make mandatory to add
_id
field to Interfacesinterface Schema { _id?: string | undefined; FIELD_1: string; FIELD_2: number; }