mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
TODO GRDB7: remove painful optionals due to IGNORE
This commit is contained in:
1 parent
4abcbdf452
commit
b896923fd4
5 files changed
+21
No files matched your search
@@ -91,6 +91,7 @@ extension MutablePersistableRecord {
|
||||
|
||||
extension MutablePersistableRecord {
|
||||
#if GRDBCUSTOMSQLITE || GRDBCIPHER
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` statement, and returns a new record built
|
||||
/// from the inserted row.
|
||||
///
|
||||
@@ -122,6 +123,7 @@ extension MutablePersistableRecord {
|
||||
return try result.insertAndFetch(db, onConflict: conflictResolution, as: Self.self)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` statement, and returns a new record built
|
||||
/// from the inserted row.
|
||||
///
|
||||
@@ -264,6 +266,7 @@ extension MutablePersistableRecord {
|
||||
return success.returned
|
||||
}
|
||||
#else
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` statement, and returns a new record built
|
||||
/// from the inserted row.
|
||||
///
|
||||
@@ -296,6 +299,7 @@ extension MutablePersistableRecord {
|
||||
return try result.insertAndFetch(db, onConflict: conflictResolution, as: Self.self)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` statement, and returns a new record built
|
||||
/// from the inserted row.
|
||||
///
|
||||
|
||||
@@ -87,6 +87,7 @@ extension MutablePersistableRecord {
|
||||
|
||||
extension MutablePersistableRecord {
|
||||
#if GRDBCUSTOMSQLITE || GRDBCIPHER
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` or `UPDATE RETURNING` statement, and
|
||||
/// returns a new record built from the saved row.
|
||||
///
|
||||
@@ -121,6 +122,7 @@ extension MutablePersistableRecord {
|
||||
return try result.saveAndFetch(db, onConflict: conflictResolution, as: Self.self)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` or `UPDATE RETURNING` statement, and
|
||||
/// returns a new record built from the saved row.
|
||||
///
|
||||
@@ -209,6 +211,7 @@ extension MutablePersistableRecord {
|
||||
return success.returned
|
||||
}
|
||||
#else
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` or `UPDATE RETURNING` statement, and
|
||||
/// returns a new record built from the saved row.
|
||||
///
|
||||
@@ -244,6 +247,7 @@ extension MutablePersistableRecord {
|
||||
return try result.saveAndFetch(db, onConflict: conflictResolution, as: Self.self)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` or `UPDATE RETURNING` statement, and
|
||||
/// returns a new record built from the saved row.
|
||||
///
|
||||
|
||||
@@ -218,6 +218,7 @@ extension MutablePersistableRecord {
|
||||
|
||||
extension MutablePersistableRecord {
|
||||
#if GRDBCUSTOMSQLITE || GRDBCIPHER
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `UPDATE RETURNING` statement on all columns, and returns a
|
||||
/// new record built from the updated row.
|
||||
///
|
||||
@@ -241,6 +242,7 @@ extension MutablePersistableRecord {
|
||||
try updateAndFetch(db, onConflict: conflictResolution, as: Self.self)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `UPDATE RETURNING` statement on all columns, and returns a
|
||||
/// new record built from the updated row.
|
||||
///
|
||||
@@ -267,6 +269,7 @@ extension MutablePersistableRecord {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Modifies the record according to the provided `modify` closure, and
|
||||
/// executes an `UPDATE RETURNING` statement that updates the modified
|
||||
/// columns, if and only if the record was modified. The method returns a
|
||||
@@ -294,6 +297,7 @@ extension MutablePersistableRecord {
|
||||
try updateChangesAndFetch(db, onConflict: conflictResolution, as: Self.self, modify: modify)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Modifies the record according to the provided `modify` closure, and
|
||||
/// executes an `UPDATE RETURNING` statement that updates the modified
|
||||
/// columns, if and only if the record was modified. The method returns a
|
||||
@@ -478,6 +482,7 @@ extension MutablePersistableRecord {
|
||||
fetch: fetch)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Modifies the record according to the provided `modify` closure, and
|
||||
/// executes an `UPDATE RETURNING` statement that updates the modified
|
||||
/// columns, if and only if the record was modified. The method returns a
|
||||
@@ -514,6 +519,7 @@ extension MutablePersistableRecord {
|
||||
fetch: fetch)
|
||||
}
|
||||
#else
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `UPDATE RETURNING` statement on all columns, and returns a
|
||||
/// new record built from the updated row.
|
||||
///
|
||||
@@ -565,6 +571,7 @@ extension MutablePersistableRecord {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Modifies the record according to the provided `modify` closure, and
|
||||
/// executes an `UPDATE RETURNING` statement that updates the modified
|
||||
/// columns, if and only if the record was modified. The method returns a
|
||||
@@ -593,6 +600,7 @@ extension MutablePersistableRecord {
|
||||
try updateChangesAndFetch(db, onConflict: conflictResolution, as: Self.self, modify: modify)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Modifies the record according to the provided `modify` closure, and
|
||||
/// executes an `UPDATE RETURNING` statement that updates the modified
|
||||
/// columns, if and only if the record was modified. The method returns a
|
||||
@@ -781,6 +789,7 @@ extension MutablePersistableRecord {
|
||||
fetch: fetch)
|
||||
}
|
||||
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Modifies the record according to the provided `modify` closure, and
|
||||
/// executes an `UPDATE RETURNING` statement that updates the modified
|
||||
/// columns, if and only if the record was modified. The method returns a
|
||||
|
||||
@@ -56,6 +56,7 @@ extension PersistableRecord {
|
||||
|
||||
extension PersistableRecord {
|
||||
#if GRDBCUSTOMSQLITE || GRDBCIPHER
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` statement, and returns a new record built
|
||||
/// from the inserted row.
|
||||
///
|
||||
@@ -198,6 +199,7 @@ extension PersistableRecord {
|
||||
return success.returned
|
||||
}
|
||||
#else
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` statement, and returns a new record built
|
||||
/// from the inserted row.
|
||||
///
|
||||
|
||||
@@ -39,6 +39,7 @@ extension PersistableRecord {
|
||||
|
||||
extension PersistableRecord {
|
||||
#if GRDBCUSTOMSQLITE || GRDBCIPHER
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` or `UPDATE RETURNING` statement, and
|
||||
/// returns a new record built from the saved row.
|
||||
///
|
||||
@@ -127,6 +128,7 @@ extension PersistableRecord {
|
||||
return success.returned
|
||||
}
|
||||
#else
|
||||
// TODO: GRDB7 make it unable to return an optional
|
||||
/// Executes an `INSERT RETURNING` or `UPDATE RETURNING` statement, and
|
||||
/// returns a new record built from the saved row.
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user