Created
August 31, 2016 13:00
-
-
Save 1dolinski/e6c97c6af6c636134cd20a02d2239a27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Goal1: get activites for user for particular date | |
// Goal2: get most recent activites in the database for reporting | |
// Match: UID and startDate | |
// 2 options | |
// a. pushed objects | |
// not sure how to query for both uid AND startDate | |
// easy to achieve goal 2 | |
z = { | |
activities: { | |
pushid: { | |
startDate: 123456, | |
createdAt: 1231832789, | |
uid: '-k23v39vxoqlknv9' | |
} | |
} | |
} | |
// b. uid with pushed objects | |
// faster reads for a user | |
// easy to achieve goal 1 | |
// not sure how to achieve goal 2 when multiple users are included | |
a = { | |
activities: { | |
'-k23v39vxoqlknv9': { // this is the $uid | |
pushid: { | |
startDate: 123456 | |
createdAt: 1231832789 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment