my sql is: SELECT * FROM table where '$domain' GLOB '*' || field order by id desc
I want codable result.
may like this?:
/// Builds a copy of the expression appended with a `GLOB` query against the
/// given pattern.
///
/// let path = Expression<String>("path")
/// path.rglob_asterisk("*.png")
/// // '*.png' GLOB '*' || "path"
///
/// - Parameter pattern: A pattern to match.
///
/// - Returns: A copy of the expression appended with a `GLOB` query against
/// the given pattern.
public func rglob_asterisk(_ pattern: String) -> Expression<Bool> {
Function.glob.infix(pattern, "'*' || \(self)".expression)
}
my sql is:
SELECT * FROM table where '$domain' GLOB '*' || field order by id desc
I want codable result.
may like this?: