Skip to content

Releases: vapor-community/sql-kit-extras

0.0.9 - Add new variadic helpers

22 Sep 11:19
c863124

Choose a tag to compare

Add several new helpers:

  • SQLRow.decode(columnsOf:_:)
  • SQLQueryFetcher.first(decodingColumnsOf:_:)
  • SQLQueryFetcher.all(decodingColumnsOf:_:)
  • SQLUnqualifiedColumnListBuilder.columns(of:_:)
  • SQLInsertBuilder.columns(of:_:)

These helpers work exactly the same as the variadic .columns(_:) helpers, allowing you to specify multiple Fluent key paths in one call, except that these helpers require you to specify a single model at the start of the list to which all of the key paths apply. In other words, this line:

insert.column(of: FooModel.self, \.$field1, \.$field2, \.$field3)

is exactly the same as this line:

insert.columns(\FooModel.$field1, \FooModel.$field2, \FooModel.$field3)

Which style you prefer when dealing with lots of columns from the same model is up to you; there is no difference in behavior or performance.


What's Changed

  • Add variadic columns(of:, ...) helpers in several places. by @gwynne in #8

Full Changelog: 0.0.8...0.0.9

0.0.8 - Fix SendableMetatype handling

08 Sep 09:21
9619f0f

Choose a tag to compare

Well, I say "fix", more like this is a slightly better workaround.

0.0.7 - Add string interpolations, fix CAST for MySQL

25 Aug 17:51
884d856

Choose a tag to compare

What's Changed

  • Fix SQLCastExpression for MySQL by @ptoffy in #4
  • Add a couple of interpolations for SQLQueryString that take Fluent keypaths by @gwynne in #5

Full Changelog: 0.0.6...0.0.7

0.0.6 - Lower macOS platform requirement, add AsyncSQLMigration

02 May 07:38
8fc37b1

Choose a tag to compare

  • The macOS platform requirement is now .v10_15 instead of .v13, since we don't actually require anything newer.
  • Added AsyncSQLMigration to FluentSQLKitExtras.

0.0.5 - Fix package name

02 May 07:02
98da8fa

Choose a tag to compare

The package name in Package.swift now matches the package's filesystem name. This is purely cosmetic and has no functional effect at all.

0.0.4 - Add a couple of new utilities

02 May 00:50
e31ab0c

Choose a tag to compare

Added FluentSQLKitExtras utilities for SQLInsertBuilder.ignoringConflicts(with:) and SQLInsertBuilder.onConflict(with:do:).

0.0.3 - Upgrade PostgreSQLCastExpression to SQLCastExpression

14 Apr 15:17
785f0bb

Choose a tag to compare

SQLCastExpression uses the standard CAST(foo AS type) casting syntax supported by all existing database drivers.

0.0.2 - AliasProperty needs to import Foundation

14 Apr 07:44
664b274

Choose a tag to compare

I'm not too clear on why this is needed, but it seems that it is.

0.0.1 - Initial release

14 Apr 01:14
197388f

Choose a tag to compare

This is the first version of this package. Please read the README. Seriously.