Good points, you're right: you have to be signed in for Database to work. We'll make this clearer. We'll also fix the code snippet copying. Thank you for giving it a try!
71 karma · joined April 7, 2013
[ my public key: https://keybase.io/kochman; my proof: https://keybase.io/kochman/sigs/IvxKFvPxd8SqM__xhzfWdQ8seKX32r3xLXu7NjFuyfU ]
Keeping each database outside of the filesystem also gives us the flexibility to let people access the same database across multiple repls in the future.
I have lots of love for SQLite; early prototypes of Database were backed by it!
Yep, that's the idea. If you had a user with ID 1, one scheme to get all her info could be storing attributes in keys such as:
user:1:name
user:1:email
user:1:city
Then a prefix search for "user:1:" would get you the relevant keys for that user.But you could also go another way and drop a JSON-encoded object in a single key and work with it inside your app, since that might be the fastest way to get something off the ground!