Merge pull request #249 from alex-310/orderbynull

This commit is contained in:
xuejmnet 2023-08-23 13:41:37 +08:00 committed by GitHub
commit a4ea274638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -106,6 +106,10 @@ namespace ShardingCore.Sharding.Enumerators
{
list.Add((IComparable)value);
}
else if (value == null) // Support Nullable<xx>
{
list.Add(null);
}
else
{
throw new NotSupportedException($"order by value [{order}] must implements IComparable");
@ -142,4 +146,4 @@ namespace ShardingCore.Sharding.Enumerators
#endif
}
}
}