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

Writable, Readable and Duplex streaming on collections. #40

Open
matt-filion opened this issue Apr 4, 2019 · 0 comments
Open

Writable, Readable and Duplex streaming on collections. #40

matt-filion opened this issue Apr 4, 2019 · 0 comments
Assignees

Comments

@matt-filion
Copy link
Owner

matt-filion commented Apr 4, 2019

const users: Collection<User> = new Collection(User);
const newUsers: Collection<NewUser> = new Collection(NewUser);
const transformer: DuplexStream = ....;

//This should read from users, transform using the transformer and then write to newUsers.
users
   .pipe(transformer)
   .pipe(newUsers);

  • .pipe() should produce a ReadStream that makes use of .find with no prefix.
  • Collection itself should implement WritableStream so it can be used as a value into .pipe() as a write destination.
  • ReferenceList should have a .pipe() method to produce a ReadStream which will produce documents starting with the prefix defined in .find() provided to get the ReferenceList.
@matt-filion matt-filion self-assigned this Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant