mysql

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database[T any] struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase[T any](cfg map[string]string) (*Database[T], error)

func (*Database[T]) Close

func (m *Database[T]) Close() error

func (*Database[T]) Create

func (m *Database[T]) Create(tableName string, config map[string]database.Config) error

func (*Database[T]) CreateFromStruct

func (m *Database[T]) CreateFromStruct(tableName string, example any) error

func (*Database[T]) DeleteTable

func (m *Database[T]) DeleteTable(tableName string) error

func (*Database[T]) Exec

func (m *Database[T]) Exec(query string, args ...any) error

func (*Database[T]) GetTable

func (m *Database[T]) GetTable(tableName string, _ T) (database.Table[T], error)

type Table

type Table[T any] struct {
	// contains filtered or unexported fields
}

func (*Table[T]) Del

func (t *Table[T]) Del(val T, whereFields []string, _ time.Duration) error

func (*Table[T]) Get

func (t *Table[T]) Get(val T, whereFields []string, _ time.Duration) ([]T, error)

func (*Table[T]) Ins

func (t *Table[T]) Ins(val T, _ time.Duration) error

func (*Table[T]) Set

func (t *Table[T]) Set(val T, whereFields []string, _ time.Duration) error

Jump to

Keyboard shortcuts

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