narc-0.1.2: Query SQL databases using Nested Relational Calculus embedded in Haskell.

Database.Narc.SQL

Synopsis

Documentation

data Op Source

Constructors

Eq 
Less 
Plus 
Minus 
Times 
Divide 

Instances

Eq Op 
Show Op 
Arbitrary Op 
Pretty Op 

data UnOp Source

Constructors

Min 
Max 
Count 
Sum 
Average 

Instances

data Query Source

Query: the type of SQL queries (select R from Ts where B) (This is unpleasant; it should probably be organized into various syntactic classes.)

Constructors

Select 

Fields

rslt :: Query
 
tabs :: [(Field, Field, Type)]
 
cond :: [Query]
 
QNum Integer 
QBool Bool 
QNot Query 
QOp Query Op Query 
QField String String 
QRecord [(Field, Query)] 
QUnion Query Query 
QIf Query Query Query 
QExists Query 

Instances

Eq Query 
Show Query 
Pretty Query 

sizeQueryExact :: Query -> IntegerSource

sizeQuery approximates the size of a query by calling giving up | its node count past a certain limit (currently limit = 100, below).

sizeQuery :: Query -> IntegerSource

sizeQuery approximates the size of a query by calling giving up | its node count past a certain limit (currently limit = 100, below).

groundQuery :: Query -> BoolSource

a groundQuery is a *real* SQL query--one without variables or appl'ns.

groundQueryExpr :: Query -> BoolSource

a groundQueryExpr is an atomic-type expression.