Hide

YetaWF.DataProvider.PostgreSQL Package Documentation

Display
Print

YetaWF.DataProvider.PostgreSQL.SQLModuleObject<KEY,OBJTYPE>.ImportChunkAsync Method

Imports data into the data provider.

Class: YetaWF.DataProvider.PostgreSQL.SQLModuleObject<KEY,OBJTYPE>
Namespace: YetaWF.DataProvider.PostgreSQL
Assembly: YetaWF.DataProvider.PostgreSQL

Syntax

public Task ImportChunkAsync(
    int chunk,
    YetaWF.Core.Serializers.SerializableList<YetaWF.Core.Packages.SerializableFile> fileList,
    object obj );

Parameters

chunk

The zero-based chunk number as data is imported. The first call when importing begins specifies 0 as chunk number.

fileList

A collection of files to be imported. Files are automatically imported, so the data provider doesn't have to process this collection.

obj

The data to be imported.

Remarks

The ImportChunkAsync method is called to import data for site restores, page and module imports.

When a data provider is called to import data, it is called repeatedly until no more data is available. Each time it is called, it is expected to import the chunk of data defined by obj. Each time ImportChunkAsync method is called, the zero-based chunk number chunk is incremented.

The obj parameter is provided without type but should be cast to YetaWF.Core.Serializers.SerializableList<OBJTYPE> as it is a collection of records to import. All records in the collection must be imported.

See Also YetaWF.DataProvider.PostgreSQL.SQLModuleObject<KEY,OBJTYPE> ClassYetaWF.DataProvider.PostgreSQLYetaWF.Core