lucasteles / Strongly

💪🏾 A strongly-typed domain values source-generator
MIT License
35 stars 6 forks source link

GUID should also include all Math (except MathConst) #4

Closed ThatDeveloper closed 1 year ago

ThatDeveloper commented 1 year ago

Hello there, awesome work.

Could you please make sure that: GUID should also include all Math (except MathConst)

https://learn.microsoft.com/en-us/dotnet/api/system.guid.op_equality?view=net-7.0 https://learn.microsoft.com/en-us/dotnet/api/system.guid.op_greaterthan?view=net-7.0 https://learn.microsoft.com/en-us/dotnet/api/system.guid.op_greaterthanorequal?view=net-7.0 https://learn.microsoft.com/en-us/dotnet/api/system.guid.op_inequality?view=net-7.0 https://learn.microsoft.com/en-us/dotnet/api/system.guid.op_lessthan?view=net-7.0 https://learn.microsoft.com/en-us/dotnet/api/system.guid.op_lessthanorequal?view=net-7.0

This is important, as for Cursor based EFCore there needs to be the ability to use the math operators like GreaterThan or LessThan. I would do it myself but I am really having difficulties to get the Stronly source project running and debuggable.

I believe within SourceGenerationHelper.cs (starting from line 170) you could make IsNumeric OR IsGuid and exclude the MathConst for IsGuid?

I would appreciate it!

lucasteles commented 1 year ago

In this case, it should be only the compare operators.

I just added it in the latest release https://github.com/lucasteles/Strongly/releases/tag/1.4.2