x-cubed / event-store-client

JS client library for connecting to Event Store over TCP/IP
The Unlicense
71 stars 24 forks source link

Add "link" property to StoredEvent when using resolveLinkTos flag #6

Closed ZBlocker655 closed 8 years ago

ZBlocker655 commented 8 years ago

When unpacking an event message that has a defined "link" property (which would be a sibling of the "event" property), create a "link" property in the unpacked StoredEvent to hold the deserialized link information. This "link" would become another StoredEvent instance.

Such a structure should only exist if the stream was read using the resolveLinkTos flag.

NOTE: I also corrected a small error in the README and the TypeScript defs, which indicated that the "number" property in StoredEvent represents the event number. Based on what I saw in connection.js, the property is "eventNumber", not "number".

Original discussions:

x-cubed commented 8 years ago

Thanks for contributing!

ZBlocker655 commented 8 years ago

My pleasure. If we go forward with this client, I may be back.