haskelldb-2.0.1: A library of combinators for generating and executing SQL statements.

Portabilitynon-portable
Stabilityexperimental
Maintainerhaskelldb-users@lists.sourceforge.net

Database.HaskellDB.DBSpec.DBInfo

Description

This is the core file of the DBSpec files. It defines a DBInfo and important functions on it.

Synopsis

Documentation

data DBInfo Source

Defines a database layout, top level

Constructors

DBInfo 

Fields

dbname :: String

The name of the database

opts :: DBOptions

Any options (i.e whether to use Bounded Strings)

tbls :: [TInfo]

Tables this database contains

Instances

data TInfo Source

Constructors

TInfo 

Fields

tname :: String

The name of the table

cols :: [CInfo]

The columns in this table

Instances

data CInfo Source

Constructors

CInfo 

Fields

cname :: String

The name of this column

descr :: FieldDesc

The description of this column

Instances

data DBOptions Source

Constructors

DBOptions 

Fields

useBString :: Bool

Use Bounded Strings?

makeIdent :: MakeIdentifiers

Conversion routines from Database identifiers to Haskell identifiers

Instances

makeDBSpecSource

Arguments

:: String

The name of the Database

-> DBOptions

Options

-> [TInfo]

Tables

-> DBInfo

The generated DBInfo

Creates a DBInfo

makeTInfoSource

Arguments

:: String

The table name

-> [CInfo]

Columns

-> TInfo

The generated TInfo

Creates a TInfo

makeCInfoSource

Arguments

:: String

The column name

-> FieldDesc

What the column contains

-> CInfo

The generated CInfo

Creates a CInfo

ppDBInfo :: DBInfo -> DocSource

Pretty prints a DBInfo

dbInfoToDoc :: DBInfo -> DocSource

Creates a valid declaration of a DBInfo. The variable name will be the same as the database name

finalizeSpec :: DBInfo -> DBInfoSource

Does a final touching up of a DBInfo before it is used by i.e DBDirect. This converts any Bounded Strings to ordinary strings if that flag is set.

constructNonClashingDBInfo :: DBInfo -> DBInfoSource

Constructs a DBInfo that doesn't cause nameclashes