Skip to content

PostgreSQL binary import

Jacek Hełka edited this page Mar 31, 2024 · 2 revisions

This feature is available in PostgreSQL extensions package: DbFun.MsSql.

To make it work, implement configuration with DbFun.Npgsql.Builders package instead of DbFun.Core.Builders, then, create bulk importer:

let bulkImport = BulkImportBuilder()

You can define bulk import functions, using importer WriteToServer simple way:

let bulkInsertBlogs = bulkImport.WriteToServer<Blog>()

or using dedicated param specifiers:

let bulkInsertUsers = bulkImport.WriteToServer(
    BulkImportParams.Tuple<string, string, string, byte array>("id", "name", "email", "avatar"), 
    "userprofile")

Clone this wiki locally