This repository was archived by the owner on Aug 15, 2024. It is now read-only.
ReadStreamHeadPosition/Version#391
Merged
yreynhout merged 3 commits intoSQLStreamStore:masterSQLStreamStore/SQLStreamStore:masterfrom May 24, 2020
yreynhout:read-stream-head-position-and-versionyreynhout/SqlStreamStore:read-stream-head-position-and-versionCopy head branch name to clipboard
Merged
ReadStreamHeadPosition/Version#391yreynhout merged 3 commits intoSQLStreamStore:masterSQLStreamStore/SQLStreamStore:masterfrom yreynhout:read-stream-head-position-and-versionyreynhout/SqlStreamStore:read-stream-head-position-and-versionCopy head branch name to clipboard
yreynhout merged 3 commits intoSQLStreamStore:masterSQLStreamStore/SQLStreamStore:masterfrom
yreynhout:read-stream-head-position-and-versionyreynhout/SqlStreamStore:read-stream-head-position-and-versionCopy head branch name to clipboard
Conversation
… results should be.
…paste mistakes, debugged failing tests and implemented fixes
c16d742 to
c7496ea
Compare
yreynhout
commented
May 23, 2020
| { | ||
| GuardAgainstDisposed(); | ||
|
|
||
| return (await ReadStreamBackwards(streamId, StreamVersion.End, 1, false, cancellationToken)).LastStreamPosition; |
Contributor
Author
There was a problem hiding this comment.
If this could be solved in a more optimized way for the http provider, please show me how.
yreynhout
commented
May 23, 2020
| { | ||
| GuardAgainstDisposed(); | ||
|
|
||
| return (await ReadStreamBackwards(streamId, StreamVersion.End, 1, false, cancellationToken)).LastStreamVersion; |
Contributor
Author
There was a problem hiding this comment.
If this could be solved in a more optimized way for the http provider, please show me how.
yreynhout
commented
May 23, 2020
| @@ -280,13 +281,63 @@ protected override async Task<long> ReadHeadPositionInternal(CancellationToken c | ||
|
|
||
| if(result == DBNull.Value) |
Contributor
Author
There was a problem hiding this comment.
I've left this in - but the test for the new operations seem to suggest this path will never be hit (since result is either null or a value, not DBNull.Value). Similar remark in other relational store implementations.
thefringeninja
approved these changes
May 23, 2020
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces two new methods on
IReadonlyStreamStore(non-breaking change):ReadStreamHeadPosition: reads the head position of a stream, i.e. the position of its last messageReadStreamHeadVersion: reads the head version of a stream, i.e. the version of its last messageThe test suite was extended with additional acceptance tests to cover the behavior of these new operations. This is the basis for a follow-up PR (in that it will follow a similar pattern) which will introduce support for reading the stream head message as well as the all stream head message.