krapsh-0.1.9.0: Haskell bindings for Spark Dataframes and Datasets

Safe HaskellNone
LanguageHaskell2010

Spark.Core.Row

Synopsis

Documentation

data Cell Source #

The basic representation of one row of data. This is a standard type that comes out of the SQL engine in Spark.

An element in a Row object. All objects manipulated by the Spark framework are assumed to be convertible to cells.

This is usually handled by generic transforms.

Instances

Eq Cell Source # 

Methods

(==) :: Cell -> Cell -> Bool #

(/=) :: Cell -> Cell -> Bool #

Show Cell Source # 

Methods

showsPrec :: Int -> Cell -> ShowS #

show :: Cell -> String #

showList :: [Cell] -> ShowS #

ToJSON Cell Source #

Cell

FromSQL Cell Source # 

Methods

_cellToValue :: Cell -> TryS Cell

data Row Source #

A Row of data: the basic data structure to transport information TODO rename to rowCells

Constructors

Row 

Fields

Instances

Eq Row Source # 

Methods

(==) :: Row -> Row -> Bool #

(/=) :: Row -> Row -> Bool #

Show Row Source # 

Methods

showsPrec :: Int -> Row -> ShowS #

show :: Row -> String #

showList :: [Row] -> ShowS #

ToJSON Row Source #

Row

Methods

toJSON :: Row -> Value #

toEncoding :: Row -> Encoding #

class ToSQL a Source #

Instances

ToSQL Int Source # 

Methods

_valueToCell :: Int -> Cell

ToSQL Text Source # 

Methods

_valueToCell :: Text -> Cell

ToSQL a => ToSQL (Maybe a) Source # 

Methods

_valueToCell :: Maybe a -> Cell

(ToSQL a, ToSQL b) => ToSQL (a, b) Source # 

Methods

_valueToCell :: (a, b) -> Cell

class FromSQL a Source #

Instances

FromSQL Int Source # 

Methods

_cellToValue :: Cell -> TryS Int

FromSQL Text Source # 

Methods

_cellToValue :: Cell -> TryS Text

FromSQL Cell Source # 

Methods

_cellToValue :: Cell -> TryS Cell

FromSQL a => FromSQL [a] Source # 

Methods

_cellToValue :: Cell -> TryS [a]

FromSQL a => FromSQL (Maybe a) Source # 

Methods

_cellToValue :: Cell -> TryS (Maybe a)

(FromSQL a1, FromSQL a2) => FromSQL (a1, a2) Source # 

Methods

_cellToValue :: Cell -> TryS (a1, a2)

jsonToCell :: DataType -> Value -> Either Text Cell Source #

Decodes a JSON into a row. This operation requires a SQL type that describes the schema.

rowArray :: [Cell] -> Cell Source #

Convenience constructor for an array of cells.