Module

Dexie.Table

Package
purescript-dexie
Repository
mushishi78/purescript-dexie

#OnCreatingArgs Source

type OnCreatingArgs = { item :: Foreign, primaryKey :: Nullable Foreign, setOnError :: (Error -> Effect Unit) -> Effect Unit, setOnSuccess :: (Foreign -> Effect Unit) -> Effect Unit, transaction :: Transaction }

First argument given to callback with onCreating.

#OnDeletingArgs Source

type OnDeletingArgs = { item :: Foreign, primaryKey :: Foreign, setOnError :: (Error -> Effect Unit) -> Effect Unit, setOnSuccess :: Effect Unit -> Effect Unit, transaction :: Transaction }

First argument given to callback with onDeleting.

#OnUpdatingArgs Source

type OnUpdatingArgs = { item :: Foreign, modifications :: Foreign, primaryKey :: Foreign, setOnError :: (Error -> Effect Unit) -> Effect Unit, setOnSuccess :: (Foreign -> Effect Unit) -> Effect Unit, transaction :: Transaction }

First argument given to callback with onUpdating.

#add Source

add :: forall item key. IndexedValue key => item -> Maybe key -> Table -> Promise Foreign

Documentation: dexie.org/docs/Table/Table.add()

#bulkAdd Source

bulkAdd :: forall item key. IndexedValue key => Array item -> Maybe (Array key) -> Table -> Promise (Array Foreign)

Documentation: dexie.org/docs/Table/Table.bulkAdd()

#bulkDelete Source

#bulkGet Source

#bulkPut Source

bulkPut :: forall item key. IndexedValue key => Array item -> Maybe (Array key) -> Table -> Promise (Array Foreign)

Documentation: dexie.org/docs/Table/Table.bulkPut()

#delete Source

delete :: forall key. IndexedValue key => key -> Table -> Promise Unit

Documentation: dexie.org/docs/Table/Table.delete()

#filter Source

filter :: forall me. MonadEffect me => (Foreign -> Boolean) -> Table -> me Collection

Documentation: dexie.org/docs/Table/Table.filter()

#get Source

get :: forall key. IndexedValue key => key -> Table -> Promise (Maybe Foreign)

Documentation: dexie.org/docs/Table/Table.get()

#onCreating Source

#onReading Source

onReading :: forall me item. MonadEffect me => (Foreign -> Effect item) -> Table -> me (Effect Unit)

Documentation: dexie.org/docs/Table/Table.hook('reading')

#onUpdating Source

onUpdating :: forall me item. MonadEffect me => (OnUpdatingArgs -> Effect (Maybe item)) -> Table -> me (Effect Unit)

Documentation: dexie.org/docs/Table/Table.hook('updating')

#limit Source

limit :: forall me. MonadEffect me => Int -> Table -> me Collection

Documentation: dexie.org/docs/Table/Table.limit()

#name Source

name :: forall me. MonadEffect me => Table -> me String

Documentation: dexie.org/docs/Table/Table.name

#offset Source

offset :: forall me. MonadEffect me => Int -> Table -> me Collection

Documentation: dexie.org/docs/Table/Table.offset()

#orderBy Source

#put Source

put :: forall item key. IndexedValue key => item -> Maybe key -> Table -> Promise Foreign

Documentation: dexie.org/docs/Table/Table.put()

#reverse Source

#toCollection Source

#update Source

update :: forall key changes. IndexedValue key => key -> changes -> Table -> Promise Int

Documentation: dexie.org/docs/Table/Table.update()

#whereClause Source

whereClause :: forall me indexName. IndexName indexName => MonadEffect me => indexName -> Table -> me WhereClause

Intended for chanined where clauses. eg.

result <- Table.whereClause "age" foo >>= WhereClause.above 18 >>= Collection.toArray

Documentation: dexie.org/docs/Table/Table.where()

#whereValues Source

whereValues :: forall me values. MonadEffect me => values -> Table -> me Collection

Intended to be used with an object of key valuess. e.g.

result <- Table.whereValues { title: "Sir", age: 18 } foo >>= Collection.toArray

Documentation: dexie.org/docs/Table/Table.where()

#add_ Source

add_ :: forall item key. IndexedValue key => item -> Maybe key -> Table -> Promise Unit

Version of add that does not return the id of the item added

#put_ Source

put_ :: forall item key. IndexedValue key => item -> Maybe key -> Table -> Promise Unit

Version of put that does not return the id of the item updated

#update_ Source

update_ :: forall key changes. IndexedValue key => key -> changes -> Table -> Promise Unit

Version of put that does not return the id of the item updated