bulk

package
v0.9.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(db *gorm.DB, query string, n int, rowfunc RowFunc) error

Import creates records in bulk

func ImportInChunks added in v0.9.24

func ImportInChunks(db *gorm.DB, query string, n int, chunks int, rowfunc RowFunc) error

Import creates records in bulk and split by chunks

Types

type Row

type Row []interface{}

Row contains bulk import row data

type RowFunc

type RowFunc func(int) Row

RowFunc iterates over imported records

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL