refurb-0.3.0.2: Tools for maintaining a database
Safe HaskellNone
LanguageHaskell2010

Refurb.Cli

Description

Module with optparse-applicative parsers for and datatypes to represent the command line arguments.

Synopsis

Documentation

newtype GoNoGo Source #

Newtype wrapper for the --execute boolean (True if given, False if omitted)

Constructors

GoNoGo Bool 

Instances

Instances details
Eq GoNoGo Source # 
Instance details

Defined in Refurb.Cli

Methods

(==) :: GoNoGo -> GoNoGo -> Bool #

(/=) :: GoNoGo -> GoNoGo -> Bool #

Show GoNoGo Source # 
Instance details

Defined in Refurb.Cli

newtype PreMigrationBackup Source #

Newtype wrapper for the --backup-first option to the migrate command.

newtype InstallSeedData Source #

Newtype wrapper for the --seed boolean (True if given, False if omitted)

Constructors

InstallSeedData Bool 

Instances

Instances details
Eq InstallSeedData Source # 
Instance details

Defined in Refurb.Cli

Show InstallSeedData Source # 
Instance details

Defined in Refurb.Cli

data Command Source #

The various top level commands that can be requested by the user

Constructors

CommandMigrate GoNoGo (Maybe PreMigrationBackup) InstallSeedData

Migrate the database or show what migrations would be applied, possibly backing up beforehand.

CommandShowLog

Show the migration status.

CommandShowMigration FQualifiedKey

Show status of a particular migration with its log output.

CommandBackup FilePath

Back up the database.

Instances

Instances details
Eq Command Source # 
Instance details

Defined in Refurb.Cli

Methods

(==) :: Command -> Command -> Bool #

(/=) :: Command -> Command -> Bool #

Show Command Source # 
Instance details

Defined in Refurb.Cli

commandMigrateParser :: ParserInfo Command Source #

Option parser for the migrate command

commandShowLogParser :: ParserInfo Command Source #

Option parser for the show-log command

commandShowMigrationParser :: ParserInfo Command Source #

Option parser for the show-migration command

commandBackupParser :: ParserInfo Command Source #

Option parser for the backup command

data Opts Source #

Structure holding the parsed command line arguments and options.

Constructors

Opts 

Fields

  • debug :: Bool

    Whether to turn on debug logging to the console

  • colorize :: Bool

    Whether to colorize console output

  • configFile :: FilePath

    The configuration file where (presumably) the database connection information is stored

  • command :: Command

    Which command the user chose and the options for that command

optsParser :: ParserInfo Opts Source #

Parser for the command line arguments