Skip to content

Commit

Permalink
Merge pull request #1600 from groue/dev/GRDB7-stop-exporting-SQLite
Browse files Browse the repository at this point in the history
GRDB 7: Rename the CSQLite module to GRDBSQLite, and stop exporting the C SQLite functions.
  • Loading branch information
groue authored Aug 24, 2024
2 parents be708ee + 9e1ff42 commit 3245eb8
Show file tree
Hide file tree
Showing 61 changed files with 430 additions and 158 deletions.
134 changes: 0 additions & 134 deletions .swiftpm/xcode/xcshareddata/xcschemes/GRDB-Package.xcscheme

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import WatchKit
import Foundation
import GRDB
import SQLite3

class InterfaceController: WKInterfaceController {

Expand Down
4 changes: 0 additions & 4 deletions GRDB.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@
56A2388B1B9C75030082EB20 /* Statement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A238781B9C75030082EB20 /* Statement.swift */; };
56A238931B9C750B0082EB20 /* DatabaseMigrator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A238921B9C750B0082EB20 /* DatabaseMigrator.swift */; };
56A238A41B9C753B0082EB20 /* Record.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A238A11B9C753B0082EB20 /* Record.swift */; };
56A2FA3624424D2A00E97D23 /* Export.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A2FA3524424D2A00E97D23 /* Export.swift */; };
56A5EF0F1EF7F20B00F03071 /* ForeignKeyInfoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A5EF0E1EF7F20B00F03071 /* ForeignKeyInfoTests.swift */; };
56A8C2301D1914540096E9D4 /* UUID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56A8C22F1D1914540096E9D4 /* UUID.swift */; };
56AACAA822ACED7100A40F2A /* Fetch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AACAA722ACED7100A40F2A /* Fetch.swift */; };
Expand Down Expand Up @@ -756,7 +755,6 @@
56A238921B9C750B0082EB20 /* DatabaseMigrator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseMigrator.swift; sourceTree = "<group>"; };
56A238A11B9C753B0082EB20 /* Record.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Record.swift; sourceTree = "<group>"; };
56A238B51B9CA2590082EB20 /* DatabaseTimestampTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseTimestampTests.swift; sourceTree = "<group>"; };
56A2FA3524424D2A00E97D23 /* Export.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Export.swift; sourceTree = "<group>"; };
56A4CDAF1D4234B200B1A9B9 /* SQLExpressionLiteralTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLExpressionLiteralTests.swift; sourceTree = "<group>"; };
56A5E4081BA2BCF900707640 /* RecordWithColumnNameManglingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecordWithColumnNameManglingTests.swift; sourceTree = "<group>"; };
56A5EF0E1EF7F20B00F03071 /* ForeignKeyInfoTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ForeignKeyInfoTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1740,7 +1738,6 @@
DC37742D19C8CC90004FCF85 /* GRDB */ = {
isa = PBXGroup;
children = (
56A2FA3524424D2A00E97D23 /* Export.swift */,
566DDE0C288D763C0000DCFB /* Fixits.swift */,
648704AD2B7E66390036480B /* PrivacyInfo.xcprivacy */,
56A2386F1B9C75030082EB20 /* Core */,
Expand Down Expand Up @@ -2226,7 +2223,6 @@
5617294E223533F40006E219 /* EncodableRecord.swift in Sources */,
56B7EE832863781300C0525F /* WALSnapshot.swift in Sources */,
5698AD181DAAD17A0056AF8C /* FTS5Tokenizer.swift in Sources */,
56A2FA3624424D2A00E97D23 /* Export.swift in Sources */,
56B964B11DA51D010002DA19 /* FTS5TokenizerDescriptor.swift in Sources */,
4E13D2F32769B87F0037588C /* DatabaseBackupProgress.swift in Sources */,
560A37A71C8FF6E500949E71 /* SerializedDatabase.swift in Sources */,
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Configuration.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Dispatch
import Foundation

Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Database+Schema.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

extension Database {
/// A cache for the available database schemas.
struct SchemaCache {
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Database+Statements.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

extension Database {
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Database.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// A raw SQLite connection, suitable for the SQLite C API.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/DatabaseCollation.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// `DatabaseCollation` is a custom string comparison function used by SQLite.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/DatabaseError.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// An SQLite result code.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/DatabaseFunction.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

/// A custom SQL function or aggregate.
///
/// ## Topics
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/DatabaseSnapshotPool.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#if SQLITE_ENABLE_SNAPSHOT || (!GRDBCUSTOMSQLITE && !GRDBCIPHER)
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

/// A database connection that allows concurrent accesses to an unchanging
/// database content, as it existed at the moment the snapshot was created.
///
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/DatabaseValue.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// A value stored in a database table.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Row.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// A database row.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/RowDecodingError.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

/// A key that is used to decode a value in a row
@usableFromInline
enum RowKey: Hashable, Sendable {
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Statement.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// A raw SQLite statement, suitable for the SQLite C API.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/StatementAuthorizer.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

#if canImport(string_h)
import string_h
#elseif os(Linux)
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/StatementColumnConvertible.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

/// A type that can decode itself from the low-level C interface to
/// SQLite results.
///
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Support/Foundation/Data.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// Data is convertible to and from DatabaseValue.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Support/Foundation/DatabaseDateComponents.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

/// A database value that holds date components.
Expand Down
9 changes: 9 additions & 0 deletions GRDB/Core/Support/Foundation/Date.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// Import C SQLite functions
#if SWIFT_PACKAGE
import GRDBSQLite
#elseif GRDBCIPHER
import SQLCipher
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
import SQLite3
#endif

import Foundation

#if !os(Linux)
Expand Down
Loading

0 comments on commit 3245eb8

Please sign in to comment.