dawdle-0.1.0.2: Generates DDL suggestions based on a CSV file

Safe HaskellSafe
LanguageHaskell2010

Database.Dawdle.Utils

Synopsis

Documentation

isCTNumber :: String -> Bool Source

Is this a number or a float(y) number? (Can give incorrect results, for example with version numbers like 0.5.1.1)

isInt :: String -> Bool Source

Is this number an int? (Similar to isCTNumber, but without a decimal point)

maybeToEither Source

Arguments

:: String

Error string

-> Maybe a

Maybe value to check

-> Either String a

Either Error string or the Just value from the maybe

Promote a Maybe to an Either with an error string

allTheSame :: Eq a => [a] -> Bool Source

Check that all the items in a list are identical. This is used to verify lengths in the algorithm.

normalizeNames Source

Arguments

:: [String]

List of strings to normalize

-> [String]

List of normalized strings

Normalize names by removing special characters, replacing spaces with underscores and lowercasing everything.