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

Types on documents #12

Open
stuartpb opened this issue Apr 14, 2016 · 6 comments
Open

Types on documents #12

stuartpb opened this issue Apr 14, 2016 · 6 comments
Labels

Comments

@stuartpb
Copy link
Member

Since we're about to start mixing in users and (potentially) channels documents, we should start putting a type on each document, so as to make excluding documents from views easier.

@stuartpb
Copy link
Member Author

Also probably going to get stored as a document in the database: the migration plan. Having it be localStorage is... weird.

@stuartpb
Copy link
Member Author

So, the types will be:

  • users
  • channels
  • plan
  • messages

Where the first 3 go on the documents of the same name, and messages goes on everything else.

@stuartpb
Copy link
Member Author

Looks like the way I went was to make a document called "metadata" that has both "channels" and "users" objects... yeah, now that I think about it, I'm going to split those into two docs, because I'm going to need channels a lot more than I'm going to need users.

@stuartpb
Copy link
Member Author

Though, ugh, that means having a weird Pouch-wrapping-object around both of 'em, each basically only having one property...

Nope, still doing it. I don't want a perf hit from having to deal with Slack groups of several-thousand-users but only a few channels, or vice versa, when I need to do operations that wouldn't otherwise take a hit.

@stuartpb
Copy link
Member Author

But they really only get dealt with simultaneously...

Ugh, fine, I'll make it one object.

@stuartpb
Copy link
Member Author

So anyway, I'm thinking about changing the slack metadata from "metadata" to "slack-metadata", and making it so that doc and plan both have a type of metadata.

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

No branches or pull requests

1 participant