module JSDOM.Generated.IDBKeyRange
(only, only_, onlyUnchecked, lowerBound, lowerBound_,
lowerBoundUnchecked, upperBound, upperBound_, upperBoundUnchecked,
bound, bound_, boundUnchecked, getLower, getUpper, getLowerOpen,
getUpperOpen, IDBKeyRange, castToIDBKeyRange, gTypeIDBKeyRange)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import Data.Typeable (Typeable)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, new, array)
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) => IDBKeyRange -> JSVal -> m (Maybe IDBKeyRange)
only self value
= liftDOM ((self ^. jsf "only" [toJSVal value]) >>= fromJSVal)
only_ :: (MonadDOM m) => IDBKeyRange -> JSVal -> m ()
only_ self value
= liftDOM (void (self ^. jsf "only" [toJSVal value]))
onlyUnchecked ::
(MonadDOM m) => IDBKeyRange -> JSVal -> m IDBKeyRange
onlyUnchecked self value
= liftDOM
((self ^. jsf "only" [toJSVal value]) >>= fromJSValUnchecked)
lowerBound ::
(MonadDOM m) =>
IDBKeyRange -> JSVal -> Bool -> m (Maybe IDBKeyRange)
lowerBound self lower open
= liftDOM
((self ^. jsf "lowerBound" [toJSVal lower, toJSVal open]) >>=
fromJSVal)
lowerBound_ :: (MonadDOM m) => IDBKeyRange -> JSVal -> Bool -> m ()
lowerBound_ self lower open
= liftDOM
(void (self ^. jsf "lowerBound" [toJSVal lower, toJSVal open]))
lowerBoundUnchecked ::
(MonadDOM m) => IDBKeyRange -> JSVal -> Bool -> m IDBKeyRange
lowerBoundUnchecked self lower open
= liftDOM
((self ^. jsf "lowerBound" [toJSVal lower, toJSVal open]) >>=
fromJSValUnchecked)
upperBound ::
(MonadDOM m) =>
IDBKeyRange -> JSVal -> Bool -> m (Maybe IDBKeyRange)
upperBound self upper open
= liftDOM
((self ^. jsf "upperBound" [toJSVal upper, toJSVal open]) >>=
fromJSVal)
upperBound_ :: (MonadDOM m) => IDBKeyRange -> JSVal -> Bool -> m ()
upperBound_ self upper open
= liftDOM
(void (self ^. jsf "upperBound" [toJSVal upper, toJSVal open]))
upperBoundUnchecked ::
(MonadDOM m) => IDBKeyRange -> JSVal -> Bool -> m IDBKeyRange
upperBoundUnchecked self upper open
= liftDOM
((self ^. jsf "upperBound" [toJSVal upper, toJSVal open]) >>=
fromJSValUnchecked)
bound ::
(MonadDOM m) =>
IDBKeyRange ->
JSVal -> JSVal -> Bool -> Bool -> m (Maybe IDBKeyRange)
bound self lower upper lowerOpen upperOpen
= liftDOM
((self ^. jsf "bound"
[toJSVal lower, toJSVal upper, toJSVal lowerOpen,
toJSVal upperOpen])
>>= fromJSVal)
bound_ ::
(MonadDOM m) =>
IDBKeyRange -> JSVal -> JSVal -> Bool -> Bool -> m ()
bound_ self lower upper lowerOpen upperOpen
= liftDOM
(void
(self ^. jsf "bound"
[toJSVal lower, toJSVal upper, toJSVal lowerOpen,
toJSVal upperOpen]))
boundUnchecked ::
(MonadDOM m) =>
IDBKeyRange -> JSVal -> JSVal -> Bool -> Bool -> m IDBKeyRange
boundUnchecked self lower upper lowerOpen upperOpen
= liftDOM
((self ^. jsf "bound"
[toJSVal lower, toJSVal upper, toJSVal lowerOpen,
toJSVal upperOpen])
>>= fromJSValUnchecked)
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)