Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrPlanDiff = errors.New("plan contains changes")
ErrPlanDiff is returned by Plan.Run when --check is set and the plan contains executable DDL. main maps it to exit code 2. Suppressed drops alone do not trigger it.
Functions ¶
func StartPager ¶ added in v1.9.1
StartPager wraps w with a pager subprocess when all of the following hold:
- paging hasn't been disabled by --no-pager (pager != nil && *pager == false),
- either pager was explicitly forced via --pager (*pager == true) or w is a TTY (so the user is actually viewing the output interactively),
- PISTA_PAGER is set to a non-empty command line.
pager == nil means the user passed neither --pager nor --no-pager, so the TTY check decides. Otherwise *pager explicitly turns paging on or off, but an unset PISTA_PAGER still gates everything (matching the convention that the env var is the source of truth for *which* pager to run).
Otherwise it returns w unchanged with a no-op close. The returned close function tears down the pager and waits for it to exit, so callers should always invoke it (typically via defer).
Types ¶
type Apply ¶
type Apply struct {
pistachio.ApplyOptions
}
type Dump ¶
type Dump struct {
pistachio.DumpOptions
}