From 29ef1b70d57dcae4e5ecae6ae8a4e7a49d2a27f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 17 Jul 2015 07:53:22 +0200 Subject: [PATCH] Remove unused Bindings initializer --- GRDB/Bindings.swift | 14 -------------- GRDB/RowModel.swift | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/GRDB/Bindings.swift b/GRDB/Bindings.swift index db2276b5f..b873f8894 100644 --- a/GRDB/Bindings.swift +++ b/GRDB/Bindings.swift @@ -66,20 +66,6 @@ public struct Bindings { impl = BindingsArrayImpl(values: Array(sequence)) } - /** - Initializes bindings from a sequence of values. - - let values: [String] = ["foo", "bar", "baz"] - db.execute("INSERT ... (?,?,?)", bindings: Bindings(values)) - - - parameter sequence: A sequence of values that adopt the - DatabaseValueConvertible protocol. - - returns: A Bindings. - */ - public init(_ sequence: Sequence) { - impl = BindingsArrayImpl(values: sequence.map { $0 }) - } - /** Initializes bindings from an NSArray. diff --git a/GRDB/RowModel.swift b/GRDB/RowModel.swift index 1cf52d582..633e69fd2 100644 --- a/GRDB/RowModel.swift +++ b/GRDB/RowModel.swift @@ -534,7 +534,7 @@ public class RowModel { // Delete let deleteStatement = try DataMapper.deleteStatement(db, tableName: databaseTable.name, conditionColumns: Array(primaryKeyDictionary.keys)) - let bindings = Bindings(Array(primaryKeyDictionary.values)) + let bindings = Bindings(primaryKeyDictionary.values) try deleteStatement.execute(bindings: bindings) }