Database.Int16

Database

16-bit signed integer column type.

Reducers

Types

Int16

type Int16 = Int16

16-bit signed integer column type.

Examples

type alias Row = { score : Int16 }

access rows token
    |> reduce (Database.Int16.sum .score)

Values

sum

sum : (row -> Int16) -> Reducer row IntX

Compute the sum of the relevant rows.

Examples

access rows token
    |> reduce (Database.Int16.sum .score)

ands

ands : (row -> Int16) -> Reducer row Int16

Compute the bitwise AND over the relevant rows.

Examples

access rows token
    |> reduce (Database.Int16.ands .flags)

ors

ors : (row -> Int16) -> Reducer row Int16

Compute the bitwise OR over the relevant rows.

Examples

access rows token
    |> reduce (Database.Int16.ors .flags)

xors

xors : (row -> Int16) -> Reducer row Int16

Compute the bitwise XOR over the relevant rows. Useful as a checksum for an unordered set of values.

Examples

access rows token
    |> reduce (Database.Int16.xors .flags)