Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples clarification #187

Open
demsey2 opened this issue Dec 6, 2022 · 1 comment
Open

Examples clarification #187

demsey2 opened this issue Dec 6, 2022 · 1 comment

Comments

@demsey2
Copy link

demsey2 commented Dec 6, 2022

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?

@tywalch
Copy link
Owner

tywalch commented Dec 14, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants