Hide Database.configuration behind DatabaseQueue.configuration

This commit is contained in:
Gwendal Roué committed 2015-07-06 12:31:43 +02:00
1 parent 6b11f02ec6
commit 3587ae435c
3 files changed
+10 -7

No files matched your search

+3 -6
View File
@@ -36,12 +36,6 @@ You don't create a database directly. Instead, you use a DatabaseQueue:
*/
public final class Database {
// MARK: - Configuration
/// The database configuration
public let configuration: Configuration
// MARK: - Select Statements
/**
@@ -144,6 +138,9 @@ public final class Database {
// MARK: - Non public
/// The database configuration
let configuration: Configuration
/// The SQLite connection handle
let sqliteConnection = SQLiteConnection()
+6
View File
@@ -27,6 +27,12 @@ A Database Queue serializes access to an SQLite database.
*/
public final class DatabaseQueue {
// MARK: - Configuration
/// The database configuration
public var configuration: Configuration { return database.configuration }
// MARK: - Initializers
/**
+1 -1
View File
@@ -5,4 +5,4 @@
- [ ] Add bindings to SQLiteError, so that one known the value that could not be updated/inserted.
- [ ] Document why execute and fetch methods will never be added to DatabaseQueue, and one always has to execute a block. It is because code like `dbQueue.execute("INSERT..."); let id = dbQueue.lastInsertedRowID` would be *unsafe*.
- [ ] Pierlo complains that databaseDictionary returns a dictionary of values when updateFromDatabaseRow eats a Row. See if we can do something about that.
- [ ] db.fetch(RowModel.type, primaryKey: Bindings) in unsafe because there are chances that array bindings don't match the order of primary key columns. Rethink fetching by primary key for RowModels with primary keys that span accross multiple columns.
- [ ] db.fetch(RowModel.type, primaryKey: Bindings) in unsafe because there are chances that array bindings don't match the order of primary key columns. Rethink fetching by primary key for RowModels with primary keys that span accross multiple columns.