napkin-0.5.13
Safe HaskellNone
LanguageHaskell2010

Napkin.Spec.Yaml.Types.Tables

Synopsis

Documentation

newtype YamlRange a #

Constructors

YamlRange 

Fields

Instances

Instances details
Eq a => Eq (YamlRange a) # 
Instance details

Defined in Napkin.Spec.Yaml.Types.Tables

Methods

(==) :: YamlRange a -> YamlRange a -> Bool #

(/=) :: YamlRange a -> YamlRange a -> Bool #

Show a => Show (YamlRange a) # 
Instance details

Defined in Napkin.Spec.Yaml.Types.Tables

Generic (YamlRange a) # 
Instance details

Defined in Napkin.Spec.Yaml.Types.Tables

Associated Types

type Rep (YamlRange a) :: Type -> Type #

Methods

from :: YamlRange a -> Rep (YamlRange a) x #

to :: Rep (YamlRange a) x -> YamlRange a #

type Rep (YamlRange a) # 
Instance details

Defined in Napkin.Spec.Yaml.Types.Tables

type Rep (YamlRange a) = D1 ('MetaData "YamlRange" "Napkin.Spec.Yaml.Types.Tables" "napkin-0.5.13-8705pBGlgyp7AIaYGNE2fM" 'True) (C1 ('MetaCons "YamlRange" 'PrefixI 'True) (S1 ('MetaSel ('Just "toRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithinSet a))))

(-->) :: a -> b -> (a, b) #

external :: forall b. (ReifiesBackend b, ToDbBackend b) => SpecProgramForYaml b #

Define table with external command

external:
  command: ./import_table.sh
  arguments: [--from, staging, --table, {{{tablename}}}]

sql_query :: forall b. (ReifiesBackend b, ToDbBackend b, BackendMetaConstraints b) => SpecProgramForYaml b #

Define table with SQL query specified directly in YAML

sql_query:
  query: SELECT * FROM foo

sql_file :: forall b. BackendMetaConstraints b => SpecProgramForYaml b #

Define table with SQL query specified directly in YAML. vars is an optional object used to specify variables used in mustache interpolation.

sql_file:
  source: some_file.sql
  vars:
    agg: sum