database

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package database provides low-level database connectivity and helpers used by the DAO layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func Connect

func Connect() *DB

func ConnectToNamedDB

func ConnectToNamedDB(name string) *DB

func (*DB) Backup

func (db *DB) Backup(loc string)

func (*DB) Count

func (db *DB) Count(data any) (int, error)

func (*DB) CountWhere

func (db *DB) CountWhere(fieldName string, value any, to any) (int, error)

func (*DB) Create

func (db *DB) Create(data any) error

func (*DB) Delete

func (db *DB) Delete(data any) error

func (*DB) Disconnect

func (db *DB) Disconnect()

func (*DB) Drop

func (db *DB) Drop(data any) error

func (*DB) GetAll

func (db *DB) GetAll(to any, options ...func(*index.Options)) error

func (*DB) Reconnect added in v1.2.30

func (db *DB) Reconnect()

func (*DB) Retrieve

func (db *DB) Retrieve(fieldName string, value, to any) error

func (*DB) Update

func (db *DB) Update(data any) error

Jump to

Keyboard shortcuts

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