ImportableBuilder
public protocol ImportableBuilder
Create the importable object with tablename and json information.
-
The record to import.
Declaration
Swift
associatedtype Importable : RecordImportable
-
Setup context to import before all imports.
Declaration
Swift
func setup(in callback: @escaping () -> Void)
Parameters
callback
execut all import in the callback context, must be synchrone
-
Build one importable.
Declaration
Swift
func build(_ tableName: String, _ json: JSON) -> Importable?
-
Called when the process finish.
Declaration
Swift
func teardown()
-
Parse JSON as importable record object.
Declaration
Swift
func parseArray(json: JSON, using mapper: AttributeValueMapper) throws -> [Importable]
-
recordInitializer(_:
Extension method_: ) call setup, build and teardown on one call. Not optimized if multiple import.
Declaration
Swift
func recordInitializer(_ tableName: String, _ json: JSON) -> Importable?