We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FYI I have seen issue #162
This is similar but I am trying to use .WhereRaw() with a string array.
.WhereRaw()
This is the raw SQL I am trying to accomplish:
SELECT * FROM "v0"."Users" WHERE "Roles" && ('{"Member", "Admin"}');
My attempt at using SQL Kata looks like this
string str = String.Join(",", request.Roles.Select(r => $"\"{r.ToString()}\"")); str = $"'{{{str}}}'"; string raw = "\"Users\".\"Roles\" && (?)"; query = query.WhereRaw(raw, str);
The postgres server is telling me:
ERROR: operator does not exist: text[] && text;
The column I am querying is of type text[].
text[]
I have also tried just going totally RAW SQL without a parm, but that still isn't working:
string str = String.Join(",", request.Roles.Select(r => $"\"{r.ToString()}\"")); str = $"'{{{str}}}'"; string raw = $"\"Users\".\"Roles\" && ({str})"; query = query.WhereRaw(raw);
But my SQL ends up looking like this:
AND "Users"."Roles" && ('""Support","Admin""')
Looks like the {} chars are getting replaced with quotes?
{}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
FYI I have seen issue #162
This is similar but I am trying to use
.WhereRaw()
with a string array.This is the raw SQL I am trying to accomplish:
My attempt at using SQL Kata looks like this
The postgres server is telling me:
The column I am querying is of type
text[]
.I have also tried just going totally RAW SQL without a parm, but that still isn't working:
But my SQL ends up looking like this:
Looks like the
{}
chars are getting replaced with quotes?The text was updated successfully, but these errors were encountered: