SQLRequest
public struct SQLRequest<RowDecoder> : FetchRequestextension SQLRequest: SQLCollectionextension SQLRequest: SQLSpecificExpressibleextension SQLRequest: ExpressibleByStringInterpolationA FetchRequest built from raw SQL.
- 
                  
                  The request adapter DeclarationSwift public var adapter: RowAdapter?
- 
                  
                  Creates a request from an SQL string, optional arguments, and optional row adapter. let request = SQLRequest<String>(sql: """ SELECT name FROM player """) let request = SQLRequest<Player>(sql: """ SELECT * FROM player WHERE id = ? """, arguments: [1])DeclarationSwift public init( sql: String, arguments: StatementArguments = StatementArguments(), adapter: RowAdapter? = nil, cached: Bool = false)ParameterssqlAn SQL query. argumentsStatement arguments. adapterOptional RowAdapter. cachedDefaults to false. If true, the request reuses a cached prepared statement. Return ValueA SQLRequest 
- 
                  
                  Creates a request from an SQLLiteral, and optional row adapter. let request = SQLRequest<String>(literal: SQLLiteral(sql: """ SELECT name FROM player """)) let request = SQLRequest<Player>(literal: SQLLiteral(sql: """ SELECT * FROM player WHERE name = ? """, arguments: ["O'Brien"]))With Swift 5, you can safely embed raw values in your SQL queries, without any risk of syntax errors or SQL injection: let request = SQLRequest<Player>(literal: """ SELECT * FROM player WHERE name = \("O'brien") """)DeclarationSwift public init(literal sqlLiteral: SQLLiteral, adapter: RowAdapter? = nil, cached: Bool = false)ParameterssqlLiteralAn SQLLiteral. adapterOptional RowAdapter. cachedDefaults to false. If true, the request reuses a cached prepared statement. Return ValueA SQLRequest 
- 
                  
                  :nodoc DeclarationSwift public func collectionSQL(_ context: SQLGenerationContext) throws -> String
- 
                  
                  :nodoc DeclarationSwift public func qualifiedCollection(with alias: TableAlias) -> SQLCollection
- 
                  
                  :nodoc DeclarationSwift public var sqlExpression: SQLExpression { get }
- 
                  
                  :nodoc DeclarationSwift public init(unicodeScalarLiteral: String)
 View on GitHub
View on GitHub Install in Dash
Install in Dash SQLRequest Structure Reference
        SQLRequest Structure Reference