Documentation ¶
Index ¶
- func NewDefaultWriter(r Reader, opts ...WriterOption) func(db DB, w io.Writer) Writer
- type BasicReader
- type Bool
- type Catalog
- type CatalogReader
- type CatalogSet
- func (r CatalogSet) Close() error
- func (r CatalogSet) Columns() ([]string, error)
- func (r CatalogSet) Err() error
- func (s CatalogSet) Get() *Catalog
- func (r *CatalogSet) Len() int
- func (r *CatalogSet) Next() bool
- func (r CatalogSet) NextResultSet() bool
- func (r *CatalogSet) Reset()
- func (r CatalogSet) Scan(dest ...interface{}) error
- func (r *CatalogSet) SetColumns(c []string)
- func (r *CatalogSet) SetFilter(f func(Result) bool)
- func (r *CatalogSet) SetScanValues(s func(Result) []interface{})
- type CloseFunc
- type Column
- type ColumnReader
- type ColumnSet
- func (r ColumnSet) Close() error
- func (r ColumnSet) Columns() ([]string, error)
- func (r ColumnSet) Err() error
- func (c ColumnSet) Get() *Column
- func (r *ColumnSet) Len() int
- func (r *ColumnSet) Next() bool
- func (r ColumnSet) NextResultSet() bool
- func (r *ColumnSet) Reset()
- func (r ColumnSet) Scan(dest ...interface{}) error
- func (r *ColumnSet) SetColumns(c []string)
- func (r *ColumnSet) SetFilter(f func(Result) bool)
- func (r *ColumnSet) SetScanValues(s func(Result) []interface{})
- type ColumnStat
- type ColumnStatReader
- type ColumnStatSet
- func (r ColumnStatSet) Close() error
- func (r ColumnStatSet) Columns() ([]string, error)
- func (r ColumnStatSet) Err() error
- func (c ColumnStatSet) Get() *ColumnStat
- func (r *ColumnStatSet) Len() int
- func (r *ColumnStatSet) Next() bool
- func (r ColumnStatSet) NextResultSet() bool
- func (r *ColumnStatSet) Reset()
- func (r ColumnStatSet) Scan(dest ...interface{}) error
- func (r *ColumnStatSet) SetColumns(c []string)
- func (r *ColumnStatSet) SetFilter(f func(Result) bool)
- func (r *ColumnStatSet) SetScanValues(s func(Result) []interface{})
- type Constraint
- type ConstraintColumn
- type ConstraintColumnReader
- type ConstraintColumnSet
- func (r ConstraintColumnSet) Close() error
- func (r ConstraintColumnSet) Columns() ([]string, error)
- func (r ConstraintColumnSet) Err() error
- func (c ConstraintColumnSet) Get() *ConstraintColumn
- func (r *ConstraintColumnSet) Len() int
- func (r *ConstraintColumnSet) Next() bool
- func (r ConstraintColumnSet) NextResultSet() bool
- func (r *ConstraintColumnSet) Reset()
- func (r ConstraintColumnSet) Scan(dest ...interface{}) error
- func (r *ConstraintColumnSet) SetColumns(c []string)
- func (r *ConstraintColumnSet) SetFilter(f func(Result) bool)
- func (r *ConstraintColumnSet) SetScanValues(s func(Result) []interface{})
- type ConstraintReader
- type ConstraintSet
- func (r ConstraintSet) Close() error
- func (r ConstraintSet) Columns() ([]string, error)
- func (r ConstraintSet) Err() error
- func (i ConstraintSet) Get() *Constraint
- func (r *ConstraintSet) Len() int
- func (r *ConstraintSet) Next() bool
- func (r ConstraintSet) NextResultSet() bool
- func (r *ConstraintSet) Reset()
- func (r ConstraintSet) Scan(dest ...interface{}) error
- func (r *ConstraintSet) SetColumns(c []string)
- func (r *ConstraintSet) SetFilter(f func(Result) bool)
- func (r *ConstraintSet) SetScanValues(s func(Result) []interface{})
- type DB
- type DefaultWriter
- func (w DefaultWriter) DescribeFunctions(u *dburl.URL, funcTypes, pattern string, verbose, showSystem bool) error
- func (w DefaultWriter) DescribeTableDetails(u *dburl.URL, pattern string, verbose, showSystem bool) error
- func (w DefaultWriter) ListAllDbs(u *dburl.URL, pattern string, verbose bool) error
- func (w DefaultWriter) ListIndexes(u *dburl.URL, pattern string, verbose, showSystem bool) error
- func (w DefaultWriter) ListSchemas(u *dburl.URL, pattern string, verbose, showSystem bool) error
- func (w DefaultWriter) ListTables(u *dburl.URL, tableTypes, pattern string, verbose, showSystem bool) error
- func (w DefaultWriter) ShowStats(u *dburl.URL, statTypes, pattern string, verbose bool, k int) error
- type ExtendedReader
- type Filter
- type Function
- type FunctionColumn
- type FunctionColumnReader
- type FunctionColumnSet
- func (r FunctionColumnSet) Close() error
- func (r FunctionColumnSet) Columns() ([]string, error)
- func (r FunctionColumnSet) Err() error
- func (c FunctionColumnSet) Get() *FunctionColumn
- func (r *FunctionColumnSet) Len() int
- func (r *FunctionColumnSet) Next() bool
- func (r FunctionColumnSet) NextResultSet() bool
- func (r *FunctionColumnSet) Reset()
- func (r FunctionColumnSet) Scan(dest ...interface{}) error
- func (r *FunctionColumnSet) SetColumns(c []string)
- func (r *FunctionColumnSet) SetFilter(f func(Result) bool)
- func (r *FunctionColumnSet) SetScanValues(s func(Result) []interface{})
- type FunctionReader
- type FunctionSet
- func (r FunctionSet) Close() error
- func (r FunctionSet) Columns() ([]string, error)
- func (r FunctionSet) Err() error
- func (f FunctionSet) Get() *Function
- func (r *FunctionSet) Len() int
- func (r *FunctionSet) Next() bool
- func (r FunctionSet) NextResultSet() bool
- func (r *FunctionSet) Reset()
- func (r FunctionSet) Scan(dest ...interface{}) error
- func (r *FunctionSet) SetColumns(c []string)
- func (r *FunctionSet) SetFilter(f func(Result) bool)
- func (r *FunctionSet) SetScanValues(s func(Result) []interface{})
- type Index
- type IndexColumn
- type IndexColumnReader
- type IndexColumnSet
- func (r IndexColumnSet) Close() error
- func (r IndexColumnSet) Columns() ([]string, error)
- func (r IndexColumnSet) Err() error
- func (c IndexColumnSet) Get() *IndexColumn
- func (r *IndexColumnSet) Len() int
- func (r *IndexColumnSet) Next() bool
- func (r IndexColumnSet) NextResultSet() bool
- func (r *IndexColumnSet) Reset()
- func (r IndexColumnSet) Scan(dest ...interface{}) error
- func (r *IndexColumnSet) SetColumns(c []string)
- func (r *IndexColumnSet) SetFilter(f func(Result) bool)
- func (r *IndexColumnSet) SetScanValues(s func(Result) []interface{})
- type IndexReader
- type IndexSet
- func (r IndexSet) Close() error
- func (r IndexSet) Columns() ([]string, error)
- func (r IndexSet) Err() error
- func (i IndexSet) Get() *Index
- func (r *IndexSet) Len() int
- func (r *IndexSet) Next() bool
- func (r IndexSet) NextResultSet() bool
- func (r *IndexSet) Reset()
- func (r IndexSet) Scan(dest ...interface{}) error
- func (r *IndexSet) SetColumns(c []string)
- func (r *IndexSet) SetFilter(f func(Result) bool)
- func (r *IndexSet) SetScanValues(s func(Result) []interface{})
- type LoggingReader
- type PluginReader
- func (p PluginReader) Catalogs(f Filter) (*CatalogSet, error)
- func (p PluginReader) ColumnStats(f Filter) (*ColumnStatSet, error)
- func (p PluginReader) Columns(f Filter) (*ColumnSet, error)
- func (p PluginReader) ConstraintColumns(f Filter) (*ConstraintColumnSet, error)
- func (p PluginReader) Constraints(f Filter) (*ConstraintSet, error)
- func (p PluginReader) FunctionColumns(f Filter) (*FunctionColumnSet, error)
- func (p PluginReader) Functions(f Filter) (*FunctionSet, error)
- func (p PluginReader) IndexColumns(f Filter) (*IndexColumnSet, error)
- func (p PluginReader) Indexes(f Filter) (*IndexSet, error)
- func (p PluginReader) Schemas(f Filter) (*SchemaSet, error)
- func (p PluginReader) Sequences(f Filter) (*SequenceSet, error)
- func (p PluginReader) Tables(f Filter) (*TableSet, error)
- func (p PluginReader) Triggers(f Filter) (*TriggerSet, error)
- type Reader
- type ReaderOption
- type Result
- type Schema
- type SchemaReader
- type SchemaSet
- func (r SchemaSet) Close() error
- func (r SchemaSet) Columns() ([]string, error)
- func (r SchemaSet) Err() error
- func (s SchemaSet) Get() *Schema
- func (r *SchemaSet) Len() int
- func (r *SchemaSet) Next() bool
- func (r SchemaSet) NextResultSet() bool
- func (r *SchemaSet) Reset()
- func (r SchemaSet) Scan(dest ...interface{}) error
- func (r *SchemaSet) SetColumns(c []string)
- func (r *SchemaSet) SetFilter(f func(Result) bool)
- func (r *SchemaSet) SetScanValues(s func(Result) []interface{})
- type Sequence
- type SequenceReader
- type SequenceSet
- func (r SequenceSet) Close() error
- func (r SequenceSet) Columns() ([]string, error)
- func (r SequenceSet) Err() error
- func (s SequenceSet) Get() *Sequence
- func (r *SequenceSet) Len() int
- func (r *SequenceSet) Next() bool
- func (r SequenceSet) NextResultSet() bool
- func (r *SequenceSet) Reset()
- func (r SequenceSet) Scan(dest ...interface{}) error
- func (r *SequenceSet) SetColumns(c []string)
- func (r *SequenceSet) SetFilter(f func(Result) bool)
- func (r *SequenceSet) SetScanValues(s func(Result) []interface{})
- type Table
- type TableReader
- type TableSet
- func (r TableSet) Close() error
- func (r TableSet) Columns() ([]string, error)
- func (r TableSet) Err() error
- func (t TableSet) Get() *Table
- func (r *TableSet) Len() int
- func (r *TableSet) Next() bool
- func (r TableSet) NextResultSet() bool
- func (r *TableSet) Reset()
- func (r TableSet) Scan(dest ...interface{}) error
- func (r *TableSet) SetColumns(c []string)
- func (r *TableSet) SetFilter(f func(Result) bool)
- func (r *TableSet) SetScanValues(s func(Result) []interface{})
- type Trigger
- type TriggerReader
- type TriggerSet
- func (r TriggerSet) Close() error
- func (r TriggerSet) Columns() ([]string, error)
- func (r TriggerSet) Err() error
- func (t TriggerSet) Get() *Trigger
- func (r *TriggerSet) Len() int
- func (r *TriggerSet) Next() bool
- func (r TriggerSet) NextResultSet() bool
- func (r *TriggerSet) Reset()
- func (r TriggerSet) Scan(dest ...interface{}) error
- func (r *TriggerSet) SetColumns(c []string)
- func (r *TriggerSet) SetFilter(f func(Result) bool)
- func (r *TriggerSet) SetScanValues(s func(Result) []interface{})
- type Writer
- type WriterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultWriter ¶
Types ¶
type BasicReader ¶
type BasicReader interface { SchemaReader TableReader ColumnReader }
BasicReader of common database metadata like schemas, tables and columns.
type CatalogReader ¶
type CatalogReader interface { Reader Catalogs(Filter) (*CatalogSet, error) }
CatalogReader lists database schemas.
type CatalogSet ¶
type CatalogSet struct {
// contains filtered or unexported fields
}
func NewCatalogSet ¶
func NewCatalogSet(v []Catalog) *CatalogSet
func (CatalogSet) Get ¶
func (s CatalogSet) Get() *Catalog
func (CatalogSet) NextResultSet ¶
func (r CatalogSet) NextResultSet() bool
func (*CatalogSet) SetColumns ¶
func (r *CatalogSet) SetColumns(c []string)
func (*CatalogSet) SetScanValues ¶
func (r *CatalogSet) SetScanValues(s func(Result) []interface{})
type CloseFunc ¶ added in v0.9.0
type CloseFunc func()
CloseFunc should be called when result wont be processed anymore
type ColumnReader ¶
ColumnReader lists table columns.
type ColumnSet ¶
type ColumnSet struct {
// contains filtered or unexported fields
}
func NewColumnSet ¶
func (ColumnSet) NextResultSet ¶
func (r ColumnSet) NextResultSet() bool
func (*ColumnSet) SetColumns ¶
func (r *ColumnSet) SetColumns(c []string)
func (*ColumnSet) SetScanValues ¶
func (r *ColumnSet) SetScanValues(s func(Result) []interface{})
type ColumnStat ¶ added in v0.9.5
type ColumnStatReader ¶ added in v0.9.5
type ColumnStatReader interface { Reader ColumnStats(Filter) (*ColumnStatSet, error) }
ColumnStatsReader lists table column statistics.
type ColumnStatSet ¶ added in v0.9.5
type ColumnStatSet struct {
// contains filtered or unexported fields
}
func NewColumnStatSet ¶ added in v0.9.5
func NewColumnStatSet(v []ColumnStat) *ColumnStatSet
func (ColumnStatSet) Get ¶ added in v0.9.5
func (c ColumnStatSet) Get() *ColumnStat
func (ColumnStatSet) NextResultSet ¶ added in v0.9.5
func (r ColumnStatSet) NextResultSet() bool
func (*ColumnStatSet) SetColumns ¶ added in v0.9.5
func (r *ColumnStatSet) SetColumns(c []string)
func (*ColumnStatSet) SetScanValues ¶ added in v0.9.5
func (r *ColumnStatSet) SetScanValues(s func(Result) []interface{})
type Constraint ¶ added in v0.9.0
type ConstraintColumn ¶ added in v0.9.0
type ConstraintColumnReader ¶ added in v0.9.0
type ConstraintColumnReader interface { Reader ConstraintColumns(Filter) (*ConstraintColumnSet, error) }
ConstraintColumnReader lists constraint columns.
type ConstraintColumnSet ¶ added in v0.9.0
type ConstraintColumnSet struct {
// contains filtered or unexported fields
}
func NewConstraintColumnSet ¶ added in v0.9.0
func NewConstraintColumnSet(v []ConstraintColumn) *ConstraintColumnSet
func (ConstraintColumnSet) Get ¶ added in v0.9.0
func (c ConstraintColumnSet) Get() *ConstraintColumn
func (ConstraintColumnSet) NextResultSet ¶ added in v0.9.0
func (r ConstraintColumnSet) NextResultSet() bool
func (ConstraintColumnSet) Scan ¶ added in v0.9.0
func (r ConstraintColumnSet) Scan(dest ...interface{}) error
func (*ConstraintColumnSet) SetColumns ¶ added in v0.9.0
func (r *ConstraintColumnSet) SetColumns(c []string)
func (*ConstraintColumnSet) SetScanValues ¶ added in v0.9.0
func (r *ConstraintColumnSet) SetScanValues(s func(Result) []interface{})
type ConstraintReader ¶ added in v0.9.0
type ConstraintReader interface { Reader Constraints(Filter) (*ConstraintSet, error) }
ConstraintReader lists table constraints.
type ConstraintSet ¶ added in v0.9.0
type ConstraintSet struct {
// contains filtered or unexported fields
}
func NewConstraintSet ¶ added in v0.9.0
func NewConstraintSet(v []Constraint) *ConstraintSet
func (ConstraintSet) Get ¶ added in v0.9.0
func (i ConstraintSet) Get() *Constraint
func (ConstraintSet) NextResultSet ¶ added in v0.9.0
func (r ConstraintSet) NextResultSet() bool
func (*ConstraintSet) SetColumns ¶ added in v0.9.0
func (r *ConstraintSet) SetColumns(c []string)
func (*ConstraintSet) SetScanValues ¶ added in v0.9.0
func (r *ConstraintSet) SetScanValues(s func(Result) []interface{})
type DB ¶
type DB interface { Exec(string, ...interface{}) (sql.Result, error) ExecContext(context.Context, string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row QueryRowContext(context.Context, string, ...interface{}) *sql.Row Prepare(string) (*sql.Stmt, error) PrepareContext(context.Context, string) (*sql.Stmt, error) }
DB is the common interface for database operations, compatible with database/sql.DB and database/sql.Tx.
type DefaultWriter ¶
type DefaultWriter struct {
// contains filtered or unexported fields
}
DefaultWriter using an existing db introspector
func (DefaultWriter) DescribeFunctions ¶
func (w DefaultWriter) DescribeFunctions(u *dburl.URL, funcTypes, pattern string, verbose, showSystem bool) error
DescribeFunctions matching pattern
func (DefaultWriter) DescribeTableDetails ¶
func (w DefaultWriter) DescribeTableDetails(u *dburl.URL, pattern string, verbose, showSystem bool) error
DescribeTableDetails matching pattern
func (DefaultWriter) ListAllDbs ¶
ListAllDbs matching pattern
func (DefaultWriter) ListIndexes ¶
ListIndexes matching pattern
func (DefaultWriter) ListSchemas ¶
ListSchemas matching pattern
func (DefaultWriter) ListTables ¶
func (w DefaultWriter) ListTables(u *dburl.URL, tableTypes, pattern string, verbose, showSystem bool) error
ListTables matching pattern
type ExtendedReader ¶
type ExtendedReader interface { CatalogReader SchemaReader TableReader ColumnReader ColumnStatReader IndexReader IndexColumnReader TriggerReader ConstraintReader ConstraintColumnReader FunctionReader FunctionColumnReader SequenceReader }
ExtendedReader of all database metadata in a structured format.
type Filter ¶ added in v0.9.0
type Filter struct { // Catalog name pattern that objects must belong to; // use Name to filter catalogs by name Catalog string // Schema name pattern that objects must belong to; // use Name to filter schemas by name Schema string // Parent name pattern that objects must belong to; // does not apply to schema and catalog containing matching objects Parent string // Reference name pattern of other objects referencing this one, Reference string // Name pattern that object name must match Name string // Types of the object Types []string // WithSystem objects WithSystem bool // OnlyVisible objects OnlyVisible bool }
Filter objects returned by Readers
type FunctionColumn ¶
type FunctionColumnReader ¶
type FunctionColumnReader interface { Reader FunctionColumns(Filter) (*FunctionColumnSet, error) }
FunctionColumnReader lists function parameters.
type FunctionColumnSet ¶
type FunctionColumnSet struct {
// contains filtered or unexported fields
}
func NewFunctionColumnSet ¶
func NewFunctionColumnSet(v []FunctionColumn) *FunctionColumnSet
func (FunctionColumnSet) Get ¶
func (c FunctionColumnSet) Get() *FunctionColumn
func (FunctionColumnSet) NextResultSet ¶
func (r FunctionColumnSet) NextResultSet() bool
func (*FunctionColumnSet) SetColumns ¶
func (r *FunctionColumnSet) SetColumns(c []string)
func (*FunctionColumnSet) SetScanValues ¶
func (r *FunctionColumnSet) SetScanValues(s func(Result) []interface{})
type FunctionReader ¶
type FunctionReader interface { Reader Functions(Filter) (*FunctionSet, error) }
FunctionReader lists database functions.
type FunctionSet ¶
type FunctionSet struct {
// contains filtered or unexported fields
}
func NewFunctionSet ¶
func NewFunctionSet(v []Function) *FunctionSet
func (FunctionSet) Get ¶
func (f FunctionSet) Get() *Function
func (FunctionSet) NextResultSet ¶
func (r FunctionSet) NextResultSet() bool
func (*FunctionSet) SetColumns ¶
func (r *FunctionSet) SetColumns(c []string)
func (*FunctionSet) SetScanValues ¶
func (r *FunctionSet) SetScanValues(s func(Result) []interface{})
type IndexColumn ¶
type IndexColumnReader ¶
type IndexColumnReader interface { Reader IndexColumns(Filter) (*IndexColumnSet, error) }
IndexColumnReader lists index columns.
type IndexColumnSet ¶
type IndexColumnSet struct {
// contains filtered or unexported fields
}
func NewIndexColumnSet ¶
func NewIndexColumnSet(v []IndexColumn) *IndexColumnSet
func (IndexColumnSet) Get ¶
func (c IndexColumnSet) Get() *IndexColumn
func (IndexColumnSet) NextResultSet ¶
func (r IndexColumnSet) NextResultSet() bool
func (*IndexColumnSet) SetColumns ¶
func (r *IndexColumnSet) SetColumns(c []string)
func (*IndexColumnSet) SetScanValues ¶
func (r *IndexColumnSet) SetScanValues(s func(Result) []interface{})
type IndexReader ¶
IndexReader lists table indexes.
type IndexSet ¶
type IndexSet struct {
// contains filtered or unexported fields
}
func NewIndexSet ¶
func (IndexSet) NextResultSet ¶
func (r IndexSet) NextResultSet() bool
func (*IndexSet) SetColumns ¶
func (r *IndexSet) SetColumns(c []string)
func (*IndexSet) SetScanValues ¶
func (r *IndexSet) SetScanValues(s func(Result) []interface{})
type LoggingReader ¶
type LoggingReader struct {
// contains filtered or unexported fields
}
func NewLoggingReader ¶
func NewLoggingReader(db DB, opts ...ReaderOption) LoggingReader
type PluginReader ¶
type PluginReader struct {
// contains filtered or unexported fields
}
PluginReader allows to be easily composed from other readers
func (PluginReader) Catalogs ¶
func (p PluginReader) Catalogs(f Filter) (*CatalogSet, error)
func (PluginReader) ColumnStats ¶ added in v0.9.5
func (p PluginReader) ColumnStats(f Filter) (*ColumnStatSet, error)
func (PluginReader) ConstraintColumns ¶ added in v0.9.0
func (p PluginReader) ConstraintColumns(f Filter) (*ConstraintColumnSet, error)
func (PluginReader) Constraints ¶ added in v0.9.0
func (p PluginReader) Constraints(f Filter) (*ConstraintSet, error)
func (PluginReader) FunctionColumns ¶
func (p PluginReader) FunctionColumns(f Filter) (*FunctionColumnSet, error)
func (PluginReader) Functions ¶
func (p PluginReader) Functions(f Filter) (*FunctionSet, error)
func (PluginReader) IndexColumns ¶
func (p PluginReader) IndexColumns(f Filter) (*IndexColumnSet, error)
func (PluginReader) Sequences ¶
func (p PluginReader) Sequences(f Filter) (*SequenceSet, error)
func (PluginReader) Triggers ¶ added in v0.9.3
func (p PluginReader) Triggers(f Filter) (*TriggerSet, error)
type Reader ¶
type Reader interface{}
Reader of any database metadata in a structured format.
func NewPluginReader ¶
NewPluginReader allows to be easily composed from other readers
type ReaderOption ¶
type ReaderOption func(Reader)
ReaderOption to configure the reader
func WithDryRun ¶
func WithDryRun(d bool) ReaderOption
WithDryRun allows to avoid running any queries
func WithLimit ¶ added in v0.9.0
func WithLimit(l int) ReaderOption
WithLimit for a single query, if the reader supports it
func WithLogger ¶
func WithLogger(l logger) ReaderOption
WithLogger used to log queries before executing them
func WithTimeout ¶ added in v0.9.0
func WithTimeout(t time.Duration) ReaderOption
WithTimeout for a single query
type SchemaReader ¶
SchemaReader lists database schemas.
type SchemaSet ¶
type SchemaSet struct {
// contains filtered or unexported fields
}
func NewSchemaSet ¶
func (SchemaSet) NextResultSet ¶
func (r SchemaSet) NextResultSet() bool
func (*SchemaSet) SetColumns ¶
func (r *SchemaSet) SetColumns(c []string)
func (*SchemaSet) SetScanValues ¶
func (r *SchemaSet) SetScanValues(s func(Result) []interface{})
type SequenceReader ¶
type SequenceReader interface { Reader Sequences(Filter) (*SequenceSet, error) }
SequenceReader lists sequences.
type SequenceSet ¶
type SequenceSet struct {
// contains filtered or unexported fields
}
func NewSequenceSet ¶
func NewSequenceSet(v []Sequence) *SequenceSet
func (SequenceSet) Get ¶
func (s SequenceSet) Get() *Sequence
func (SequenceSet) NextResultSet ¶
func (r SequenceSet) NextResultSet() bool
func (*SequenceSet) SetColumns ¶
func (r *SequenceSet) SetColumns(c []string)
func (*SequenceSet) SetScanValues ¶
func (r *SequenceSet) SetScanValues(s func(Result) []interface{})
type TableReader ¶
TableReader lists database tables.
type TableSet ¶
type TableSet struct {
// contains filtered or unexported fields
}
func NewTableSet ¶
func (TableSet) NextResultSet ¶
func (r TableSet) NextResultSet() bool
func (*TableSet) SetColumns ¶
func (r *TableSet) SetColumns(c []string)
func (*TableSet) SetScanValues ¶
func (r *TableSet) SetScanValues(s func(Result) []interface{})
type TriggerReader ¶ added in v0.9.3
type TriggerReader interface { Reader Triggers(Filter) (*TriggerSet, error) }
TriggerReader lists table triggers.
type TriggerSet ¶ added in v0.9.3
type TriggerSet struct {
// contains filtered or unexported fields
}
func NewTriggerSet ¶ added in v0.9.3
func NewTriggerSet(t []Trigger) *TriggerSet
func (TriggerSet) Get ¶ added in v0.9.3
func (t TriggerSet) Get() *Trigger
func (TriggerSet) NextResultSet ¶ added in v0.9.3
func (r TriggerSet) NextResultSet() bool
func (*TriggerSet) SetColumns ¶ added in v0.9.3
func (r *TriggerSet) SetColumns(c []string)
func (*TriggerSet) SetScanValues ¶ added in v0.9.3
func (r *TriggerSet) SetScanValues(s func(Result) []interface{})
type Writer ¶
type Writer interface { // DescribeFunctions \df, \dfa, \dfn, \dft, \dfw, etc. DescribeFunctions(*dburl.URL, string, string, bool, bool) error // DescribeTableDetails \d foo DescribeTableDetails(*dburl.URL, string, bool, bool) error // ListAllDbs \l ListAllDbs(*dburl.URL, string, bool) error // ListTables \dt, \dv, \dm, etc. ListTables(*dburl.URL, string, string, bool, bool) error // ListSchemas \dn ListSchemas(*dburl.URL, string, bool, bool) error // ListIndexes \di ListIndexes(*dburl.URL, string, bool, bool) error // ShowStats \ss ShowStats(*dburl.URL, string, string, bool, int) error }
Writer of database metadata in a human readable format.
type WriterOption ¶
type WriterOption func(*DefaultWriter)
WriterOption to configure the DefaultWriter
func WithListAllDbs ¶
func WithListAllDbs(f func(string, bool) error) WriterOption
WithListAllDbs that lists all catalogs
func WithSystemSchemas ¶
func WithSystemSchemas(schemas []string) WriterOption
WithSystemSchemas that are ignored unless showSystem is true
Directories ¶
Path | Synopsis |
---|---|
Package informationschema provides metadata readers that query tables from the information_schema schema.
|
Package informationschema provides metadata readers that query tables from the information_schema schema. |
Package oracle provides a metadata reader
|
Package oracle provides a metadata reader |
Package postgres provides a metadata reader
|
Package postgres provides a metadata reader |