Documentation
¶
Index ¶
- func DiffTables(db1, db2 objects.Store, tbl1, tbl2 *objects.Table, tblIdx1, tblIdx2 [][]string, ...) (<-chan *objects.Diff, progress.Tracker)
- func RowToBlockAndOffset(row uint32) (uint32, byte)
- type BlockBuffer
- type ColDiff
- func (c *ColDiff) CombineRows(layer int, row, oldRow []string) (mergedRows [][]string)
- func (c *ColDiff) Layers() int
- func (c *ColDiff) Len() int
- func (c *ColDiff) Less(i, j int) bool
- func (c *ColDiff) PK() []string
- func (c *ColDiff) PKIndices() []uint32
- func (c *ColDiff) RearrangeBaseRow(row []string) []string
- func (c *ColDiff) RearrangeRow(layer int, row []string) []string
- func (c *ColDiff) Swap(i, j int)
- type DiffOption
- type Differ
- type RowChangeReader
- type RowListReader
- type RowReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffTables ¶
func RowToBlockAndOffset ¶
Types ¶
type BlockBuffer ¶
type BlockBuffer struct {
// contains filtered or unexported fields
}
func NewBlockBuffer ¶
type ColDiff ¶
type ColDiff struct { Names []string BasePK []uint32 OtherPK [][]uint32 Added []map[uint32]struct{} Removed []map[uint32]struct{} Moved []map[uint32][]int BaseIdx map[uint32]uint32 OtherIdx []map[uint32]uint32 // contains filtered or unexported fields }
ColDiff keep track of how column composition and order change between a base version and one or more versions
func CompareColumns ¶
func (*ColDiff) CombineRows ¶
func (*ColDiff) RearrangeBaseRow ¶
type DiffOption ¶
type DiffOption func(*Differ)
func WithEmitUnchangedRow ¶
func WithEmitUnchangedRow() DiffOption
WithEmitUnchangedRow tells DiffTables to emit even row that stayed the same between two tables.
func WithProgressInterval ¶
func WithProgressInterval(du time.Duration) DiffOption
WithProgressInterval tells DiffTables to emit progress event at specified interval
type RowChangeReader ¶
type RowChangeReader struct { ColDiff *ColDiff // contains filtered or unexported fields }
func NewRowChangeReader ¶
func (*RowChangeReader) AddRowDiff ¶
func (r *RowChangeReader) AddRowDiff(d *objects.Diff)
func (*RowChangeReader) Len ¶ added in v0.7.7
func (r *RowChangeReader) Len() int
func (*RowChangeReader) Read ¶
func (r *RowChangeReader) Read() ([][]string, error)
type RowListReader ¶
type RowListReader struct {
// contains filtered or unexported fields
}
func NewRowListReader ¶
func (*RowListReader) Add ¶
func (r *RowListReader) Add(row uint32)
func (*RowListReader) Len ¶
func (r *RowListReader) Len() int
func (*RowListReader) Read ¶
func (r *RowListReader) Read() ([]string, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.