Module

Yoga.ScyllaDB.Om

Package
purescript-yoga-scylladb-om
Repository
rowtype-yoga/purescript-yoga-scylladb-om

#execute Source

execute :: forall @a ctx err. ReadForeign a => CQL -> Array Foreign -> Client -> Om ctx (parseError :: MultipleErrors | err) (Array a)

Execute query and parse rows using yoga-json's ReadForeign (DEFAULT) Throws parse errors to the Om exception channel

#executeWithOptions Source

executeWithOptions :: forall @a ctx err opts opts_. ReadForeign a => Union opts opts_ ExecuteOptionsImpl => CQL -> Array Foreign -> Record opts -> Client -> Om ctx (parseError :: MultipleErrors | err) (Array a)

Execute query with options and parse rows using yoga-json's ReadForeign Throws parse errors to the Om exception channel

#executeUnsafe Source

executeUnsafe :: forall @a ctx err. CQL -> Array Foreign -> Client -> Om ctx err (Array a)

Execute query and unsafeCoerce rows to the desired type (bypasses yoga-json parsing) USE WITH CAUTION - no runtime validation!

#batch Source

batch :: forall @a ctx err. ReadForeign a => Array BatchQuery -> Client -> Om ctx (parseError :: MultipleErrors | err) (Array a)

#batchWithOptions Source

batchWithOptions :: forall @a ctx err opts opts_. ReadForeign a => Union opts opts_ BatchOptionsImpl => Array BatchQuery -> Record opts -> Client -> Om ctx (parseError :: MultipleErrors | err) (Array a)

#stream Source

stream :: forall @a ctx err. ReadForeign a => CQL -> Array Foreign -> Client -> Om ctx (parseError :: MultipleErrors | err) (Array a)

#prepare Source

prepare :: forall ctx err. CQL -> Client -> Om ctx err PreparedStatement

#executePrepared Source

executePrepared :: forall @a ctx err. ReadForeign a => PreparedStatement -> Array Foreign -> Client -> Om ctx (parseError :: MultipleErrors | err) (Array a)

#getKeyspace Source

getKeyspace :: forall ctx err. Keyspace -> Client -> Om ctx err (Maybe Foreign)

#getTable Source

getTable :: forall ctx err. Keyspace -> String -> Client -> Om ctx err (Maybe Foreign)

#getHosts Source

getHosts :: forall ctx err. Client -> Om ctx err (Array Foreign)

#connect Source

connect :: forall ctx err. Client -> Om ctx err Unit

#shutdown Source

shutdown :: forall ctx err. Client -> Om ctx err Unit

#ping Source

ping :: forall ctx err. Client -> Om ctx err Boolean

Re-exports from Yoga.ScyllaDB.ScyllaDB

#UUID Source

data UUID

Instances

#QueryResult Source

type QueryResult = { pageState :: Maybe String, rowLength :: Int, rows :: Array Row }

#PreparedStatement Source

#Client Source

data Client

#CQL Source

newtype CQL

Instances

#BatchQuery Source

type BatchQuery = { params :: Array Foreign, query :: CQL }