orm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPragmaEmpty

func IsPragmaEmpty(rows map[string]string) bool

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

Uses *sqlx.DB under the hood

func NewDB

func NewDB(db *sqlx.DB) *DB

Create new database from *sqlx.DB

func (*DB) Exec

func (db *DB) Exec(query string, args ...any) error

func (*DB) HealthCheck

func (db *DB) HealthCheck() error

func (*DB) PragmaOf

func (db *DB) PragmaOf(name string) (map[string]string, error)

func (*DB) Raw

func (db *DB) Raw() *sqlx.DB

In case you want to directly access the internal *sqlx.DB

func (*DB) RegisterTables

func (db *DB) RegisterTables(tables ...tables.Table) *DB

Adds the tables into internal memory for use

func (*DB) ReplaceTables

func (db *DB) ReplaceTables(tables ...tables.Table) *DB

Replace the internal memory tables

func (*DB) Select

func (db *DB) Select(columns interface{}, query string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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