Documentation ¶
Index ¶
- type ReadDataSource
- type ReadWriteDatasource
- func (rw *ReadWriteDatasource) CreateTempTable(ctx context.Context, name string, sourceTable string) error
- func (rw *ReadWriteDatasource) DeleteAll(ctx context.Context, table string) error
- func (rw *ReadWriteDatasource) GetTempTableRowCount(ctx context.Context, table string) (int64, error)
- func (rw *ReadWriteDatasource) InsertFromTempTable(ctx context.Context, tempTable string, destTable string, sourceFields []string, ...) error
- func (rw *ReadWriteDatasource) SetSequence(ctx context.Context, sequence string, value int) error
- func (rw *ReadWriteDatasource) Truncate(ctx context.Context, table string) error
- type ReaderDataSource
- func (r *ReaderDataSource) GetColumns(ctx context.Context) ([]db.Column, error)
- func (r *ReaderDataSource) GetName() string
- func (r *ReaderDataSource) GetNonDeferrableConstraints(ctx context.Context) ([]db.NonDeferrableConstraints, error)
- func (r *ReaderDataSource) GetPrimaryKeys(ctx context.Context) ([]db.PrimaryKey, error)
- func (r *ReaderDataSource) GetSchemas(ctx context.Context) ([]string, error)
- func (r *ReaderDataSource) GetSequences(ctx context.Context) ([]db.Sequence, error)
- func (r *ReaderDataSource) GetTables(ctx context.Context) ([]db.Table, error)
- func (r *ReaderDataSource) GetTriggers(ctx context.Context, table string) ([]db.Trigger, error)
- func (r *ReaderDataSource) IsLocalHost(ctx context.Context) bool
- func (r *ReaderDataSource) StatusCheck(ctx context.Context) error
- func (r *ReaderDataSource) TableExists(table db.Table) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadDataSource ¶
type ReadDataSource interface { GetTables(ctx context.Context) ([]db.Table, error) TableExists(table db.Table) bool GetSchemas(ctx context.Context) ([]string, error) GetTriggers(ctx context.Context, table string) ([]db.Trigger, error) StatusCheck(ctx context.Context) error GetNonDeferrableConstraints(ctx context.Context) ([]db.NonDeferrableConstraints, error) GetName() string }
type ReadWriteDatasource ¶
type ReadWriteDatasource struct {
ReaderDataSource
}
func NewReadWriteDataSource ¶
func NewReadWriteDataSource(Name string, Url string) (*ReadWriteDatasource, error)
func (*ReadWriteDatasource) CreateTempTable ¶
func (*ReadWriteDatasource) DeleteAll ¶
func (rw *ReadWriteDatasource) DeleteAll(ctx context.Context, table string) error
func (*ReadWriteDatasource) GetTempTableRowCount ¶
func (*ReadWriteDatasource) InsertFromTempTable ¶
func (*ReadWriteDatasource) SetSequence ¶
type ReaderDataSource ¶
func NewReadDataSource ¶
func NewReadDataSource(Name string, Url string) (*ReaderDataSource, error)
func (*ReaderDataSource) GetColumns ¶
func (*ReaderDataSource) GetName ¶
func (r *ReaderDataSource) GetName() string
func (*ReaderDataSource) GetNonDeferrableConstraints ¶
func (r *ReaderDataSource) GetNonDeferrableConstraints(ctx context.Context) ([]db.NonDeferrableConstraints, error)
func (*ReaderDataSource) GetPrimaryKeys ¶
func (r *ReaderDataSource) GetPrimaryKeys(ctx context.Context) ([]db.PrimaryKey, error)
TODO handle pk order for multi column pks
func (*ReaderDataSource) GetSchemas ¶
func (r *ReaderDataSource) GetSchemas(ctx context.Context) ([]string, error)
func (*ReaderDataSource) GetSequences ¶
func (*ReaderDataSource) GetTriggers ¶
func (*ReaderDataSource) IsLocalHost ¶
func (r *ReaderDataSource) IsLocalHost(ctx context.Context) bool
func (*ReaderDataSource) StatusCheck ¶
func (r *ReaderDataSource) StatusCheck(ctx context.Context) error
func (*ReaderDataSource) TableExists ¶
func (r *ReaderDataSource) TableExists(table db.Table) bool
Click to show internal directories.
Click to hide internal directories.