tests

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupDB

func SetupDB(logger func(...any), dbName ...string) (*orm.DB, *indexdb.IndexDBAdapter)

SetupDB creates a new IndexDB instance for testing Now returns *orm.DB

Types

type Product

type Product struct {
	IDProduct string
	Name      string
	Price     float64
}

TestProduct represents another sample struct for testing

func (*Product) Columns added in v0.1.24

func (p *Product) Columns() []string

func (*Product) Pointers added in v0.1.24

func (p *Product) Pointers() []any

func (Product) StructName

func (p Product) StructName() string

func (*Product) TableName added in v0.1.24

func (p *Product) TableName() string

ORM Model interface implementation

func (*Product) Values added in v0.1.24

func (p *Product) Values() []any

type User

type User struct {
	ID    string
	Name  string
	Email string
}

User represents a sample struct for testing table creation We need to implement orm.Model interface for User now

func (*User) Columns added in v0.1.24

func (u *User) Columns() []string

func (*User) Pointers added in v0.1.24

func (u *User) Pointers() []any

func (User) StructName

func (u User) StructName() string

func (*User) TableName added in v0.1.24

func (u *User) TableName() string

ORM Model interface implementation

func (*User) Values added in v0.1.24

func (u *User) Values() []any

Jump to

Keyboard shortcuts

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