sqlite-kit

4.5.2

Non-blocking SQLite client library with SQL builder built on SwiftNIO
vapor/sqlite-kit

What's New

4.5.2 - Use structured logging (metadata) when logging queries

2024-05-29T17:11:03Z

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

SQLiteKit

Documentation Team Chat MIT License Continuous Integration Swift 5.8+ SSWG Incubation Level: Graduated


SQLiteKit is an SQLKit driver for SQLite clients. It supports building and serializing SQLite-dialect SQL queries. SQLiteKit uses SQLiteNIO to connect and communicate with the database server asynchronously. AsyncKit is used to provide connection pooling.

Usage

Use the SPM string to easily include the dependendency in your Package.swift file.

.package(url: "https://github.com/vapor/sqlite-kit.git", from: "4.0.0")

Supported Platforms

SQLiteKit supports the following platforms:

  • Ubuntu 20.04+
  • macOS 10.15+

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Sat Oct 19 2024 11:18:34 GMT-0900 (Hawaii-Aleutian Daylight Time)