postgresql-types-0.1.7.0: Precise PostgreSQL types representation and driver-agnostic codecs
Safe HaskellNone
LanguageHaskell2010

PostgresqlTypes.Text

Synopsis

Documentation

data Text Source #

PostgreSQL text type. Variable-length character string with no null-characters.

PostgreSQL docs.

Instances

Instances details
Arbitrary Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Methods

arbitrary :: Gen Text #

shrink :: Text -> [Text] #

IsString Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Methods

fromString :: String -> Text #

Read Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Show Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Methods

showsPrec :: Int -> Text -> ShowS #

show :: Text -> String #

showList :: [Text] -> ShowS #

Eq Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Methods

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

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

Ord Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Methods

compare :: Text -> Text -> Ordering #

(<) :: Text -> Text -> Bool #

(<=) :: Text -> Text -> Bool #

(>) :: Text -> Text -> Bool #

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

max :: Text -> Text -> Text #

min :: Text -> Text -> Text #

Hashable Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

IsBinaryPrimitive Text Source # 
Instance details

Defined in PostgresqlTypes.Text

IsPrimitive Text Source # 
Instance details

Defined in PostgresqlTypes.Text

Accessors

toText :: Text -> Text Source #

Extract the underlying Text value.

Constructors

normalizeFromText :: Text -> Text Source #

Construct a PostgreSQL Text from a Text value.

Strips null characters to ensure PostgreSQL compatibility.

refineFromText :: Text -> Maybe Text Source #

Construct a PostgreSQL Text from a Text value.

Returns Nothing if the text contains null characters (not supported by PostgreSQL).