database

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: GPL-3.0 Imports: 14 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 interface{}) error

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

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 interface{}, conditionField string, conditionValue interface{}) error

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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