Skip to content

Commit

Permalink
- Improve flexibility of base interface support for cursor navigation…
Browse files Browse the repository at this point in the history
… with non-generic ICursorPageNavigationInfo.
  • Loading branch information
cajuncoding committed May 22, 2024
1 parent 131d498 commit 2aeff1b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
19 changes: 19 additions & 0 deletions RepoDb.PagingPrimitives/Common/ICursorPageNavigationInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace RepoDb.PagingPrimitives.Common
{

/// <summary>
/// Interface representing a Decorator class for common Paging navigation info.
/// </summary>
public interface ICursorPageNavigationInfo : IPageNavigationInfo
{
/// <summary>
/// The Cursor for the first item in the results of this page; can be used for forward or backward cursor navigation via first/after or last/before.
/// </summary>
string StartCursor { get; }

/// <summary>
/// The Cursor for the last item in the results of this page; can be used for forward or backward cursor navigation via first/after or last/before.
/// </summary>
string EndCursor { get; }
}
}
12 changes: 1 addition & 11 deletions RepoDb.PagingPrimitives/CursorPaging/ICursorPageResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace RepoDb.PagingPrimitives.CursorPaging
/// This class represents a set of results/nodes of an edge/slice/page.
/// </summary>
/// <typeparam name="TEntity"></typeparam>
public interface ICursorPageResults<out TEntity> : IPageNavigationInfo
public interface ICursorPageResults<out TEntity> : ICursorPageNavigationInfo
{
/// <summary>
/// The set of all ICursorResults decorator classes for TEntity model with Cursor Index values.
Expand All @@ -22,16 +22,6 @@ public interface ICursorPageResults<out TEntity> : IPageNavigationInfo
/// </summary>
IEnumerable<TEntity> Results { get; }

/// <summary>
/// The Cursor for the first item in the results of this page; can be used for forward or backward cursor navigation via first/after or last/before.
/// </summary>
string StartCursor { get; }

/// <summary>
/// The Cursor for the last item in the results of this page; can be used for forward or backward cursor navigation via first/after or last/before.
/// </summary>
string EndCursor { get; }

/// <summary>
/// Support safe (deferred) casting to the specified Entity Type.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Version>1.1.5.4</Version>
<AssemblyVersion>1.1.5.4</AssemblyVersion>
<FileVersion>1.1.5.4</FileVersion>
<Version>1.1.5.5</Version>
<AssemblyVersion>1.1.5.5</AssemblyVersion>
<FileVersion>1.1.5.5</FileVersion>
<Authors>BBernard / CajunCoding</Authors>
<Company>CajunCoding</Company>
<Description>The primitives and helpers needed for RepoDbExtensions.SqlServer.PagingOperations pacakge; used for working with modern pagination approaches such as Cursor based paging, as well as Offset based pagination, using the RepoDb ORM with Sql Server.</Description>
Expand All @@ -16,9 +16,10 @@
<PackageTags>repodb, paging, pagination, cursor, offset, skip, take, sorting, graphql, graph-ql, hotchocolate, dapper, sqlkata</PackageTags>
<PackageReleaseNotes>
Release Notes:
- Simplify RetrieveTotalCount param name on ICursorParams.
- Improve flexibility of base interface support for cursor navigation with non-generic ICursorPageNavigationInfo.

Prior Release Notes:
- Simplify RetrieveTotalCount param name on ICursorParams.
- Fix SQL building bug not using Raw SQL as specified; improved integration tests to validate this better.
- Improved raw sql parameter name to be more consistent with RepDb naming conventions.
- Fix Raw SQL validation logic to handle SQL that has been formatted with line breaks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;</TargetFrameworks>
<Version>1.1.5.4</Version>
<AssemblyVersion>1.1.5.4</AssemblyVersion>
<FileVersion>1.1.5.4</FileVersion>
<Version>1.1.5.5</Version>
<AssemblyVersion>1.1.5.5</AssemblyVersion>
<FileVersion>1.1.5.5</FileVersion>
<Authors>BBernard / CajunCoding</Authors>
<Company>CajunCoding</Company>
<Description>A set of extensions for working with modern pagination approaches such as Cursor based paging, as well as Offset based pagination, using the RepoDb ORM with Sql Server.</Description>
Expand All @@ -15,9 +15,10 @@
<PackageTags>repodb, paging, pagination, cursor, offset, skip, take, sorting, graphql, graph-ql, hotchocolate, dapper, sqlkata</PackageTags>
<PackageReleaseNotes>
Release Notes:
- Simplify RetrieveTotalCount param name on ICursorParams.
- Improve flexibility of base interface support for cursor navigation with non-generic ICursorPageNavigationInfo.

Prior Release Notes:
- Simplify RetrieveTotalCount param name on ICursorParams.
- Fix SQL building bug not using Raw SQL as specified; improved integration tests to validate this better.
- Improved raw sql parameter name to be more consistent with RepDb naming conventions.
- Fix Raw SQL validation logic to handle SQL that has been formatted with line breaks.
Expand Down

0 comments on commit 2aeff1b

Please sign in to comment.