Documentation
¶
Rendered for js/wasm
Index ¶
- func CheckCondition(val js.Value, cond orm.Condition) bool
- func InitDB(dbName string, idg idGenerator, logger func(...any), structTables ...any) *orm.DB
- func MapResult(val js.Value, m orm.Model) error
- func ProcessCursorRequest(req js.Value, onNext func(cursor js.Value) bool) error
- func ProcessRequest(req js.Value) (js.Value, error)
- type IndexDBAdapter
- func (d *IndexDBAdapter) Close() error
- func (d *IndexDBAdapter) Exec(query string, args ...any) error
- func (d *IndexDBAdapter) Execute(q orm.Query, m orm.Model, factory func() orm.Model, each func(orm.Model)) error
- func (d *IndexDBAdapter) GetNewID() string
- func (d *IndexDBAdapter) Initialize(structTables ...any)
- func (d *IndexDBAdapter) Query(query string, args ...any) (orm.Rows, error)
- func (d *IndexDBAdapter) QueryRow(query string, args ...any) orm.Scanner
- func (d *IndexDBAdapter) TableExist(table_name string) bool
- type IndexDBCompiler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCondition ¶ added in v0.1.28
CheckCondition checks if a JS value satisfies a condition
func InitDB ¶ added in v0.1.25
InitDB initializes the IndexedDB database and returns an *orm.DB instance.
func ProcessCursorRequest ¶ added in v0.1.28
ProcessCursorRequest handles an IndexedDB cursor request (openCursor). It iterates over the cursor and calls the provided callback for each item.
Types ¶
type IndexDBAdapter ¶ added in v0.1.24
type IndexDBAdapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶ added in v0.1.24
func NewAdapter(dbName string, idg idGenerator, logger func(...any)) *IndexDBAdapter
NewAdapter creates a new IndexDBAdapter.
func (*IndexDBAdapter) Close ¶ added in v0.1.28
func (d *IndexDBAdapter) Close() error
Close implements orm.Executor
func (*IndexDBAdapter) Exec ¶ added in v0.1.28
func (d *IndexDBAdapter) Exec(query string, args ...any) error
Exec implements orm.Executor
func (*IndexDBAdapter) Execute ¶ added in v0.1.24
func (d *IndexDBAdapter) Execute(q orm.Query, m orm.Model, factory func() orm.Model, each func(orm.Model)) error
Execute implements orm.Adapter for IndexDB.
func (*IndexDBAdapter) GetNewID ¶ added in v0.1.24
func (d *IndexDBAdapter) GetNewID() string
Helper to access the ID generator
func (*IndexDBAdapter) Initialize ¶ added in v0.1.25
func (d *IndexDBAdapter) Initialize(structTables ...any)
Initialize initializes the IndexedDB database and creates object stores based on the provided structs.
func (*IndexDBAdapter) QueryRow ¶ added in v0.1.28
func (d *IndexDBAdapter) QueryRow(query string, args ...any) orm.Scanner
QueryRow implements orm.Executor
func (*IndexDBAdapter) TableExist ¶ added in v0.1.24
func (d *IndexDBAdapter) TableExist(table_name string) bool
TableExist checks if a table exists in the database
Click to show internal directories.
Click to hide internal directories.