Skip to content

Releases: vapor/sqlite-kit

4.5.2 - Use structured logging (metadata) when logging queries

29 May 17:11
f35a863
Compare
Choose a tag to compare

What's Changed

Use structured logging (metadata) when logging queries by @gwynne in #110

When a query is executed, the actual SQL query and its accompanying array of bound parameters (if any) are now logged as structured metadata on the logger using a generic message, rather than the query and bindings being the message. This follows the recommended guidelines for logging in libraries. Credit goes to @MahdiBM for the original suggestion.

Before:

2024-05-29T00:00:00Z debug codes.vapor.fluent : database-id=sqlite [SQLiteKit] SELECT * FROM foo WHERE a=?1 [["bar"]]

After:

2024-05-29T00:00:00Z debug codes.vapor.fluent : database-id=sqlite sql=SELECT * FROM foo WHERE a=?1 binds=["bar"] [SQLiteKit] Executing query

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 4.5.1...4.5.2

4.5.1 - Fix a DocC warning and update SQLiteNIO required version

16 May 19:53
8d3abe7
Compare
Choose a tag to compare

What's Changed

Fix a DocC warning and update SQLiteNIO required version by @gwynne in #109

One can’t use symbol links across modules. Also requires the most recent SQLiteNIO, since we made changes based on improvements therein in the last PR.

This patch was released by @gwynne

Full Changelog: 4.5.0...4.5.1

4.5.0 - Leverage improvements in SQLKit and SQLiteNIO

14 May 02:33
37c1a39
Compare
Choose a tag to compare

What's Changed

Leverage improvements in SQLKit and SQLiteNIO by @gwynne in #108

Several improvements:

  • Adds full Sendable correctness, including taking advantage of the improvements in vapor/sqlite-nio#68
  • Adds ExistentialAny compliance
  • The minimum Swift version is now 5.8
  • Fully supports the new SQLKit functionality added in SQLKit 3.29.0.
  • Modernizes the README and API documentation. API docs now have 100% coverage.
  • Custom JSON encoders and decoders can now be specified per-connection.
  • SQLKit’s queryLogLevel functionality is now fully implemented.
  • Database connections now default to using NIOThreadPool.singleton and MultiThreadedEventLoopGroup.singleton unless otherwise specified.
  • Leverages the improvements from vapor/sqlite-nio#68 to improve performance of Concurrency-based APIs by reducing thread hops and excess allocations.
  • SQLiteDataEncoder and SQLiteDataDecoder are now slightly faster and behave more consistently.
This patch was released by @gwynne

Full Changelog: 4.4.2...4.5.0

4.4.2 - Handle JSON better

18 Jan 12:21
e9fd69b
Compare
Choose a tag to compare

What's Changed

Handle JSON better by @gwynne in #107

This fixes an issue that arose with the release of SQLite 3.45.0, which includes support for a new “JSONB” internal representation. As a side effect, textual JSON data presented to SQLite as a BLOB is incorrectly treated as JSONB by the database, resulting in inexplicable errors when attempts are made to read the JSON back out again. Since we should always have been sending JSON to the database as TEXT in the first place, this is considered a general bugfix rather than purely a compatibility update.

Unblocks vapor/sqlite-nio#62.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 4.4.1...4.4.2

4.4.1 - Make nil decoding handling for SQLiteRows consistent with the other drivers

18 Oct 18:03
b476669
Compare
Choose a tag to compare

What's Changed

Make nil decoding handling for SQLiteRows consistent with the other drivers by @gwynne in #106

Dating back to the original release of Fluent 4, the MySQL and Postgres SQLKit drivers (mysql-kit and postgres-kit) have always returned true from SQLRow.decodeNil(column:) when the column is not present, whereas the SQLite driver has thrown an error. This PR finally brings SQLite in line with the others.

This patch was released by @gwynne

Full Changelog: 4.4.0...4.4.1

4.4.0 - Revise in-memory database handling for modern SQLite

15 Sep 14:05
8a2f3df
Compare
Choose a tag to compare

What's Changed

Revise in-memory database handling for modern SQLite by @gwynne in #105

SQLiteKit has for a long time depended on the use of SQLite’s shared cache with in-memory databases to support opening multiple connections to such databases. However, SQLite has also for a long time specifically recommended the total omission of the shared cache, a recommendation which SQLiteNIO now follows as of vapor/sqlite-nio#51. Therefore, SQLiteKit now uses uniquely-named temporary files to emulate the feature when in-memory databases are requested.

Additional changes in this release:

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 4.3.1...4.4.0

4.3.1 - Add SQLite support for nested subpath (JSON) expressions

11 Jul 04:30
2b20fc0
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Implements SQLKit's new SQLDialect.nestedSubpathExpression(in:for:) method.

Update min Swift version to 5.6 and make platform versions consistent

14 Apr 01:00
f66ddde
Compare
Choose a tag to compare

4.2.1

27 Feb 11:38
76da703
Compare
Choose a tag to compare

What's Changed

Full Changelog: 4.2.0...4.2.1

Modernize SQLite feature support

12 Nov 12:06
c07d530
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

The following changes have been made:

  • SQLiteDatabase now vends the version of SQLite in use per the SQLDatabaseReportedVersion protocol.
  • UPSERT syntax is now available for SQLite when the runtime library version is new enough (3.24.0 or newer)
  • RETURNING syntax is now available for SQLite when the runtime library version is new enough (3.35.0 or newer)
  • When emitting placeholders for bound parameters, the numbered ?NNN syntax is now used instead of plain ? placeholders.
  • Requests to create columns of type .bigint (via SQLCreateTable or Fluent's SchemaBuilder) now map explicitly to the INTEGER type name, which has the same data size but will correctly enable auto-increment behavior if the column is a table's primary key (previously this only worked when specifying SQLDataType.int or Fluent equivalent).
  • Dropped support for Swift up to and including 5.4, 5.5 is now the minimum.
  • CI was heavily updated, with the same changes as were made to SQLiteNIO.

These changes depend on vapor/sqlite-nio#34.