Skip to content

Commit

Permalink
Revert "Fixes offset limit duplication for SqlServer (#490)"
Browse files Browse the repository at this point in the history
This reverts commit f4a680b.
  • Loading branch information
sebastienros authored Oct 11, 2023
1 parent 4bb7978 commit af1bb31
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions src/YesSql.Provider.SqlServer/SqlServerDialect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ public override string GetTypeName(DbType dbType, int? length, byte? precision,

public override void Page(ISqlBuilder sqlBuilder, string offset, string limit)
{
sqlBuilder.ClearTrail();

if (offset != null)
{
sqlBuilder.Trail(" OFFSET ");
Expand Down
5 changes: 1 addition & 4 deletions test/YesSql.Tests/CoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public async Task InitializeAsync()
if (_configuration == null)
{
_configuration = CreateConfiguration();

CleanDatabase(_configuration, false);

_store = await StoreFactory.CreateAndInitializeAsync(_configuration);
Expand Down Expand Up @@ -2914,9 +2914,6 @@ public async Task ShouldPageResults()
{
Assert.Equal(1, String.Compare(ordered[i].SomeName, ordered[i - 1].SomeName));
}

//query should discard previous skip/take
Assert.Equal(5, (await query.Skip(10).Take(5).ListAsync()).Count());
}
}

Expand Down

0 comments on commit af1bb31

Please sign in to comment.