module JSDOM.Generated.IDBKeyRange
(only, only_, lowerBound, lowerBound_, upperBound, upperBound_,
bound, bound_, includes, includes_, getLower, getUpper,
getLowerOpen, getUpperOpen, IDBKeyRange(..), gTypeIDBKeyRange)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName)
import JSDOM.Enums
only ::
(MonadDOM m, ToJSVal value) =>
IDBKeyRange -> value -> m IDBKeyRange
only self value
= liftDOM
((self ^. jsf "only" [toJSVal value]) >>= fromJSValUnchecked)
only_ ::
(MonadDOM m, ToJSVal value) => IDBKeyRange -> value -> m ()
only_ self value
= liftDOM (void (self ^. jsf "only" [toJSVal value]))
lowerBound ::
(MonadDOM m, ToJSVal lower) =>
IDBKeyRange -> lower -> Bool -> m IDBKeyRange
lowerBound self lower open
= liftDOM
((self ^. jsf "lowerBound" [toJSVal lower, toJSVal open]) >>=
fromJSValUnchecked)
lowerBound_ ::
(MonadDOM m, ToJSVal lower) => IDBKeyRange -> lower -> Bool -> m ()
lowerBound_ self lower open
= liftDOM
(void (self ^. jsf "lowerBound" [toJSVal lower, toJSVal open]))
upperBound ::
(MonadDOM m, ToJSVal upper) =>
IDBKeyRange -> upper -> Bool -> m IDBKeyRange
upperBound self upper open
= liftDOM
((self ^. jsf "upperBound" [toJSVal upper, toJSVal open]) >>=
fromJSValUnchecked)
upperBound_ ::
(MonadDOM m, ToJSVal upper) => IDBKeyRange -> upper -> Bool -> m ()
upperBound_ self upper open
= liftDOM
(void (self ^. jsf "upperBound" [toJSVal upper, toJSVal open]))
bound ::
(MonadDOM m, ToJSVal lower, ToJSVal upper) =>
IDBKeyRange -> lower -> upper -> Bool -> Bool -> m IDBKeyRange
bound self lower upper lowerOpen upperOpen
= liftDOM
((self ^. jsf "bound"
[toJSVal lower, toJSVal upper, toJSVal lowerOpen,
toJSVal upperOpen])
>>= fromJSValUnchecked)
bound_ ::
(MonadDOM m, ToJSVal lower, ToJSVal upper) =>
IDBKeyRange -> lower -> upper -> Bool -> Bool -> m ()
bound_ self lower upper lowerOpen upperOpen
= liftDOM
(void
(self ^. jsf "bound"
[toJSVal lower, toJSVal upper, toJSVal lowerOpen,
toJSVal upperOpen]))
includes ::
(MonadDOM m, ToJSVal key) => IDBKeyRange -> key -> m Bool
includes self key
= liftDOM ((self ^. jsf "includes" [toJSVal key]) >>= valToBool)
includes_ ::
(MonadDOM m, ToJSVal key) => IDBKeyRange -> key -> m ()
includes_ self key
= liftDOM (void (self ^. jsf "includes" [toJSVal key]))
getLower :: (MonadDOM m) => IDBKeyRange -> m JSVal
getLower self = liftDOM ((self ^. js "lower") >>= toJSVal)
getUpper :: (MonadDOM m) => IDBKeyRange -> m JSVal
getUpper self = liftDOM ((self ^. js "upper") >>= toJSVal)
getLowerOpen :: (MonadDOM m) => IDBKeyRange -> m Bool
getLowerOpen self
= liftDOM ((self ^. js "lowerOpen") >>= valToBool)
getUpperOpen :: (MonadDOM m) => IDBKeyRange -> m Bool
getUpperOpen self
= liftDOM ((self ^. js "upperOpen") >>= valToBool)