1{-# language FlexibleContexts #-}
2{-# language NamedFieldPuns #-}
3{-# language TypeFamilies #-}
5module Rel8.Table.Undefined
11import Prelude hiding ( undefined )
14import Rel8.Expr ( Expr )
15import Rel8.Expr.Null ( snull, unsafeUnnullify )
16import Rel8.Schema.Context ( Col'(..) )
17import Rel8.Schema.HTable ( htabulate, hfield, hspecs )
18import Rel8.Schema.Nullability ( Nullability( Nullable, NonNullable ) )
19import Rel8.Schema.Spec ( SSpec(..) )
20import Rel8.Table ( Table, fromColumns )
23undefined :: Table Expr a => a
24undefined = fromColumns $ htabulate $ \field -> case hfield hspecs field of
25 SSpec {nullability, info} -> case nullability of
26 Nullable -> DB (snull Nullable info)
27 NonNullable -> DB (unsafeUnnullify (snull Nullable info))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list