db

package
v0.0.0-...-12c868c Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func Exec

func Exec(sql string, args ...any) (pgconn.CommandTag, error)

func Exists

func Exists(table string, conditions string, values ...any) bool

func Insert

func Insert(table string, columns []string, values [][]any) (int64, error)

func InsertOne

func InsertOne(table string, columns []string, values ...any) (int64, error)

func NoRows

func NoRows(err error) bool

func OpenDB

func OpenDB(dbURL string)

func Query

func Query(sql string, args ...any) (pgx.Rows, error)

func QueryRow

func QueryRow(sql string, args []any, scanTarget ...any) error

func QueryRowID

func QueryRowID(sql string, arg any, scanTarget ...any) error

Query row with 1 condition

Types

This section is empty.

Jump to

Keyboard shortcuts

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