module JSDOM.Generated.IDBCursor
(update, update_, updateUnsafe, updateUnchecked, advance, continue,
delete, delete_, deleteUnsafe, deleteUnchecked, getSource,
getSourceUnsafe, getSourceUnchecked, getDirection, getKey,
getPrimaryKey, IDBCursor(..), gTypeIDBCursor, IsIDBCursor,
toIDBCursor)
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 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
update ::
(MonadDOM m, IsIDBCursor self) =>
self -> JSVal -> m (Maybe IDBRequest)
update self value
= liftDOM
(((toIDBCursor self) ^. jsf "update" [toJSVal value]) >>=
fromJSVal)
update_ :: (MonadDOM m, IsIDBCursor self) => self -> JSVal -> m ()
update_ self value
= liftDOM
(void ((toIDBCursor self) ^. jsf "update" [toJSVal value]))
updateUnsafe ::
(MonadDOM m, IsIDBCursor self, HasCallStack) =>
self -> JSVal -> m IDBRequest
updateUnsafe self value
= liftDOM
((((toIDBCursor self) ^. jsf "update" [toJSVal value]) >>=
fromJSVal)
>>= maybe (Prelude.error "Nothing to return") return)
updateUnchecked ::
(MonadDOM m, IsIDBCursor self) => self -> JSVal -> m IDBRequest
updateUnchecked self value
= liftDOM
(((toIDBCursor self) ^. jsf "update" [toJSVal value]) >>=
fromJSValUnchecked)
advance :: (MonadDOM m, IsIDBCursor self) => self -> Word -> m ()
advance self count
= liftDOM
(void ((toIDBCursor self) ^. jsf "advance" [toJSVal count]))
continue :: (MonadDOM m, IsIDBCursor self) => self -> JSVal -> m ()
continue self key
= liftDOM
(void ((toIDBCursor self) ^. jsf "continue" [toJSVal key]))
delete ::
(MonadDOM m, IsIDBCursor self) => self -> m (Maybe IDBRequest)
delete self
= liftDOM (((toIDBCursor self) ^. jsf "delete" ()) >>= fromJSVal)
delete_ :: (MonadDOM m, IsIDBCursor self) => self -> m ()
delete_ self
= liftDOM (void ((toIDBCursor self) ^. jsf "delete" ()))
deleteUnsafe ::
(MonadDOM m, IsIDBCursor self, HasCallStack) =>
self -> m IDBRequest
deleteUnsafe self
= liftDOM
((((toIDBCursor self) ^. jsf "delete" ()) >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
deleteUnchecked ::
(MonadDOM m, IsIDBCursor self) => self -> m IDBRequest
deleteUnchecked self
= liftDOM
(((toIDBCursor self) ^. jsf "delete" ()) >>= fromJSValUnchecked)
getSource ::
(MonadDOM m, IsIDBCursor self) => self -> m (Maybe IDBAny)
getSource self
= liftDOM (((toIDBCursor self) ^. js "source") >>= fromJSVal)
getSourceUnsafe ::
(MonadDOM m, IsIDBCursor self, HasCallStack) => self -> m IDBAny
getSourceUnsafe self
= liftDOM
((((toIDBCursor self) ^. js "source") >>= fromJSVal) >>=
maybe (Prelude.error "Nothing to return") return)
getSourceUnchecked ::
(MonadDOM m, IsIDBCursor self) => self -> m IDBAny
getSourceUnchecked self
= liftDOM
(((toIDBCursor self) ^. js "source") >>= fromJSValUnchecked)
getDirection ::
(MonadDOM m, IsIDBCursor self, FromJSString result) =>
self -> m result
getDirection self
= liftDOM
(((toIDBCursor self) ^. js "direction") >>= fromJSValUnchecked)
getKey :: (MonadDOM m, IsIDBCursor self) => self -> m JSVal
getKey self
= liftDOM (((toIDBCursor self) ^. js "key") >>= toJSVal)
getPrimaryKey :: (MonadDOM m, IsIDBCursor self) => self -> m JSVal
getPrimaryKey self
= liftDOM (((toIDBCursor self) ^. js "primaryKey") >>= toJSVal)