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
I'm passing a String (non-optional) into a query like:
String
let name: String = "test" query.filter(\.$name ~~ name)
and I'm getting:
Fatal error: Only string binds are supported with contains.
The fix (not the best probably) for me right now is this:
extension Optional: CustomStringConvertible where Wrapped == String { public var description: String { return self ?? "" } }
However, I'm wondering why there is an Optional<String> in the function at all, I'm passing a String. https://github.com/vapor/fluent-kit/blob/master/Sources/FluentSQL/SQLQueryConverter.swift#L248
Optional<String>
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I'm passing a
String
(non-optional) into a query like:and I'm getting:
The fix (not the best probably) for me right now is this:
However, I'm wondering why there is an
Optional<String>
in the function at all, I'm passing aString
. https://github.com/vapor/fluent-kit/blob/master/Sources/FluentSQL/SQLQueryConverter.swift#L248The text was updated successfully, but these errors were encountered: