Hide

YetaWF.DataProvider.PostgreSQL Package Documentation

Display
Print

YetaWF.DataProvider.PostgreSQL.SQLPackageInit.ExportChunkAsync Method

Exports data from the data provider.

Class: YetaWF.DataProvider.PostgreSQL.SQLPackageInit
Namespace: YetaWF.DataProvider.PostgreSQL
Assembly: YetaWF.DataProvider.PostgreSQL

Syntax

public Task<YetaWF.Core.DataProvider.DataProviderExportChunk> ExportChunkAsync(
    int chunk,
    YetaWF.Core.Serializers.SerializableList<YetaWF.Core.Packages.SerializableFile> fileList );

Parameters

chunk

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

fileList

A collection of files. The data provider can add files to be exported to this collection when ExportChunkAsync is called.

Return Value

Returns a YetaWF.Core.DataProvider.DataProviderExportChunk object describing the data exported.

Remarks

The ExportChunkAsync method is called to export data for site backups, page and module exports.

When a data provider is called to export data, it is called repeatedly until YetaWF.Core.DataProvider.DataProviderExportChunk.More is returned as false. Each time it is called, it is expected to export a chunk of data. The amount of data, i.e., the chunk size, is determined by the data provider.

Each time ExportChunkAsync method is called, the zero-based chunk number chunk is incremented. The data provider returns data in an instance of the YetaWF.Core.DataProvider.DataProviderExportChunk object.

Files to be exported can be added to the fileList collection. Only data records need to be added to the returned YetaWF.Core.DataProvider.DataProviderExportChunk object.

See Also YetaWF.DataProvider.PostgreSQL.SQLPackageInit ClassYetaWF.DataProvider.PostgreSQLYetaWF.Core