Tags: vapor/sql-kit
Tags
Add support for Common Table Expressions (#179) * Add support for Common Table Expressions to SELECT, INSERT, UPDATE, DELETE, and UNION queries, including subqueries. Test and docs coverage is 100%. * Address (silly) warnings coming from the Swift 6 compiler * Fix grouping level when a union subquery is used with a CTE * Add a couple of real-world CTE queries to tests
Support the use of unions in subqueries (#178) * Bump dependency versions, remove irrelevant language feature flags * Add somewhat hackneyed support for using unions in subqueries. Thanks to bad design choices in the original union support (my bad), this turns out to be mildly annoying to actually use and extremely painful to follow in the actual implementation.
Relax minimum dependency version for swift-collections (#177) * Reduce the minimum required version of swift-collections for the benefit of downstream users who depend on SPM. Also remove spurious swift-docc-plugin dependency. * Reduce swift-nio dependency too.
Major overhaul of the entire SQLKit package (#172) * Bump Swift to 5.8, add Dependabot config * Docs overhaul * Deprecate \(raw:) in SQLQueryString with rename to explicitly "unsafe" version, numerous other SQLQueryString cleanups * ExistentialAny compliance * Overhaul SQLRowDecoder and SQLQueryEncoder * NIO -> NIOCore in imports * Fix all Sendable complaints from the compiler * Make SQLDatabaseReportedVersion Comparable * Deprecate SQLError and SQLErrorType, deprecate use of binds in SQLRaw. * Improve the behavior of the async-aware implementations * Basically redo all the tests * Cleanup of SQLKitBenchmark * Deprecate `SQLTriggerWhen/Event/Each/Order/Timing` in favor of better-namespaced names, add missing support for `SQLTriggerSyntax.Create.supportsDefiner` * Add SQLBetween and SQLQualifiedTable * Structural updates * Add missing predicate builder method to match the secondary predicate builder API * Misc general cleanup * Add basic support for "INSERT ... SELECT" queries to SQLInsert, add SQLSubquery and SQLSubqueryBuilder, use them in SQLCreateTableBuilder and SQLInsertBuilder * Make SQLLiteral.string and SQLIdentifier aware of proper escaping of their respective quoting. * Add all/first(decodingColumn:) utilities to SQLQueryFetcher * Add column list builders * Be more consistent about use of `String` versus `StringProtocol` and `any SQLExpression` versus `some SQLExpression`. * Add missing model decoding methods to SQLQueryFetcher. Further revise SQLRowDecoder and SQLQueryEncoder to provide the documented functionality correctly. Improve docs a bunch more. Add several missing "model"-handling methods to SQLInsertBuilder, SQLColumnUpdateBuilder, etc. Separate out the string handling utilities into their own file and refine the coding error handling. * Add SQLDataType.timestamp * Make the SQLStatement API more useful, speed up serialization very slightly, improve various other serialize(to:) methods * Make SQLDropBehavior respect the dialect, add predicate support to SQLCreateIndex, use SQLDropBehavior in SQLDropEnum (and make it respect the dialect for IF EXISTS), correct the docs and implementation of SQLDistinct, docs and serialization improvements for the rest of the query expressions. SQLDropTrigger gets a dropBehavior property, and SQLDropEnum's name is now mutable as with other properties. * Remove useless property on SQLAliasedColumnListBuilder, fix SQLColumnUpdateBuilder to correctly use SQLColumnAssignment * Make SQLPredicateBuilder and SQLSecondaryPredicateBuilder as fully consistent as possible. * Make the async version of SQLDatabase/execute a protocol requirement so non-default implementations are invoked when used through existentials * Fix SQLSelect and SQLList serialization, fix tests
Major codebase cleanup (#166) * Massive pass across the entirety of SQLKit to: - Fix, correct, clarify, add, and streamline documentation comments across the board. - Use `any` in all places it should appear. - Normalize coding style (esp. omitting unneeded `return`s and consistent use of `self.`). - Add `@inlinable` and `@usableFromInline` to a significant amount of the API, hopefully improving performance - Fix some minor copy-pasta bugs, primarily in SQLCreateTrigger - Deprecate use of non-trivial raw SQL strings outside of SQLQueryString or SQLRaw * Update README - had a LOT of old stuff in it
PreviousNext