mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[GH-ISSUE #7] Querying on children #9
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @paradis-A on GitHub (Feb 16, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/7
let say i have this collection.
how do i query products. i mean want to get all products.
@appy-one commented on GitHub (Feb 16, 2021):
Hi, I'm not really sure what you are trying to do here?
First of all, you are mixing arrays and object collections. Only use arrays for small collections of data that do not change frequently, use object collections for all other situations.
If you want to maintain a collection of products, do this:
If you want all products you previously stored, simply get the value:
If you want to query (instead of getting all), use
.query:See documentation for more info.
@paradis-A commented on GitHub (Feb 16, 2021):
@appy-one Yay. I missed some part of the documentation. So its not suggested to store array on nested object if it's frequently updated. I thought I can query from an array inside a nested object. just like I imagined. I have to do the manual mappings after all. I should have put this to discussion tab maybe. Thanks for the fast reply anyway.
@paradis-A commented on GitHub (Feb 16, 2021):
Are you going to implement after and before hooks on the acebase-server? just like on fastify