database

package
v1.11.92 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchColumnNames

func FetchColumnNames(db *sqlx.DB, tableName string) ([]string, error)

func InsertStruct

func InsertStruct(db *sqlx.DB, tableName string, data any) error

InsertStruct inserts a struct's fields into the specified table.

func InsertTrxStruct added in v1.8.69

func InsertTrxStruct(db *sqlx.Tx, tableName string, data any) error

func ParseRows

func ParseRows(rows *sql.Rows, dest interface{}) error

func PostgresConn

func PostgresConn() (*sqlx.DB, error)

func UpdateStruct

func UpdateStruct(db *sqlx.DB, tableName string, data any, conditionField string, conditionValue interface{}) error

UpdateStruct updates fields in the specified table for a given struct based on a condition.

func UpdateTrxStruct added in v1.8.69

func UpdateTrxStruct(db *sqlx.Tx, tableName string, data any, conditionField string, conditionValue interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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