GRDB.swift v2.1.0 Release Notes
-
๐ Released October 24, 2017 • diff
๐ New
- ๐ GRDBCipher can now build from command line (groue/sqlcipher/pull/1 by Darren Clark)
- โฌ๏ธ Upgrade custom SQLite builds to v3.20.1 (thanks to @swiftlyfalling).
The new method
Request.asSQLRequest
allows to inspect the sql and arguments of any request:let request = Player.all() let sql = try request.asSQLRequest(db).sql print(sql) // Prints "SELECT * FROM players"
StatementArguments adopts Equatable
๐ Fixed
DROP TABLE
statements would not drop temporary tables.
๐ Documentation Diff
- ๐ New FAQ: How do I create a database in my application?
- ๐ New FAQ: How do I print a request as SQL?
- The Codable Record chapter has been enhanced with more information and sample code.
API diff
extension Request { + func asSQLRequest(_ db: Database, cached: Bool = false) throws -> SQLRequest } struct SQLRequest { + let sql: String + let arguments: StatementArguments? + let adapter: RowAdapter? }