Documentation
¶
Rendered for js/wasm
Index ¶
- Variables
- type Batch
- type DB
- type Index
- type Mode
- type Store
- func (s *Store) Add(key, value any) error
- func (s *Store) Batch() *Batch
- func (s *Store) Clear() error
- func (s *Store) Count() (int, error)
- func (s *Store) Delete(key any) error
- func (s *Store) Get(key any) (*js.Value, error)
- func (s *Store) GetAll() (*js.Value, error)
- func (s *Store) Index(name string) *Index
- func (s *Store) NewIndex(name string) *Index
- func (s *Store) Put(key any, value any) error
- type StoreConfig
- type Transaction
- type Upgrade
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IndexedDB = js.Global().Get("indexedDB") Object = js.Global().Get("Object") Array = js.Global().Get("Array") )
View Source
var ( ErrValueNotFound = errors.New("value not found") ErrKeyInvalid = errors.New("key is invalid") ErrValueInvalid = errors.New("value is invalid") ErrInvalidType = errors.New("type is not accepted") )
View Source
var Logger *slog.Logger
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase.
func (*DB) NewTransaction ¶
func (db *DB) NewTransaction(stores []string, mode Mode) (*Transaction, error)
type StoreConfig ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction.
func (*Transaction) Store ¶
func (tx *Transaction) Store(name string) *Store
type Upgrade ¶
type Upgrade struct {
// contains filtered or unexported fields
}
an upgrade is a database connection before needing it's objects/indexes established.
func (*Upgrade) CreateStore ¶
deprecated use `NewStore` instead.
Click to show internal directories.
Click to hide internal directories.