-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ilike in postgresql #65
Comments
Hi my friend! I am for any improvement, but just thinking about how it would work with existing code - |
@Dzoukr you might be right. It is supported by |
I am just thinking about how to do it. It's always tricky to put something "only-somewhere-supported" into generic library. 🤔 |
@Dzoukr you can give a skip if you want. It's all good. I totally understand to keep things simple. |
@Dzoukr just let me know. It is just once case where client wants that |
I think the way to do it would be to create Provider specific modules. Dapper.FSharp/src/Dapper.FSharp/Builders.fs Line 513 in 1a7382e
That way they wouldn’t be accidentally used for a Provider that doesn’t support them. Also, each provider’s name could vary if necessary. (For example, ms sql doesn’t refer to it as |
Hmmm... That seems to be the way. But we would have to add another case here anyway, wouldn't we?
|
@Dzoukr yes we need to . That's why I told I can give quick PR. but as you said problem is. Postgresql and MSSQL are the only supporting that. So, how you bypass that here for eg. MySQL Dapper.FSharp/src/Dapper.FSharp/MySQL.fs Line 45 in 784001c
We can surely ignore |
Even easier would be to change it to this: | Like of caseInsensitive: bool * pattern: string |
One thing that it is a little confusing to me: So I guess in terms of defaults, it would actually be inaccurate to say that SQL Server defaults to one or the other since it's not really controlled at that level. This makes me think that your original idea of creating a separate DU case might be the better approach: | Like of string
| ILike of string module PostgresqlExtensions
let ilike<'P> (prop: 'P) (pattern: string) = true |
In such a case it's out of library control, so I wouldn't bother... 😄 |
Yeah, it's an edge case for sure. It makes me feel indifferent to adding it. |
Yeah, I have the same feeling right now. It would be the first provider-specific thing on syntax level and I still find it somehow "dirty" (cannot explain why, just gut feeling)... |
I guess I agree with gentlemen here. @Dzoukr please do honor to close this issue. |
🤣 Honor to close the issue... God I love this community 😄 ❤️ |
Adding this for v4 now |
* Restructuring solution for v4 * Restructure MySQL * Fixing MSSQL + bump to .NET6 * MSSQL Select tests * MSSQL delete tests * MSSQL insert tests * MSSQL Issues tests * MSSQL update tests * MSSQL Aggregates Tests * MySQL tests * Adding PostgreSQL tests * Support for OPTION(RECOMPILE) #70 * Support for ilike in postgresql #65 * Releasing v4
Now available in version 4 |
Just like
like
there is something calledilike
which is cooperation but case insensitive. It would be great if you can support that as well along sidelike
if you are Ok. I can give merge request.
The text was updated successfully, but these errors were encountered: