Documentation
¶
Index ¶
- type SqlEngine
- type SqlReader
- func (s *SqlReader) FormatColumn(tableName string, columnName string) string
- func (s *SqlReader) GetColumns(tableName string) ([]string, error)
- func (s *SqlReader) GetTables() ([]string, error)
- func (s *SqlReader) ReadTable(tableName string, rowChan chan<- database.Row, opts reader.ReadTableOpt, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SqlEngine ¶
type SqlEngine interface {
// GetConnection return the sql.DB connection
GetConnection() *sql.DB
// GetStructure returns the SQL used to create the database tables
GetStructure() (string, error)
// GetTables return a list of all database tables
GetTables() ([]string, error)
// GetColumns return a list of all columns for a given table
GetColumns(string) ([]string, error)
// QuoteIdentifier returns a quoted instance of a identifier (table, column etc.)
QuoteIdentifier(string) string
// Close closes the connection and other resources and releases them.
Close() error
}
sqlReader is a base class for sql related readers
type SqlReader ¶
type SqlReader struct {
SqlEngine
// contains filtered or unexported fields
}
sqlReader is a base class for sql related readers
func NewSqlReader ¶
NewSqlReader creates a new sql reader
func (*SqlReader) FormatColumn ¶
FormatColumn returns a escaped table+column string
func (*SqlReader) GetColumns ¶
GetColumns returns the columns in the specified database table
Click to show internal directories.
Click to hide internal directories.