electrodb
electrodb copied to clipboard
Examples clarification
In the "library" example https://github.com/tywalch/electrodb/blob/master/examples/library/index.ts we have the following queries with comments
// get all copies of books by the authors last name
author.query
.writer({authorLastName: 'king'})
.go();
// this same query can be used to get unique books
// (instead of individual copies) because this
// entity is denormalized
author.query
.writer({authorLastName: 'king'})
.go()
// get all books by last name and a
// partial first name.
author.query
.writer({authorLastName: 'king'})
.begins({authorFirstName: 's'})
.go();
// get all books by the full name of the writer
author.query
.writer({authorLastName: 'king', authorFirstName: 'stephen'})
.go();
I tried that example, and none of them can return a list of books. They always return just the author data. Are those examples correct?
Yes, I think this was more of a description typo. I'll revisit these examples and make sure the descriptions match. This particular example set is prime for showing off index types so it makes sense to update them anyway. Thank you!