postgres

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Code generated by RedSock CLI. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(cfg *resources.Postgres) (*sql.DB, error)

func ConnectToPostgres

func ConnectToPostgres() (*sql.DB, error)

func Migrate

func Migrate(cfg *resources.Postgres) error

func MigrateToPostgres

func MigrateToPostgres() error

Types

type DB

type DB interface {
	Prepare(query string) (*sql.Stmt, error)
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

	Exec(query string, args ...any) (sql.Result, error)
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)

	Query(query string, args ...any) (*sql.Rows, error)
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)

	QueryRow(query string, args ...any) *sql.Row
	QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}

Jump to

Keyboard shortcuts

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