Skip to content

Commit 940fdf2

Browse files
author
Brandon Bernard
committed
- Fix issues with Cursor Parsing breaking with recent changes and updates in .Net version.
1 parent 12cae02 commit 940fdf2

3 files changed

Lines changed: 22 additions & 73 deletions

File tree

‎RepoDbExtensions.PagingPrimitives/CursorFactory.cs‎

Lines changed: 0 additions & 70 deletions
This file was deleted.

‎RepoDbExtensions.PagingPrimitives/RepoDbExtensions.PagingPrimitives.csproj‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net10.0</TargetFrameworks>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
6-
<Version>1.15.1.0</Version>
7-
<AssemblyVersion>1.15.1.0</AssemblyVersion>
6+
<Version>1.15.1.1</Version>
7+
<AssemblyVersion>1.15.1.1</AssemblyVersion>
88
<FileVersion>1.15.1.0</FileVersion>
99
<Authors>BBernard / CajunCoding</Authors>
1010
<Company>CajunCoding</Company>
@@ -16,6 +16,7 @@
1616
<PackageTags>repodb, paging, pagination, cursor, offset, skip, take, sorting, graphql, graph-ql, hotchocolate, dapper, sqlkata</PackageTags>
1717
<PackageReleaseNotes>
1818
Release Notes:
19+
- Fix issues with Cursor Parsing breaking with recent changes and updates in .Net version.
1920
- Updated to support .Net 8 and .Net 10 (.Net 6 is now removed as it's no longer supported by Microsoft).
2021
- Update RepoDb reference to v1.15.1 stable.
2122

‎RepoDbExtensions.SqlServer.PagingOperations.Tests/RepoDbCursorHelperTests.cs‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using FluentAssertions;
33
using Microsoft.VisualStudio.TestTools.UnitTesting;
4-
using RepoDb.PagingPrimitives;
4+
using RepoDb.PagingPrimitives.CursorPaging;
55

66

77
namespace RepoDb.SqlServer.PagingOperations.Tests
@@ -39,5 +39,23 @@ public void TestCursorCreationAndParsing()
3939
cursorIndex.Should().Be(testIndexes[i++]);
4040
}
4141
}
42+
43+
[TestMethod]
44+
public void TestCursorParsingFromStringParams()
45+
{
46+
var testIndexes = new[] { 10, 100, 1000, 1000000, 1000000000 };
47+
48+
TestContext.WriteLine("Parsing Cursors...");
49+
foreach (var index in testIndexes)
50+
{
51+
var cursor = CursorFactory.CreateCursor(index);
52+
var cursorIndex = CursorFactory.ParseCursor(cursor);
53+
TestContext.WriteLine($"[{cursor}] ==> [{cursorIndex}]");
54+
55+
//Assert our results are valid...
56+
cursorIndex.Should().BePositive();
57+
cursorIndex.Should().Be(index);
58+
}
59+
}
4260
}
4361
}

0 commit comments

Comments
 (0)