beam-core-0.9.2.1: Type-safe, feature-complete SQL query and manipulation interface for Haskell
Safe Haskell None
Language Haskell2010

Database.Beam.Query.DataTypes

Contents

Synopsis

Documentation

cast_ :: BeamSqlBackend be => QGenExpr ctxt be s a -> DataType be b -> QGenExpr ctxt be s b Source #

Cast a value to a specific data type, specified using DataType .

Note: this may fail at run-time if the cast is invalid for a particular value

Data types

int :: ( BeamSqlBackend be, Integral a) => DataType be a Source #

SQL92 INTEGER data type

smallint :: ( BeamSqlBackend be, Integral a) => DataType be a Source #

SQL92 SMALLINT data type

bigint :: ( BeamSqlBackend be, BeamSqlT071Backend be, Integral a) => DataType be a Source #

SQL2008 Optional BIGINT data type

nationalVarchar :: BeamSqlBackend be => Maybe Word -> DataType be Text Source #

SQL92 NATIONAL CHARACTER VARYING data type

timestamptz :: BeamSqlBackend be => DataType be LocalTime Source #

SQL92 TIMESTAMP WITH TIME ZONE data type

timestamp :: BeamSqlBackend be => DataType be LocalTime Source #

SQL92 TIMESTAMP WITHOUT TIME ZONE data type

maybeType :: DataType be a -> DataType be ( Maybe a) Source #

Haskell requires DataType s to match exactly. Use this function to convert a DataType that expects a concrete value to one expecting a Maybe