GRDB.swift icon indicating copy to clipboard operation
GRDB.swift copied to clipboard

Strict table option only available in GRDBCUSTOMSQLITE

Open jcavar opened this issue 3 years ago • 1 comments

.strict table option is only available in custom SQLite builds. It seems that this was intentionally done here:

https://github.com/groue/GRDB.swift/pull/1133

I was wondering why is this only available in custom SQLite builds and not in OS build?

iOS 15.4.1 ships with 3.37.0, which supports it, so it might be behind availability check?

I am happy to make a PR, but just wanted to check for the approach before I do the work.

jcavar avatar Oct 12 '22 12:10 jcavar

Hello @jcavar,

Thanks for noticing that STRICT tables are available on iOS 15.4.1 👍 A pull request would be great!

This should be enough to enable the feature:

#if GRDBCUSTOMSQLITE || GRDBCIPHER
    public static let strict = TableOptions(rawValue: 1 << 3)
#else
    @available(iOS 15.4, macOS 12.4, tvOS 15.4, watchOS 8.5, *) // SQLite 3.37+
    public static let strict = TableOptions(rawValue: 1 << 3)
#endif

(Yes, let's enable STRICT tables for SQLCipher as well).

And if you have a little more time, please take a look at tests and documentation, in case they would need an update!

Thank you very much :-)

EDIT: the CONTRIBUTING file gives hints for entering the project.

groue avatar Oct 13 '22 08:10 groue

Any news, @jcavar?

groue avatar Oct 19 '22 09:10 groue

Hey @groue, sorry I've been little busy, but PR is now up.

jcavar avatar Oct 19 '22 14:10 jcavar

Fixed in v6.1.0 :-)

Thank you very much @jcavar 👍

groue avatar Oct 20 '22 12:10 groue