sqlite

package
v0.0.0-...-506e473 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Columns

type Columns []string

func (Columns) String

func (cols Columns) String() string

type Database

type Database struct {
	*sql.DB
	// contains filtered or unexported fields
}

func MemoryDB

func MemoryDB() *Database

func Open

func Open(path string) *Database

func (*Database) Get

func (db *Database) Get(id string) (loom.Ent, error)

func (*Database) Iter

func (db *Database) Iter() iter.Seq[loom.Ent]

func (*Database) New

func (db *Database) New(app *loom.App, opts ...loom.EntOpt) (loom.Ent, error)

func (*Database) Table

func (db *Database) Table(t reflect.Type) (*Table, error)

type Entity

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

func (*Entity) App

func (ent *Entity) App() *loom.App

func (*Entity) Get

func (ent *Entity) Get(t reflect.Type) (any, error)

func (*Entity) ID

func (ent *Entity) ID() string

func (*Entity) Set

func (ent *Entity) Set(t reflect.Type, data any) error

func (*Entity) Spawn

func (ent *Entity) Spawn(opts ...loom.EntOpt) error

type Field

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

func (Field) Addrs

func (field Field) Addrs() []any

func (Field) Data

func (field Field) Data() any

func (Field) IsJSON

func (field Field) IsJSON() bool

func (Field) Scan

func (field Field) Scan(src any) error

func (Field) Value

func (field Field) Value() (driver.Value, error)

type Table

type Table struct {
	*Database
	Name string
	Type reflect.Type
	// contains filtered or unexported fields
}

func (*Table) Assignments

func (t *Table) Assignments() string

func (*Table) Columns

func (t *Table) Columns() Columns

func (*Table) Placeholders

func (t *Table) Placeholders() string

func (*Table) Select

func (t *Table) Select(id string) (any, error)

func (*Table) Upsert

func (t *Table) Upsert(id string, data any) error

Jump to

Keyboard shortcuts

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