Commit Graph
48 Commits
Author SHA1 Message Date
Gwendal Roué 9f2e3b7d6b Optimize statement authorizer region accumulation
This commit is inspired by #1873 from @guidedways, who detected an unexpectedly quadratic behavior in the way we build database regions from the statement authorizer
2026-09-23 14:16:22 +02:00
Marc Prud'hommeaux 14567635e4 Android and Windows platform import/conditional accommodation 2026-02-03 17:56:04 -05: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
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é 5a4d9b5cb9 Let PRAGMA QUERY_ONLY statements run from a cancelled database access
Fix #1715
2025-02-04 19:35:39 +01:00
Saleem Abdulrasool 77a4d17940 Core: import ucrt on Windows for strcmp
This uses the deprecated `strcmp` interface on Windows, which requires
the C library to be imported. Add the missing import to allow building
on Windows.
2024-11-12 11:12:27 -08: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é fcfdab2f11 Import string_h for strcmp
Thanks to @karianneberg in https://github.com/groue/GRDB.swift/commit/344878cdb2e3af07f46954e3bc2b93541489bd82
2024-08-22 08:17:04 +02:00
Cameron Pulsford 344878cdb2 Fix compilation issue with Xcode 16 beta 5 due to a missing import. 2024-08-06 19:46:09 -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é ac214e6760 SE-0345: if let shorthand for shadowing an existing optional variable 2023-01-30 08:00:47 +01:00
Gwendal Roué 2a3318ef9a ALTER TABLE DROP COLUMN is properly reported with SQLITE_ALTER_TABLE for SQLite 3.38+ 2022-09-07 08:51:05 +02:00
Gwendal Roué e0786537db BREAKING: replace Int32 with CInt everywhere it is possible 2022-08-21 21:22:34 +02:00
Gwendal Roué 0658808028 Make Database.swift easier to read
Enhance documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué fb6ea57d74 Don’t setup database observation in read-only connections.
Observation of read-only connections has turned useless since read-only transactions are no longer reported to TransactionObserver, in #1213
2022-08-21 21:22:34 +02:00
Gwendal Roué 0879311646 Make TransactionObserver.swift easier to read
Add some documentation, and rename some types and variables.
2022-08-21 21:22:34 +02:00
Gwendal Roué 36892fee55 BREAKING: Bump minimum SQLite version to 3.19.3 2022-08-21 21:22:34 +02:00
Gwendal Roué fe225fe452 BREAKING: Remove deprecated methods 2022-08-21 19:21:57 +02:00
Gwendal Roué c60b8cfc53 Refactor prevention of truncate optimization
We now always use the same authorizer, which is always ready to prevent truncate optimization depending on the current transaction observers.
2022-01-30 14:07:43 +01:00
Gwendal Roué aacc69f485 Fix typos 2022-01-21 13:43:44 +01:00
Gwendal Roué 124cba1b21 Work around missing SQLITE_ALTER_TABLE action 2022-01-19 07:29:16 +01:00
Gwendal Roué effc991de1 Deprecate DatabaseRegion.init(table:)
This commit reverts #510
2021-12-12 12:36:27 +01:00
Gwendal Roué bf601e6810 Merge SelectStatement and UpdateStatement
Addresses #1015
2021-07-29 20:20:15 +02:00
Gwendal Roué e8802fb010 Fix #971 2021-05-01 14:32:01 +02:00
Gwendal Roué 836efb120f Xcode 12.3 formatting 2020-12-23 12:13:05 +01:00
Gwendal Roué 0372c1dd63 Complete #747: export the underlying SQLite library 2020-04-12 07:27:50 +02:00
Gwendal Roué 56f332122d The observed region is always recorded 2020-03-24 22:59:07 +01:00
Gwendal Roué 19061934ce SE-0242: Synthesize default values for the memberwise initializer
...and more initializers cleanup
2020-03-09 08:49:06 +01:00
Gwendal Roué c8bb6873be Add SQLITE_CREATE_VTABLE to authorizer codes that invalidate schema cache 2019-12-01 17:59:49 +01:00
Gwendal Roué a08b078c3e Fix a swiftlint warning 2019-09-26 08:49:57 +02:00
Gwendal Roué b2ea9e51d2 Help debugging authorization issues like #620 2019-09-25 17:04:26 +02:00
Gwendal Roué 35ceeebb3d Style tweaks 2019-07-26 20:56:33 +02:00
Gwendal Roué df6bb8761c Swiftlint + whitespace 2019-07-01 08:57:53 +02:00
Gwendal Roué 1f50b4fefe Integrate SQLCipher as a CocoaPod 2019-04-19 08:33:19 +02:00
Gwendal Roué 0ea9a1ce0d Use SchemaInfo more 2018-11-17 15:59:09 +01:00
Gwendal Roué 3b7801efff Cache full database schema 2018-11-17 15:38:55 +01:00
Florent Pillet 55472c2d7f Main framework compiles on Linux 2018-05-19 18:52:35 +02:00
Gwendal Roué 2d008b8c54 Yet another request protocols update, in order to empower RxGRDB 2018-05-05 11:57:17 +02:00
Gwendal Roué 33b5c6c616 Rename DatabaseSelectionInfo to DatabaseRegion 2018-01-16 08:23:08 +01:00
Gwendal Roué fc1b4a6f35 Complete refactoring of SelectStatement.SelectionInfo into DatabaseSelectionInfo 2018-01-15 22:28:43 +01:00
Gwendal Roué 33e8d0875d Remove update hook when no observer is active. Allow truncate optimization when deletions are not observed. 2018-01-14 19:34:11 +01:00
Gwendal Roué af8a6872d9 StatementCompilationAuthorizer never returns SQLITE_IGNORE for a "DROP XXX" statement (#267) 2017-10-30 18:12:57 +01:00
Gwendal Roué c4ad98426c Pass failing tests for "DROP VIEW" statements (#267) 2017-10-30 17:57:57 +01:00
Gwendal Roué 8a213af2ab Cleanup & whitespace 2017-10-30 12:25:12 +01:00
Gwendal Roué bdf943c3d9 Fix SPM compilation error 2017-10-29 15:45:35 +01:00
Gwendal Roué 7f10bf4005 Cleanup 2017-10-29 13:27:38 +01:00
Gwendal Roué e486437865 Split Database.swift 2017-10-29 10:43:22 +01:00