Documentation
¶
Index ¶
- func CreateTableSql(tablename string, t reflect.Type) string
- func NamedInsertSql(tablename string, t reflect.Type) (string, error)
- func TagAsPositionMap(tag string, data interface{}) map[string]int
- func TagAsStringArray(tag string, data interface{}) []string
- func TagsAndVals(tag string, data interface{}) ([]string, []interface{})
- func ValsAsInterfaceArray(data interface{}) []interface{}
- func ValueMap(tag string, data interface{}) map[string]interface{}
- type BindParamTemplateFunction
- type Connx
- type DbConfig
- type Destination
- type DevNullDb
- func (dndb *DevNullDb) Close()
- func (dndb *DevNullDb) Commit() error
- func (dndb *DevNullDb) CopyRow(table *Table, rowNum int, row interface{})
- func (dndb *DevNullDb) CreateTable(table *Table) error
- func (dndb *DevNullDb) GetRows(table *Table) (Rows, error)
- func (dndb *DevNullDb) Rollback() error
- func (dndb *DevNullDb) StartTransaction() error
- func (dndb *DevNullDb) TableExists(schema string, name string) (bool, error)
- type ETL
- type NamedStatement
- type PgxRows
- type PostgresDb
- func (pdb *PostgresDb) Close()
- func (pdb *PostgresDb) Commit() error
- func (pdb *PostgresDb) CopyRow(table *Table, rowNum int, row interface{})
- func (pdb *PostgresDb) CreateTable(table *Table) error
- func (pdb *PostgresDb) GetRows(table *Table) (Rows, error)
- func (pdb *PostgresDb) Rollback() error
- func (pdb *PostgresDb) StartTransaction() error
- func (pdb *PostgresDb) TableExists(schema string, name string) (bool, error)
- type Rows
- type Source
- type SqlDb
- func (sdb *SqlDb) Close()
- func (sdb *SqlDb) Commit() error
- func (sdb *SqlDb) CopyRow(table *Table, rowNum int, row interface{})
- func (sdb *SqlDb) CreateTable(table *Table) error
- func (sdb *SqlDb) GetRows(table *Table) (Rows, error)
- func (sdb *SqlDb) Rollback() error
- func (sdb *SqlDb) StartTransaction() error
- func (sdb *SqlDb) TableExists(schema string, name string) (bool, error)
- type SqlDbImpl
- type SqldbRows
- type Table
- type TransferOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamedInsertSql ¶
@TODO should replace with more flexible structToInsert
func TagAsPositionMap ¶
func TagAsStringArray ¶
func TagsAndVals ¶
func ValsAsInterfaceArray ¶
func ValsAsInterfaceArray(data interface{}) []interface{}
Types ¶
type Connx ¶
type Connx struct {
// contains filtered or unexported fields
}
func (*Connx) FlushBatch ¶
func (c *Connx) FlushBatch()
type DbConfig ¶
type Destination ¶
type DevNullDb ¶
type DevNullDb struct{}
func NewDevNullDb ¶
func (*DevNullDb) CreateTable ¶
func (*DevNullDb) StartTransaction ¶
type ETL ¶
type ETL struct {
// contains filtered or unexported fields
}
func NewEtl ¶
func NewEtl(source Source, dest Destination, options TransferOptions) ETL
type NamedStatement ¶
type NamedStatement struct {
ParamSql string
// contains filtered or unexported fields
}
func NewNamedStatement ¶
func NewNamedStatement(driver string, templateFunction BindParamTemplateFunction, table *Table) (NamedStatement, error)
func (*NamedStatement) ParamArray ¶
func (ns *NamedStatement) ParamArray(data interface{}) []interface{}
type PgxRows ¶
type PgxRows struct {
// contains filtered or unexported fields
}
func (PgxRows) StructScan ¶
type PostgresDb ¶
type PostgresDb struct {
// contains filtered or unexported fields
}
func NewPostgresDb ¶
func NewPostgresDb(c DbConfig) (*PostgresDb, error)
func (*PostgresDb) Close ¶
func (pdb *PostgresDb) Close()
func (*PostgresDb) Commit ¶
func (pdb *PostgresDb) Commit() error
func (*PostgresDb) CopyRow ¶
func (pdb *PostgresDb) CopyRow(table *Table, rowNum int, row interface{})
func (*PostgresDb) CreateTable ¶
func (pdb *PostgresDb) CreateTable(table *Table) error
func (*PostgresDb) Rollback ¶
func (pdb *PostgresDb) Rollback() error
func (*PostgresDb) StartTransaction ¶
func (pdb *PostgresDb) StartTransaction() error
func (*PostgresDb) TableExists ¶
func (pdb *PostgresDb) TableExists(schema string, name string) (bool, error)
type SqlDb ¶
type SqlDb struct {
// contains filtered or unexported fields
}
func NewOracleSqlImpl ¶
func NewPostgresSqlImpl ¶
func NewSqliteSqlImpl ¶
func (*SqlDb) CreateTable ¶
func (*SqlDb) StartTransaction ¶
type SqlDbImpl ¶
type SqlDbImpl struct {
Driver string
Url string
TableExistsSql string
BindParamTemplateFunction BindParamTemplateFunction
}
type SqldbRows ¶
type SqldbRows struct {
// contains filtered or unexported fields
}
@TODO verify that the Next method is returning a reference from the Rows interface
func (SqldbRows) StructScan ¶
type TransferOptions ¶
Click to show internal directories.
Click to hide internal directories.