Commit Graph
336 Commits
Author SHA1 Message Date
Gwendal Roué 8cac458efc Use "real" column names in examples.
Also, remove "essential".
2024-10-06 12:42:10 +02:00
Gwendal Roué a13c1bec29 Add coalesce in DocC 2024-10-06 12:19:49 +02:00
Gwendal Roué c6781f46d2 Prefer Collection over Array
This allows the user to call those methods with an Array, or any other collection at hand (including lazy ones)

This change makes `return coalesce(columns.lazy.map { $0.name })` iterate lazily. Before this commit, `map` was returning a non-lazy Array.
2024-10-06 12:19:49 +02:00
Phil Mitchell d7754fa79c Add coalesce free function and Row method 2024-09-30 13:10:59 +10:00
Gwendal Roué 6a29d6c081 [BREAKING] Prefer Collection over Sequence for filter(keys:) and derived APIs
We were frequently turning those sequences into an Array in order to check their emptiness, and generally were not sure we'd iterate a sequence only once.

Also use `some Sequence` and `some Collection` whenever possible.
2024-09-08 12:52:27 +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é 6157a40dad Fix DocC warnings 2024-08-24 16:34:35 +02:00
Gwendal Roué 43ced9b2f0 Trivial Sendable conformances
Either added, either made explicitly unavailable.
2024-03-17 18:25:04 +01:00
Gwendal Roué f4ac0ab119 Make it possible to observe the supplementary fetches 2023-10-08 20:41:05 +02:00
Gwendal Roué f7559d4c76 Moved row adapters doc into DocC 2023-03-12 17:25:16 +01: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é 9b113fb548 Fix documentation 2023-01-30 08:00:47 +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é e79b6a5622 Fix typo 2022-10-21 08:50:01 +02:00
Gwendal Roué 82b4d90a82 Xcode 14 RC doesn't ship with the Swift 5.6 stdlib
https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171
2022-09-09 08:16:55 +02:00
Gwendal Roué f2c46784a6 ArrayRowImpl is checked Sendable 2022-09-07 08:50:32 +02:00
Gwendal Roué 65efc413fe Fix for failing test for #1274
https://github.com/groue/GRDB.swift/discussions/1274
2022-09-05 08:43:43 +02:00
Gwendal Roué 0ed9367b26 BREAKING: DatabaseCursor no longer exposes its prepared statement 2022-08-21 21:22:34 +02:00
Gwendal Roué e0786537db BREAKING: replace Int32 with CInt everywhere it is possible 2022-08-21 21:22:34 +02:00
Gwendal Roué b2eafd4a13 SE-0361: Extensions on bound generic types
https://github.com/apple/swift-evolution/blob/main/proposals/0361-bound-generic-extensions.md
2022-08-21 21:22:34 +02:00
Gwendal Roué 895964de16 BREAKING: Throwing FetchableRecord.init(row:) 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é 58293befc9 BREAKING: Optional is a database value like others 2022-08-21 21:22:34 +02:00
Gwendal Roué 6da7d47394 Swift 5.7 required: Remove compiler checks 2022-08-21 19:21:57 +02:00
Daniel Inoa 432670e13a Fix documentation typo in Row 2022-06-12 05:14:28 -07:00
Gwendal Roué 1260980150 Remove return keywords 2022-05-18 08:14:19 +02:00
Gwendal Roué 209192d3a5 Require Swift 5.6 Compiler for Concurrency Support 2022-04-13 23:07:33 +02:00
Gwendal Roué b53b43b1fc Cleanup 2022-01-16 14:50:55 +01:00
Gwendal Roué ed6c5438b9 Move DatabaseCursor state to Statement 2022-01-14 13:13:34 +01:00
Gwendal Roué bd67153095 Fix #1124 for more cursors 2022-01-13 14:28:04 +01:00
Gwendal Roué 1b62e06c4a Expose Sendable conformance to Swift 5.5
But async apis are still only exposed to Swift 5.5.2.

Sendable conformances are helpful for users of Xcode < 13.2.
2021-12-10 08:08:47 +01:00
Gwendal Roué 61b0df8017 Enable async APIs on Xcode 13.2+ only
Xcode 13.1 won't have access to async apis. This simplifies our availability checks.

The techniques were inspired from:

- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#api-design
- https://github.com/swift-server/guides/blob/main/docs/concurrency-adoption-guidelines.md#backwards-compatibility-of-declarations-and-checked-swift-concurrency
2021-12-08 11:17:40 +01:00
Gwendal Roué 3f02724e60 RowDecodingError is Sendable
Xcode 13.2 RC won't compile unless we make a Sendable copy of the row that could not be decoded.
2021-12-08 07:59:43 +01:00
Gwendal Roué c0c8eec75d Replace _checkedIndex with _checkIndex
That's what the stdlib Array does
2021-08-28 14:54:51 +02:00
Gwendal Roué 151a457251 Inline StatementColumnConvertible decoding 2021-08-28 14:53:54 +02:00
Gwendal Roué 18e9b1b9aa Specialize StatementColumnConvertible decoding 2021-08-21 14:53:11 +02:00
Gwendal Roué 665770c50c Remove all ABI annotations 2021-08-21 13:14:54 +02:00
Gwendal Roué 2858b803d0 Remove useless <Void> qualifiers
SQLRequest and CommonTableExpression are <Row> by default
2021-08-21 12:25:04 +02:00
Gwendal Roué bf601e6810 Merge SelectStatement and UpdateStatement
Addresses #1015
2021-07-29 20:20:15 +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é 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
Gwendal Roué cb2405a8b9 RowDecodingError 2021-02-21 14:21:04 +01:00
Gwendal Roué 836efb120f Xcode 12.3 formatting 2020-12-23 12:13:05 +01:00
Gwendal Roué ebae30342b Defining custom RowAdapter types is no longer supported. 2020-07-12 14:22:53 +02:00
Gwendal Roué 9743c89c56 Documentation 2020-07-12 11:59:01 +02:00
Gwendal Roué 94d1134ec2 fetchSet 2020-07-12 10:49:47 +02:00
Gwendal Roué df92e350c0 Documentation 2020-07-11 20:29:47 +02:00