Module

Database.IndexedDB.IDBKeyRange

Package
purescript-indexeddb
Repository
truqu/purescript-indexedDB

A key has an associated type which is one of: number, date, string, binary, or array.

#Open Source

type Open = Boolean

Type alias for open

#only Source

only :: forall a. IDBKey a => a -> KeyRange

Returns a new IDBKeyRange spanning only key.

#lowerBound Source

lowerBound :: forall a. IDBKey a => a -> Open -> KeyRange

Returns a new IDBKeyRange starting at key with no upper bound. If Open is true, key is not included in the range.

#upperBound Source

upperBound :: forall a. IDBKey a => a -> Open -> KeyRange

Returns a new IDBKeyRange with no lower bound and ending at key. If Open is true, key is not included in the range.

#bound Source

bound :: forall key. IDBKey key => { lower :: key, lowerOpen :: Boolean, upper :: key, upperOpen :: Boolean } -> Maybe KeyRange

Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.

It throws a DataError if the bound is invalid.

#includes Source

includes :: forall range key. IDBKey key => IDBKeyRange range => range -> key -> Boolean

Returns true if key is included in the range, and false otherwise.

#lower Source

lower :: KeyRange -> Maybe Key

Returns lower bound if any.

#upper Source

upper :: KeyRange -> Maybe Key

Returns upper bound if any.

#lowerOpen Source

lowerOpen :: KeyRange -> Boolean

Returns true if the lower open flag is set, false otherwise.

#upperOpen Source

upperOpen :: KeyRange -> Boolean

Returns true if the upper open flag is set, false otherwise.