dbio

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertRows

func InsertRows(
	d *pgxpool.Pool,
	tbl string,
	columns []string,
	rows [][]any,
) (int64, error)

InsertRows inserts a batch of rows into a table.

func NewDB

func NewDB(cfg config.Config) (*pgxpool.Pool, error)

NewDB creates a new connections pool to the database.

func NewGORM

func NewGORM(cfg config.Config) (*gorm.DB, error)

NewGORM creates a new GORM connection to the database.

func Truncate

func Truncate(d *pgxpool.Pool, tables []string) error

Truncate removes all data from the tables.

Types

This section is empty.

Jump to

Keyboard shortcuts

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