Documentation ¶
Index ¶
- Constants
- func AdaptRegexp(data string) (string, error)
- func DoubleQuoteState(actx *ActionContext, s string, dest *strings.Builder) error
- func KeepCaseState(actx *ActionContext, s string, dest *strings.Builder) error
- func LowerCaseState(actx *ActionContext, s string, dest *strings.Builder) error
- func QuestionMarkState(actx *ActionContext, s string, dest *strings.Builder) error
- func WildCardState(actx *ActionContext, s string, dest *strings.Builder) error
- type Action
- type ActionContext
- type Options
- type ParserContext
- type PgDump
- type State
- type StateName
Constants ¶
View Source
const ( NoneActionStage = iota StartedActionStage EndedActionStage )
Variables ¶
This section is empty.
Functions ¶
func AdaptRegexp ¶
func DoubleQuoteState ¶
func DoubleQuoteState(actx *ActionContext, s string, dest *strings.Builder) error
func KeepCaseState ¶
func KeepCaseState(actx *ActionContext, s string, dest *strings.Builder) error
func LowerCaseState ¶
func LowerCaseState(actx *ActionContext, s string, dest *strings.Builder) error
func QuestionMarkState ¶
func QuestionMarkState(actx *ActionContext, s string, dest *strings.Builder) error
func WildCardState ¶
func WildCardState(actx *ActionContext, s string, dest *strings.Builder) error
Types ¶
type ActionContext ¶
func (*ActionContext) IsDone ¶
func (ac *ActionContext) IsDone() bool
func (*ActionContext) SetDone ¶
func (ac *ActionContext) SetDone()
type Options ¶
type Options struct { // General options: FileName string `mapstructure:"file"` // --file=FILENAME Format string // Supports only directory format Jobs int `mapstructure:"jobs"` Verbose bool `mapstructure:"verbose"` Compression int `mapstructure:"compress"` LockWaitTimeout int `mapstructure:"lock-wait-timeout"` NoSync bool `mapstructure:"no-sync"` // Options controlling the output content DataOnly bool `mapstructure:"data-only"` Blobs bool `mapstructure:"blobs"` NoBlobs bool `mapstructure:"no-blobs"` Clean bool `mapstructure:"clean"` Create bool `mapstructure:"create"` Extension []string `mapstructure:"extension"` Encoding string `mapstructure:"encoding"` Schema []string `mapstructure:"schema"` ExcludeSchema []string `mapstructure:"exclude-schema"` NoOwner bool `mapstructure:"no-owner"` SchemaOnly bool `mapstructure:"schema-only"` SuperUser string `mapstructure:"superuser"` Table []string `mapstructure:"table"` ExcludeTable []string `mapstructure:"exclude-table"` NoPrivileges bool `mapstructure:"no-privileges"` DisableDollarQuoting bool `mapstructure:"disable-dollar-quoting"` DisableTriggers bool `mapstructure:"disable-triggers"` EnableRowSecurity bool `mapstructure:"enable-row-security"` ExcludeTableData []string `mapstructure:"exclude-table-data"` ExtraFloatDigits string `mapstructure:"extra-float-digits"` IfExists bool `mapstructure:"if-exists"` IncludeForeignData []string `mapstructure:"include-foreign-data"` LoadViaPartitionRoot bool `mapstructure:"load-via-partition-root"` NoComments bool `mapstructure:"no-comments"` NoPublications bool `mapstructure:"no-publications"` NoSecurityLabels bool `mapstructure:"no-security-labels"` NoSubscriptions bool `mapstructure:"no-subscriptions"` NoSynchronizedSnapshots bool `mapstructure:"no-synchronized-snapshots"` NoTableSpaces bool `mapstructure:"no-tablespaces"` NoToastCompression bool `mapstructure:"no-toast-compression"` NoUnloggedTableData bool `mapstructure:"no-unlogged-table-data"` OnConflictDoNothing bool `mapstructure:"on-conflict-do-nothing"` QuoteAllIdentifiers bool `mapstructure:"quote-all-identifiers"` Section string `mapstructure:"section"` SerializableDeferrable bool `mapstructure:"serializable-deferrable"` Snapshot string `mapstructure:"snapshot"` StrictNames bool `mapstructure:"strict-names"` UseSetSessionAuthorization bool `mapstructure:"use-set-session-authorization"` // Connection options: DbName string `mapstructure:"dbname"` Host string `mapstructure:"host"` Port int `mapstructure:"port"` UserName string `mapstructure:"username"` NoPassword bool `mapstructure:"no-password"` Password bool `mapstructure:"password"` Role string `mapstructure:"role"` }
type ParserContext ¶
type ParserContext struct {
// contains filtered or unexported fields
}
func NewParser ¶
func NewParser() *ParserContext
func (*ParserContext) Depth ¶
func (p *ParserContext) Depth() int
func (*ParserContext) PopState ¶
func (p *ParserContext) PopState()
func (*ParserContext) PushState ¶
func (p *ParserContext) PushState(state *State)
type State ¶
type State struct { ActionContext Name StateName Action Action }
type StateName ¶
type StateName string
var ( StateLowerCase StateName = "StateLowerCase" StateKeepCase StateName = "StateKeepCase" StateWildcard StateName = "StateWildcard" StateDoubledQuotes StateName = "StateDoubledQuotes" StateQuestionMark StateName = "StateQuestionMark" DefaultState = &State{ Name: StateLowerCase, Action: LowerCaseState, } )
Click to show internal directories.
Click to hide internal directories.