InsertInterface
public protocol InsertInterface
Convenient interface for inserting
-
Execute inserting with
TableEncodableobject on specific(or all) propertiesNote that it will run embedded transaction while objects.count>1.
The embedded transaction means that it will run a transaction if it’s not in other transaction, otherwise it will be executed within the existing transaction.Throws
ErrorDeclaration
Swift
func insert<Object: TableEncodable>(Parameters
objectsTable encodable object
propertyConvertibleListPropertyorCodingTableKeylisttableTable name
-
Execute inserting with
TableEncodableobject on specific(or all) propertiesNote that it will run embedded transaction while objects.count>1.
The embedded transaction means that it will run a transaction if it’s not in other transaction, otherwise it will be executed within the existing transaction.Throws
ErrorDeclaration
Swift
func insert<Object: TableEncodable>(Parameters
objectsTable encodable object
propertyConvertibleListPropertyorCodingTableKeylisttableTable name
-
Execute inserting or replacing with
TableEncodableobject on specific(or all) properties.
It will replace the original row while they have same primary key or row id.Note that it will run embedded transaction while objects.count>1.
The embedded transaction means that it will run a transaction if it’s not in other transaction, otherwise it will be executed within the existing transaction.Throws
ErrorDeclaration
Swift
func insertOrReplace<Object: TableEncodable>(Parameters
objectsTable encodable object
propertyConvertibleListPropertyorCodingTableKeylisttableTable name
-
Execute inserting or replacing with
TableEncodableobject on specific(or all) properties.
It will replace the original row while they have same primary key or row id.Note that it will run embedded transaction while objects.count>1.
The embedded transaction means that it will run a transaction if it’s not in other transaction, otherwise it will be executed within the existing transaction.Throws
ErrorDeclaration
Swift
func insertOrReplace<Object: TableEncodable>(Parameters
objectsTable encodable object
propertyConvertibleListPropertyorCodingTableKeylisttableTable name
View on GitHub
Install in Dash
InsertInterface Protocol Reference