Dexie.Table
- Package
- purescript-dexie
- Repository
- mushishi78/purescript-dexie
#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.
#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
bulkDelete :: forall key. IndexedValue key => Array key -> Table -> Promise Unit
Documentation: dexie.org/docs/Table/Table.bulkDelete()
#bulkGet Source
bulkGet :: forall key. IndexedValue key => Array key -> Table -> Promise (Array (Maybe Foreign))
Documentation: dexie.org/docs/Table/Table.bulkGet()
#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
onCreating :: forall me key. IndexedValue key => MonadEffect me => (OnCreatingArgs -> Effect (Maybe key)) -> Table -> me (Effect Unit)
Documentation: dexie.org/docs/Table/Table.hook('creating')
#onDeleting Source
onDeleting :: forall me. MonadEffect me => (OnDeletingArgs -> Effect Unit) -> Table -> me (Effect Unit)
Documentation: dexie.org/docs/Table/Table.hook('deleting')
#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
orderBy :: forall me. MonadEffect me => String -> Table -> me Collection
Documentation: dexie.org/docs/Table/Table.orderBy()
#put Source
put :: forall item key. IndexedValue key => item -> Maybe key -> Table -> Promise Foreign
Documentation: dexie.org/docs/Table/Table.put()
#reverse Source
reverse :: forall me. MonadEffect me => Table -> me Collection
Documentation: dexie.org/docs/Table/Table.reverse()
#toCollection Source
toCollection :: forall me. MonadEffect me => Table -> me Collection
Documentation: dexie.org/docs/Table/Table.toCollection()
#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()