Merge pull request #202 from zmeyc/pr_spm1

SPM support
This commit is contained in:
Gwendal Roué authored and GitHub committed 2017-04-11 13:37:23 +02:00
commit b06f76512d
18 files changed
+72 -1

No files matched your search

+4
View File
@@ -103,3 +103,7 @@ SQLiteCustom/GRDBCustomSQLite-USER.xcconfig
# CocoaPods test
Tests/CocoaPods/GRDBiOS/Podfile.lock
Tests/CocoaPods/GRDBiOS/Pods
# SPM build directory
.build
+4
View File
@@ -1,5 +1,9 @@
import Foundation
#if SWIFT_PACKAGE
import CSQLite
#endif
/// Configuration for a DatabaseQueue or DatabasePool.
public struct Configuration {
+4
View File
@@ -1,5 +1,9 @@
import Foundation
#if SWIFT_PACKAGE
import CSQLite
#endif
/// A raw SQLite connection, suitable for the SQLite C API.
public typealias SQLiteConnection = OpaquePointer
+4
View File
@@ -1,5 +1,9 @@
import Foundation
#if SWIFT_PACKAGE
import CSQLite
#endif
public struct ResultCode : RawRepresentable, Equatable, CustomStringConvertible {
public let rawValue: Int32
+4
View File
@@ -4,6 +4,10 @@ import Foundation
import UIKit
#endif
#if SWIFT_PACKAGE
import CSQLite
#endif
/// A DatabasePool grants concurrent accesses to an SQLite database.
public final class DatabasePool {
+4
View File
@@ -1,3 +1,7 @@
#if SWIFT_PACKAGE
import CSQLite
#endif
/// The protocol for all types that can fetch values from a database.
///
/// It is adopted by DatabaseQueue and DatabasePool.
+4
View File
@@ -1,5 +1,9 @@
import Foundation
#if SWIFT_PACKAGE
import CSQLite
#endif
// MARK: - DatabaseValue
/// DatabaseValue is the intermediate type between SQLite and your values.
+4
View File
@@ -1,5 +1,9 @@
import Foundation
#if SWIFT_PACKAGE
import CSQLite
#endif
/// A database row.
public final class Row {
+2
View File
@@ -1,3 +1,5 @@
import Foundation
/// LayoutedColumnMapping is a type that supports the RowAdapter protocol.
public struct LayoutedColumnMapping {
/// An array of (baseIndex, mappedName) pairs, where baseIndex is the index
+6
View File
@@ -1,3 +1,9 @@
import Dispatch
#if SWIFT_PACKAGE
import CSQLite
#endif
/// SchedulingWatchdog makes sure that databases connections are used on correct
/// dispatch queues, and warns the user with a fatal error whenever she misuses
/// a database connection.
+4
View File
@@ -1,5 +1,9 @@
import Foundation
#if SWIFT_PACKAGE
import CSQLite
#endif
/// A raw SQLite statement, suitable for the SQLite C API.
public typealias SQLiteStatement = OpaquePointer
@@ -1,3 +1,7 @@
#if SWIFT_PACKAGE
import CSQLite
#endif
/// When a type adopts both DatabaseValueConvertible and
/// StatementColumnConvertible, it is granted with faster access to the SQLite
/// database values.
@@ -1,3 +1,5 @@
import Foundation
/// DatabaseValueConvertible is free for ReferenceConvertible types whose
/// ReferenceType is itself DatabaseValueConvertible.
///
@@ -1,3 +1,7 @@
#if SWIFT_PACKAGE
import CSQLite
#endif
// MARK: - Value Types
/// Bool adopts DatabaseValueConvertible and StatementColumnConvertible.
+3
View File
@@ -1,5 +1,8 @@
import Foundation
#if SWIFT_PACKAGE
import CSQLite
#endif
// MARK: - Public
@@ -1,3 +1,4 @@
import Foundation
#if os(iOS)
import UIKit
#endif
+5 -1
View File
@@ -38,7 +38,7 @@ MAX_IOS_DESTINATION = "platform=iOS Simulator,name=iPhone 7,OS=10.3"
# We test framework test suites, and if GRBD can be installed in an application:
test: test_framework test_install
test_framework: test_framework_GRDB test_framework_GRDBCustom test_framework_GRDBCipher
test_framework: test_framework_GRDB test_framework_GRDBCustom test_framework_GRDBCipher test_framework_SPM
test_framework_GRDB: test_framework_GRDBOSX test_framework_GRDBWatchOS test_framework_GRDBiOS
test_framework_GRDBCustom: test_framework_GRDBCustomSQLiteOSX test_framework_GRDBCustomSQLiteiOS
test_framework_GRDBCipher: test_framework_GRDBCipherOSX test_framework_GRDBCipheriOS
@@ -117,6 +117,10 @@ test_framework_GRDBCipheriOS_minTarget: SQLCipher
-destination $(MIN_IOS_DESTINATION) \
$(TEST_ACTIONS)
test_framework_SPM:
swift package clean
swift build
test_install_manual:
xcodebuild \
-project DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj \
+9
View File
@@ -0,0 +1,9 @@
import PackageDescription
let package = Package(
name: "GRDB",
dependencies: [
.Package(url: "https://github.com/groue/CSQLite.git", majorVersion: 0)
],
exclude: ["GRDB.xcworkspace", "Playgrounds", "SQLCipher", "SQLiteCustom", "Support", "DemoApps", "Tests", "Documentation"]
)