Commit Graph
190 Commits
Author SHA1 Message Date
Gwendal Roué de0ce29d73 Encode strings with a NUL character
Inspired from #1880 by @nesevis
2026-09-26 16:34:14 +02:00
Gwendal Roué 9858de3249 Decode strings with a NUL character
Inspired from #1880 by @nesevis
2026-09-26 16:34:14 +02:00
Gwendal Roué fe3b957e5f Add missing Foundation imports 2026-06-10 12:55:39 +02:00
Marc Prud'hommeaux 14567635e4 Android and Windows platform import/conditional accommodation 2026-02-03 17:56:04 -05:00
Gwendal Roué a3036feb48 Merge branch 'development' into sqlcipher-spm-upstream 2026-02-01 15:11:22 +01:00
Micah Moore c24bf5d118 SQLCipher adjustments to support forks which want to enable SQLCipher using traits/swiftSettings
- Adds Database+SQLCipher extension with SQLCipher operations, enabled by #if SQLITE_HAS_CODEC
- Adjusts Import Statements to import SQLCipher when SQLCipher trait is enabled (or SQLCipher swiftSetting is set)
2026-01-14 11:32:48 -05:00
Tim De Jong a212bf9e89 It should be canImport(Darwin) not os(Darwin) 2025-10-12 18:03:57 +02:00
Tim De Jong 8e5b9ca9bd Fixed UUID fromDatabaseValue for non-Darwin platforms 2025-10-12 18:03:56 +02:00
Tim De Jong dc7d47c066 Fixed databaseValue build for non-Darwin platforms. 2025-10-12 18:03:56 +02:00
Tim De Jong 14f60ad48f Fixed fromDatabaseValue build under non-Darwin platforms 2025-10-12 18:03:56 +02:00
Tim De Jong e758fde941 Removed #if !os(Linux) in NSString.swift, NSData.swift and Date.swift. 2025-10-12 17:43:25 +02:00
Tim De Jong 7477e1cff8 Removed the #if !os(Linux) compiler directive in the Decimal extension, as it compiles fine under swift 6 2025-10-12 17:43:15 +02:00
Tim De Jong 2d6fe172c3 Import Foundation for CGFloat on non-Darwin platforms 2025-10-12 17:43:02 +02:00
Gwendal Roué 8cba324d6e Refactor the SQLite import
We can not use `#if Trait` because Xcode does not enable those compiler flags. Always count on Apple for delivering the best quality software.

So now we import the default SPM SQLite last, after all other cases have been excluded.

The GRDB framework (GRDB.xcodeproj and GRDB via CocoaPods) is distinct from the default SPM trait, so we detect it with GRDBFRAMEWORK.
2025-10-04 17:56:06 +02:00
Gwendal Roué f635aea2f2 Update more documentation with the closure syntax 2025-05-10 16:38:02 +02:00
Saleem Abdulrasool c865a847fd Foundation: elide extensions on Windows to match Linux
Similar to Linux, elide some extensions on Windows. This is required to
build this module on Windows.
2024-11-12 11:10:07 -08:00
Gwendal Roué 972aa33f68 Avoid optionals in JSON Data to String conversions 2024-09-22 10:10:01 +02:00
Gwendal Roué 938ad7a086 Prefer Data over NSData 2024-09-22 09:29:59 +02:00
Gwendal Roué 9e1ff42249 [BREAKING] Rename CSQLite to GRDBSQLite
Fix #1528
2024-08-24 18:15:57 +02:00
Gwendal Roué 9cd1d849cc [BREAKING] Stop exporting SQLite 2024-08-24 17:25:35 +02:00
Gwendal Roué f4b4035704 Fix Swiftlint warnings 2024-08-24 14:39:44 +02:00
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Gwendal Roué 746f65a979 JSON encoder is always user-provided
Now all created JSONEncoder or JSONDecoder are user-controlled.
2023-09-16 14:07:37 +02:00
Jhonny Bill Mena 3f96a965b9 ADD - databaseJSONDecoder and databaseJSONEncoder methods
ADD - optional jsonEncoder parameter to DatabaseValueEncoder

ADD - docs around new JSON customization methods
2023-09-10 23:54:50 -04:00
Gwendal Roué 9ff58c32e7 Use CChar instead of Int8 when we deal with C strings 2023-07-29 11:13:41 +02:00
Gwendal Roué 206bf209af Fix unneeded_synthesized_initializer Swiftlint warning 2023-07-29 10:00:42 +02:00
Gwendal Roué f6e695a21d More explicit any/some 2023-04-08 12:01:59 +02:00
Gwendal Roué 3382280cc3 Statement.execute(arguments:) uses temporary bindings
Inspired by @helje5 in https://hachyderm.io/@helge@mastodon.social/109978514220902036

Thank you!!

Now, onto cursors!
2023-03-11 12:10:25 +01:00
Gwendal Roué 13c804d1cc DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué 811d287bd9 Row.withUnsafeData 2022-11-06 16:02:36 +01:00
Gwendal Roué 1818534513 DocC 2022-11-06 16:02:36 +01:00
Gwendal Roué e0786537db BREAKING: replace Int32 with CInt everywhere it is possible 2022-08-21 21:22:34 +02:00
Gwendal Roué a9fcf1b9c1 SE-0335, SE-0341, SE-0346, SE-0352, SE-0358: some, any, primary associated types 2022-08-21 21:22:34 +02:00
Gwendal Roué dd55175978 SE-0345: if let x { }
https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 58293befc9 BREAKING: Optional is a database value like others 2022-08-21 21:22:34 +02:00
Gwendal Roué 23cbf13af0 Swift 5.7 required: Availability checks 2022-08-21 19:21:57 +02:00
Gwendal Roué 09922c34ff Code formatting 2022-01-23 12:24:34 +01:00
jason fbc0ee77bb Change init to fix Swift error 2021-09-08 13:57:24 -07:00
Gwendal Roué 151a457251 Inline StatementColumnConvertible decoding 2021-08-28 14:53:54 +02:00
Gwendal Roué 665770c50c Remove all ABI annotations 2021-08-21 13:14:54 +02:00
Zev Eisenberg 8b060e6b09 Add angle brackets to URLs to make them clickable in Xcode's rendered documentation. 2021-07-20 20:53:58 -04:00
Gwendal Roué 57cf9b45b6 Add missing Foundation import for SPM 2021-07-04 19:28:27 +02:00
Gwendal Roué 620eb6f21c Default DatabaseValueConvertible+Codable implementation uses the JSON format 2021-07-04 17:34:31 +02:00
Gwendal Roué 89521a7288 Improve statement binding performance 2021-04-03 14:52:22 +02:00
Gwendal Roué 64f5e6bdca Always use Decimal(string:) when decoding strings 2021-03-21 12:57:50 +01:00
Gwendal Roué d9083a7bf5 Support for Foundation.Decimal 2021-03-20 20:11:26 +01:00
Gwendal Roué e355af3584 Decode NSNumber from textual database values 2021-03-20 17:15:16 +01:00
Gwendal Roué b834b9876d Data.fastDecodeNoCopyIfPresent can not fail 2021-02-26 18:51:14 +01:00
Gwendal Roué 7f48e66fdc Reduce inlined code 2021-02-26 18:50:47 +01:00
Gwendal Roué b7c57dc7f2 Attempt at clarifying the (complex) decoding api
The difficulty is due to fast decoding of StatementColumnConvertible, and non-copied Data, from raw SQLite statement.

We want it to be inlinable, and possible in nested rows.

Added missing tests for nested rows
2021-02-25 20:45:12 +01:00