Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertToIntree(protoLog *BranchUndoLog) *undo.BranchUndoLog
- type BranchUndoLog
- func (*BranchUndoLog) Descriptor() ([]byte, []int)deprecated
- func (x *BranchUndoLog) GetBranchID() uint64
- func (x *BranchUndoLog) GetLogs() []*SQLUndoLog
- func (x *BranchUndoLog) GetXid() string
- func (*BranchUndoLog) ProtoMessage()
- func (x *BranchUndoLog) ProtoReflect() protoreflect.Message
- func (x *BranchUndoLog) Reset()
- func (x *BranchUndoLog) String() string
- type ColumnImage
- func (*ColumnImage) Descriptor() ([]byte, []int)deprecated
- func (x *ColumnImage) GetColumnName() string
- func (x *ColumnImage) GetColumnType() JDBCType
- func (x *ColumnImage) GetKeyType() IndexType
- func (x *ColumnImage) GetValue() *anypb.Any
- func (*ColumnImage) ProtoMessage()
- func (x *ColumnImage) ProtoReflect() protoreflect.Message
- func (x *ColumnImage) Reset()
- func (x *ColumnImage) String() string
- type ColumnMeta
- func (*ColumnMeta) Descriptor() ([]byte, []int)deprecated
- func (x *ColumnMeta) GetAutoincrement() bool
- func (x *ColumnMeta) GetColumnDef() []byte
- func (x *ColumnMeta) GetColumnKey() string
- func (x *ColumnMeta) GetColumnName() string
- func (x *ColumnMeta) GetColumnType() string
- func (x *ColumnMeta) GetDatabaseType() int32
- func (x *ColumnMeta) GetDatabaseTypeString() string
- func (x *ColumnMeta) GetExtra() string
- func (x *ColumnMeta) GetIsNullable() int32
- func (x *ColumnMeta) GetSchema() string
- func (x *ColumnMeta) GetTable() string
- func (*ColumnMeta) ProtoMessage()
- func (x *ColumnMeta) ProtoReflect() protoreflect.Message
- func (x *ColumnMeta) Reset()
- func (x *ColumnMeta) String() string
- type IndexMeta
- func (*IndexMeta) Descriptor() ([]byte, []int)deprecated
- func (x *IndexMeta) GetColumnName() string
- func (x *IndexMeta) GetColumns() []*ColumnMeta
- func (x *IndexMeta) GetIType() IndexType
- func (x *IndexMeta) GetName() string
- func (x *IndexMeta) GetSchema() string
- func (x *IndexMeta) GetTable() string
- func (*IndexMeta) ProtoMessage()
- func (x *IndexMeta) ProtoReflect() protoreflect.Message
- func (x *IndexMeta) Reset()
- func (x *IndexMeta) String() string
- type IndexType
- type JDBCType
- type JsonParser
- type ProtobufParser
- type RecordImage
- func (*RecordImage) Descriptor() ([]byte, []int)deprecated
- func (x *RecordImage) GetIndex() int32
- func (x *RecordImage) GetRows() []*RowImage
- func (x *RecordImage) GetSQLType() SQLType
- func (x *RecordImage) GetTableMeta() *TableMeta
- func (x *RecordImage) GetTableName() string
- func (*RecordImage) ProtoMessage()
- func (x *RecordImage) ProtoReflect() protoreflect.Message
- func (x *RecordImage) Reset()
- func (x *RecordImage) String() string
- type RowImage
- type SQLType
- type SQLUndoLog
- func (*SQLUndoLog) Descriptor() ([]byte, []int)deprecated
- func (x *SQLUndoLog) GetAfterImage() *RecordImage
- func (x *SQLUndoLog) GetBeforeImage() *RecordImage
- func (x *SQLUndoLog) GetSQLType() SQLType
- func (x *SQLUndoLog) GetTableName() string
- func (*SQLUndoLog) ProtoMessage()
- func (x *SQLUndoLog) ProtoReflect() protoreflect.Message
- func (x *SQLUndoLog) Reset()
- func (x *SQLUndoLog) String() string
- type TableMeta
- func (*TableMeta) Descriptor() ([]byte, []int)deprecated
- func (x *TableMeta) GetColumnNames() []string
- func (x *TableMeta) GetColumns() map[string]*ColumnMeta
- func (x *TableMeta) GetIndexs() map[string]*IndexMeta
- func (x *TableMeta) GetTableName() string
- func (*TableMeta) ProtoMessage()
- func (x *TableMeta) ProtoReflect() protoreflect.Message
- func (x *TableMeta) Reset()
- func (x *TableMeta) String() string
- type UndoLogParser
- type UndoLogParserCache
Constants ¶
const (
DefaultSerializer = "json"
)
Variables ¶
var ( IndexType_name = map[int32]string{ 0: "IndexTypeNull", 1: "IndexTypePrimaryKey", } IndexType_value = map[string]int32{ "IndexTypeNull": 0, "IndexTypePrimaryKey": 1, } )
Enum value maps for IndexType.
var ( JDBCType_name = map[int32]string{ 0: "JDBCTypeNull", -7: "JDBCTypeBit", -6: "JDBCTypeTinyInt", 5: "JDBCTypeSmallInt", 4: "JDBCTypeInteger", -5: "JDBCTypeBigInt", 6: "JDBCTypeFloat", 7: "JDBCTypeReal", 8: "JDBCTypeDouble", 2: "JDBCTypeNumberic", 3: "JDBCTypeDecimal", 1: "JDBCTypeChar", 12: "JDBCTypeVarchar", -1: "JDBCTypeLongVarchar", 91: "JDBCTypeDate", 92: "JDBCTypeTime", 93: "JDBCTypeTimestamp", -2: "JDBCTypeBinary", -3: "JDBCTypeVarBinary", -4: "JDBCTypeLongVarBinary", 1111: "JDBCTypeOther", 2000: "JDBCTypeJavaObject", 2001: "JDBCTypeDistinct", 2002: "JDBCTypeStruct", 2003: "JDBCTypeArray", 2004: "JDBCTypeBlob", 2005: "JDBCTypeClob", 2006: "JDBCTypeRef", 70: "JDBCTypeDateLink", 16: "JDBCTypeBoolean", -8: "JDBCTypeRowID", -15: "JDBCTypeNchar", -9: "JDBCTypeNvarchar", -16: "JDBCTypeLongNvVarchar", 2011: "JDBCTypeNclob", 2009: "JDBCTypeSqlXML", 2012: "JDBCTypeRefCursor", 2013: "JDBCTypeTimeWithTimeZone", 2014: "JDBCTypeTimestampWithTimezone", } JDBCType_value = map[string]int32{ "JDBCTypeNull": 0, "JDBCTypeBit": -7, "JDBCTypeTinyInt": -6, "JDBCTypeSmallInt": 5, "JDBCTypeInteger": 4, "JDBCTypeBigInt": -5, "JDBCTypeFloat": 6, "JDBCTypeReal": 7, "JDBCTypeDouble": 8, "JDBCTypeNumberic": 2, "JDBCTypeDecimal": 3, "JDBCTypeChar": 1, "JDBCTypeVarchar": 12, "JDBCTypeLongVarchar": -1, "JDBCTypeDate": 91, "JDBCTypeTime": 92, "JDBCTypeTimestamp": 93, "JDBCTypeBinary": -2, "JDBCTypeVarBinary": -3, "JDBCTypeLongVarBinary": -4, "JDBCTypeOther": 1111, "JDBCTypeJavaObject": 2000, "JDBCTypeDistinct": 2001, "JDBCTypeStruct": 2002, "JDBCTypeArray": 2003, "JDBCTypeBlob": 2004, "JDBCTypeClob": 2005, "JDBCTypeRef": 2006, "JDBCTypeDateLink": 70, "JDBCTypeBoolean": 16, "JDBCTypeRowID": -8, "JDBCTypeNchar": -15, "JDBCTypeNvarchar": -9, "JDBCTypeLongNvVarchar": -16, "JDBCTypeNclob": 2011, "JDBCTypeSqlXML": 2009, "JDBCTypeRefCursor": 2012, "JDBCTypeTimeWithTimeZone": 2013, "JDBCTypeTimestampWithTimezone": 2014, } )
Enum value maps for JDBCType.
var ( SQLType_name = map[int32]string{ 0: "SQLTypeSelect", 1: "SQLTypeInsert", 2: "SQLTypeUpdate", 3: "SQLTypeDelete", 4: "SQLTypeSelectForUpdate", 5: "SQLTypeReplace", 6: "SQLTypeTruncate", 7: "SQLTypeCreate", 8: "SQLTypeDrop", 9: "SQLTypeLoad", 10: "SQLTypeMerge", 11: "SQLTypeShow", 12: "SQLTypeAlter", 13: "SQLTypeRename", 14: "SQLTypeDump", 15: "SQLTypeDebug", 16: "SQLTypeExplain", 17: "SQLTypeProcedure", 18: "SQLTypeDesc", 19: "SQLLastInsertID", 20: "SQLSelectWithoutTable", 21: "SQLCreateSequence", 22: "SQLShowSequence", 23: "SQLGetSequence", 24: "SQLAlterSequence", 25: "SQLDropSequence", 26: "SQLTddlShow", 27: "SQLTypeSet", 28: "SQLTypeReload", 29: "SQLTypeSelectUnion", 30: "SQLTypeCreateTable", 31: "SQLTypeDropTable", 32: "SQLTypeAlterTable", 33: "SQLTypeSavePoint", 34: "SQLTypeSelectFromUpdate", 35: "SQLTypeMultiDelete", 36: "SQLTypeMultiUpdate", 37: "SQLTypeCreateIndex", 38: "SQLTypeDropIndex", 39: "SQLTypeKill", 40: "SQLTypeLockTables", 41: "SQLTypeUnLockTables", 42: "SQLTypeCheckTable", 43: "SQLTypeSelectFoundRows", 101: "SQLTypeInsertIgnore", 102: "SQLTypeInsertOnDuplicateUpdate", 1044: "SQLTypeMulti", 1045: "SQLTypeUnknown", } SQLType_value = map[string]int32{ "SQLTypeSelect": 0, "SQLTypeInsert": 1, "SQLTypeUpdate": 2, "SQLTypeDelete": 3, "SQLTypeSelectForUpdate": 4, "SQLTypeReplace": 5, "SQLTypeTruncate": 6, "SQLTypeCreate": 7, "SQLTypeDrop": 8, "SQLTypeLoad": 9, "SQLTypeMerge": 10, "SQLTypeShow": 11, "SQLTypeAlter": 12, "SQLTypeRename": 13, "SQLTypeDump": 14, "SQLTypeDebug": 15, "SQLTypeExplain": 16, "SQLTypeProcedure": 17, "SQLTypeDesc": 18, "SQLLastInsertID": 19, "SQLSelectWithoutTable": 20, "SQLCreateSequence": 21, "SQLShowSequence": 22, "SQLGetSequence": 23, "SQLAlterSequence": 24, "SQLDropSequence": 25, "SQLTddlShow": 26, "SQLTypeSet": 27, "SQLTypeReload": 28, "SQLTypeSelectUnion": 29, "SQLTypeCreateTable": 30, "SQLTypeDropTable": 31, "SQLTypeAlterTable": 32, "SQLTypeSavePoint": 33, "SQLTypeSelectFromUpdate": 34, "SQLTypeMultiDelete": 35, "SQLTypeMultiUpdate": 36, "SQLTypeCreateIndex": 37, "SQLTypeDropIndex": 38, "SQLTypeKill": 39, "SQLTypeLockTables": 40, "SQLTypeUnLockTables": 41, "SQLTypeCheckTable": 42, "SQLTypeSelectFoundRows": 43, "SQLTypeInsertIgnore": 101, "SQLTypeInsertOnDuplicateUpdate": 102, "SQLTypeMulti": 1044, "SQLTypeUnknown": 1045, } )
Enum value maps for SQLType.
var File_branch_undo_log_proto protoreflect.FileDescriptor
Functions ¶
func ConvertToIntree ¶
func ConvertToIntree(protoLog *BranchUndoLog) *undo.BranchUndoLog
Types ¶
type BranchUndoLog ¶
type BranchUndoLog struct {
Xid string `protobuf:"bytes,1,opt,name=Xid,proto3" json:"Xid,omitempty"`
BranchID uint64 `protobuf:"varint,2,opt,name=BranchID,proto3" json:"BranchID,omitempty"`
Logs []*SQLUndoLog `protobuf:"bytes,3,rep,name=Logs,proto3" json:"Logs,omitempty"`
// contains filtered or unexported fields
}
func ConvertToProto ¶
func ConvertToProto(intreeLog *undo.BranchUndoLog) *BranchUndoLog
func (*BranchUndoLog) Descriptor
deprecated
func (*BranchUndoLog) Descriptor() ([]byte, []int)
Deprecated: Use BranchUndoLog.ProtoReflect.Descriptor instead.
func (*BranchUndoLog) GetBranchID ¶
func (x *BranchUndoLog) GetBranchID() uint64
func (*BranchUndoLog) GetLogs ¶
func (x *BranchUndoLog) GetLogs() []*SQLUndoLog
func (*BranchUndoLog) GetXid ¶
func (x *BranchUndoLog) GetXid() string
func (*BranchUndoLog) ProtoMessage ¶
func (*BranchUndoLog) ProtoMessage()
func (*BranchUndoLog) ProtoReflect ¶
func (x *BranchUndoLog) ProtoReflect() protoreflect.Message
func (*BranchUndoLog) Reset ¶
func (x *BranchUndoLog) Reset()
func (*BranchUndoLog) String ¶
func (x *BranchUndoLog) String() string
type ColumnImage ¶
type ColumnImage struct {
KeyType IndexType `protobuf:"varint,1,opt,name=KeyType,proto3,enum=parser.IndexType" json:"KeyType,omitempty"`
ColumnName string `protobuf:"bytes,2,opt,name=ColumnName,proto3" json:"ColumnName,omitempty"`
ColumnType JDBCType `protobuf:"varint,3,opt,name=ColumnType,proto3,enum=parser.JDBCType" json:"ColumnType,omitempty"`
Value *anypb.Any `protobuf:"bytes,4,opt,name=Value,proto3" json:"Value,omitempty"`
// contains filtered or unexported fields
}
func (*ColumnImage) Descriptor
deprecated
func (*ColumnImage) Descriptor() ([]byte, []int)
Deprecated: Use ColumnImage.ProtoReflect.Descriptor instead.
func (*ColumnImage) GetColumnName ¶
func (x *ColumnImage) GetColumnName() string
func (*ColumnImage) GetColumnType ¶
func (x *ColumnImage) GetColumnType() JDBCType
func (*ColumnImage) GetKeyType ¶
func (x *ColumnImage) GetKeyType() IndexType
func (*ColumnImage) GetValue ¶
func (x *ColumnImage) GetValue() *anypb.Any
func (*ColumnImage) ProtoMessage ¶
func (*ColumnImage) ProtoMessage()
func (*ColumnImage) ProtoReflect ¶
func (x *ColumnImage) ProtoReflect() protoreflect.Message
func (*ColumnImage) Reset ¶
func (x *ColumnImage) Reset()
func (*ColumnImage) String ¶
func (x *ColumnImage) String() string
type ColumnMeta ¶
type ColumnMeta struct {
Schema string `protobuf:"bytes,1,opt,name=Schema,proto3" json:"Schema,omitempty"`
Table string `protobuf:"bytes,2,opt,name=Table,proto3" json:"Table,omitempty"`
ColumnDef []byte `protobuf:"bytes,3,opt,name=ColumnDef,proto3" json:"ColumnDef,omitempty"`
Autoincrement bool `protobuf:"varint,4,opt,name=Autoincrement,proto3" json:"Autoincrement,omitempty"`
ColumnName string `protobuf:"bytes,5,opt,name=ColumnName,proto3" json:"ColumnName,omitempty"`
ColumnType string `protobuf:"bytes,6,opt,name=ColumnType,proto3" json:"ColumnType,omitempty"`
DatabaseType int32 `protobuf:"varint,7,opt,name=DatabaseType,proto3" json:"DatabaseType,omitempty"`
DatabaseTypeString string `protobuf:"bytes,8,opt,name=DatabaseTypeString,proto3" json:"DatabaseTypeString,omitempty"`
ColumnKey string `protobuf:"bytes,9,opt,name=ColumnKey,proto3" json:"ColumnKey,omitempty"`
IsNullable int32 `protobuf:"varint,10,opt,name=IsNullable,proto3" json:"IsNullable,omitempty"`
Extra string `protobuf:"bytes,11,opt,name=Extra,proto3" json:"Extra,omitempty"`
// contains filtered or unexported fields
}
func (*ColumnMeta) Descriptor
deprecated
func (*ColumnMeta) Descriptor() ([]byte, []int)
Deprecated: Use ColumnMeta.ProtoReflect.Descriptor instead.
func (*ColumnMeta) GetAutoincrement ¶
func (x *ColumnMeta) GetAutoincrement() bool
func (*ColumnMeta) GetColumnDef ¶
func (x *ColumnMeta) GetColumnDef() []byte
func (*ColumnMeta) GetColumnKey ¶
func (x *ColumnMeta) GetColumnKey() string
func (*ColumnMeta) GetColumnName ¶
func (x *ColumnMeta) GetColumnName() string
func (*ColumnMeta) GetColumnType ¶
func (x *ColumnMeta) GetColumnType() string
func (*ColumnMeta) GetDatabaseType ¶
func (x *ColumnMeta) GetDatabaseType() int32
func (*ColumnMeta) GetDatabaseTypeString ¶
func (x *ColumnMeta) GetDatabaseTypeString() string
func (*ColumnMeta) GetExtra ¶
func (x *ColumnMeta) GetExtra() string
func (*ColumnMeta) GetIsNullable ¶
func (x *ColumnMeta) GetIsNullable() int32
func (*ColumnMeta) GetSchema ¶
func (x *ColumnMeta) GetSchema() string
func (*ColumnMeta) GetTable ¶
func (x *ColumnMeta) GetTable() string
func (*ColumnMeta) ProtoMessage ¶
func (*ColumnMeta) ProtoMessage()
func (*ColumnMeta) ProtoReflect ¶
func (x *ColumnMeta) ProtoReflect() protoreflect.Message
func (*ColumnMeta) Reset ¶
func (x *ColumnMeta) Reset()
func (*ColumnMeta) String ¶
func (x *ColumnMeta) String() string
type IndexMeta ¶
type IndexMeta struct {
Schema string `protobuf:"bytes,1,opt,name=Schema,proto3" json:"Schema,omitempty"`
Table string `protobuf:"bytes,2,opt,name=Table,proto3" json:"Table,omitempty"`
Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
ColumnName string `protobuf:"bytes,4,opt,name=ColumnName,proto3" json:"ColumnName,omitempty"`
IType IndexType `protobuf:"varint,5,opt,name=IType,proto3,enum=parser.IndexType" json:"IType,omitempty"`
Columns []*ColumnMeta `protobuf:"bytes,6,rep,name=Columns,proto3" json:"Columns,omitempty"`
// contains filtered or unexported fields
}
func (*IndexMeta) Descriptor
deprecated
func (*IndexMeta) GetColumnName ¶
func (*IndexMeta) GetColumns ¶
func (x *IndexMeta) GetColumns() []*ColumnMeta
func (*IndexMeta) ProtoMessage ¶
func (*IndexMeta) ProtoMessage()
func (*IndexMeta) ProtoReflect ¶
func (x *IndexMeta) ProtoReflect() protoreflect.Message
type IndexType ¶
type IndexType int32
func (IndexType) Descriptor ¶
func (IndexType) Descriptor() protoreflect.EnumDescriptor
func (IndexType) EnumDescriptor
deprecated
func (IndexType) Number ¶
func (x IndexType) Number() protoreflect.EnumNumber
func (IndexType) Type ¶
func (IndexType) Type() protoreflect.EnumType
type JDBCType ¶
type JDBCType int32
const ( JDBCType_JDBCTypeNull JDBCType = 0 JDBCType_JDBCTypeBit JDBCType = -7 JDBCType_JDBCTypeTinyInt JDBCType = -6 JDBCType_JDBCTypeSmallInt JDBCType = 5 JDBCType_JDBCTypeInteger JDBCType = 4 JDBCType_JDBCTypeBigInt JDBCType = -5 JDBCType_JDBCTypeFloat JDBCType = 6 JDBCType_JDBCTypeReal JDBCType = 7 JDBCType_JDBCTypeDouble JDBCType = 8 JDBCType_JDBCTypeNumberic JDBCType = 2 JDBCType_JDBCTypeDecimal JDBCType = 3 JDBCType_JDBCTypeChar JDBCType = 1 JDBCType_JDBCTypeVarchar JDBCType = 12 JDBCType_JDBCTypeLongVarchar JDBCType = -1 JDBCType_JDBCTypeDate JDBCType = 91 JDBCType_JDBCTypeTime JDBCType = 92 JDBCType_JDBCTypeTimestamp JDBCType = 93 JDBCType_JDBCTypeBinary JDBCType = -2 JDBCType_JDBCTypeVarBinary JDBCType = -3 JDBCType_JDBCTypeLongVarBinary JDBCType = -4 JDBCType_JDBCTypeOther JDBCType = 1111 JDBCType_JDBCTypeJavaObject JDBCType = 2000 JDBCType_JDBCTypeDistinct JDBCType = 2001 JDBCType_JDBCTypeStruct JDBCType = 2002 JDBCType_JDBCTypeArray JDBCType = 2003 JDBCType_JDBCTypeBlob JDBCType = 2004 JDBCType_JDBCTypeClob JDBCType = 2005 JDBCType_JDBCTypeRef JDBCType = 2006 JDBCType_JDBCTypeDateLink JDBCType = 70 JDBCType_JDBCTypeBoolean JDBCType = 16 JDBCType_JDBCTypeRowID JDBCType = -8 JDBCType_JDBCTypeNchar JDBCType = -15 JDBCType_JDBCTypeNvarchar JDBCType = -9 JDBCType_JDBCTypeLongNvVarchar JDBCType = -16 JDBCType_JDBCTypeNclob JDBCType = 2011 JDBCType_JDBCTypeSqlXML JDBCType = 2009 JDBCType_JDBCTypeRefCursor JDBCType = 2012 JDBCType_JDBCTypeTimeWithTimeZone JDBCType = 2013 JDBCType_JDBCTypeTimestampWithTimezone JDBCType = 2014 )
func (JDBCType) Descriptor ¶
func (JDBCType) Descriptor() protoreflect.EnumDescriptor
func (JDBCType) EnumDescriptor
deprecated
func (JDBCType) Number ¶
func (x JDBCType) Number() protoreflect.EnumNumber
func (JDBCType) Type ¶
func (JDBCType) Type() protoreflect.EnumType
type JsonParser ¶
type JsonParser struct {
}
func (*JsonParser) Decode ¶
func (j *JsonParser) Decode(bytes []byte) (*undo.BranchUndoLog, error)
Decode byte array to branch undo log. param bytes the byte array return the branch undo log
func (*JsonParser) Encode ¶
func (j *JsonParser) Encode(branchUndoLog *undo.BranchUndoLog) ([]byte, error)
Encode branch undo log to byte array. param branchUndoLog the branch undo log return the byte array
func (*JsonParser) GetDefaultContent ¶
func (j *JsonParser) GetDefaultContent() []byte
Get default context of this parser return the default content if undo log is empty
func (*JsonParser) GetName ¶
func (j *JsonParser) GetName() string
Get the name of parser; return the name of parser
type ProtobufParser ¶
type ProtobufParser struct {
}
func (*ProtobufParser) Decode ¶
func (p *ProtobufParser) Decode(data []byte) (*undo.BranchUndoLog, error)
Decode byte array to branch undo log
func (*ProtobufParser) Encode ¶
func (p *ProtobufParser) Encode(branchUndoLog *undo.BranchUndoLog) ([]byte, error)
Encode branch undo log to byte array
func (*ProtobufParser) GetDefaultContent ¶
func (p *ProtobufParser) GetDefaultContent() []byte
GetDefaultContent get default content of this parser
func (*ProtobufParser) GetName ¶
func (p *ProtobufParser) GetName() string
GetName get the name of parser
type RecordImage ¶
type RecordImage struct {
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
TableName string `protobuf:"bytes,2,opt,name=TableName,proto3" json:"TableName,omitempty"`
SQLType SQLType `protobuf:"varint,3,opt,name=SQLType,proto3,enum=parser.SQLType" json:"SQLType,omitempty"`
Rows []*RowImage `protobuf:"bytes,4,rep,name=Rows,proto3" json:"Rows,omitempty"`
TableMeta *TableMeta `protobuf:"bytes,5,opt,name=TableMeta,proto3" json:"TableMeta,omitempty"`
// contains filtered or unexported fields
}
func (*RecordImage) Descriptor
deprecated
func (*RecordImage) Descriptor() ([]byte, []int)
Deprecated: Use RecordImage.ProtoReflect.Descriptor instead.
func (*RecordImage) GetIndex ¶
func (x *RecordImage) GetIndex() int32
func (*RecordImage) GetRows ¶
func (x *RecordImage) GetRows() []*RowImage
func (*RecordImage) GetSQLType ¶
func (x *RecordImage) GetSQLType() SQLType
func (*RecordImage) GetTableMeta ¶
func (x *RecordImage) GetTableMeta() *TableMeta
func (*RecordImage) GetTableName ¶
func (x *RecordImage) GetTableName() string
func (*RecordImage) ProtoMessage ¶
func (*RecordImage) ProtoMessage()
func (*RecordImage) ProtoReflect ¶
func (x *RecordImage) ProtoReflect() protoreflect.Message
func (*RecordImage) Reset ¶
func (x *RecordImage) Reset()
func (*RecordImage) String ¶
func (x *RecordImage) String() string
type RowImage ¶
type RowImage struct {
Columns []*ColumnImage `protobuf:"bytes,1,rep,name=Columns,proto3" json:"Columns,omitempty"`
// contains filtered or unexported fields
}
func (*RowImage) Descriptor
deprecated
func (*RowImage) GetColumns ¶
func (x *RowImage) GetColumns() []*ColumnImage
func (*RowImage) ProtoMessage ¶
func (*RowImage) ProtoMessage()
func (*RowImage) ProtoReflect ¶
func (x *RowImage) ProtoReflect() protoreflect.Message
type SQLType ¶
type SQLType int32
const ( SQLType_SQLTypeSelect SQLType = 0 SQLType_SQLTypeInsert SQLType = 1 SQLType_SQLTypeUpdate SQLType = 2 SQLType_SQLTypeDelete SQLType = 3 SQLType_SQLTypeSelectForUpdate SQLType = 4 SQLType_SQLTypeReplace SQLType = 5 SQLType_SQLTypeTruncate SQLType = 6 SQLType_SQLTypeCreate SQLType = 7 SQLType_SQLTypeDrop SQLType = 8 SQLType_SQLTypeLoad SQLType = 9 SQLType_SQLTypeMerge SQLType = 10 SQLType_SQLTypeShow SQLType = 11 SQLType_SQLTypeAlter SQLType = 12 SQLType_SQLTypeRename SQLType = 13 SQLType_SQLTypeDump SQLType = 14 SQLType_SQLTypeDebug SQLType = 15 SQLType_SQLTypeExplain SQLType = 16 SQLType_SQLTypeProcedure SQLType = 17 SQLType_SQLTypeDesc SQLType = 18 SQLType_SQLLastInsertID SQLType = 19 SQLType_SQLSelectWithoutTable SQLType = 20 SQLType_SQLCreateSequence SQLType = 21 SQLType_SQLShowSequence SQLType = 22 SQLType_SQLGetSequence SQLType = 23 SQLType_SQLAlterSequence SQLType = 24 SQLType_SQLDropSequence SQLType = 25 SQLType_SQLTddlShow SQLType = 26 SQLType_SQLTypeSet SQLType = 27 SQLType_SQLTypeReload SQLType = 28 SQLType_SQLTypeSelectUnion SQLType = 29 SQLType_SQLTypeCreateTable SQLType = 30 SQLType_SQLTypeDropTable SQLType = 31 SQLType_SQLTypeAlterTable SQLType = 32 SQLType_SQLTypeSavePoint SQLType = 33 SQLType_SQLTypeSelectFromUpdate SQLType = 34 SQLType_SQLTypeMultiDelete SQLType = 35 SQLType_SQLTypeMultiUpdate SQLType = 36 SQLType_SQLTypeCreateIndex SQLType = 37 SQLType_SQLTypeDropIndex SQLType = 38 SQLType_SQLTypeKill SQLType = 39 SQLType_SQLTypeLockTables SQLType = 40 SQLType_SQLTypeUnLockTables SQLType = 41 SQLType_SQLTypeCheckTable SQLType = 42 SQLType_SQLTypeSelectFoundRows SQLType = 43 SQLType_SQLTypeInsertIgnore SQLType = 101 // Adjusted the value to match Go's logic SQLType_SQLTypeInsertOnDuplicateUpdate SQLType = 102 SQLType_SQLTypeMulti SQLType = 1044 // Adjusted the value to match Go's logic SQLType_SQLTypeUnknown SQLType = 1045 )
func (SQLType) Descriptor ¶
func (SQLType) Descriptor() protoreflect.EnumDescriptor
func (SQLType) EnumDescriptor
deprecated
func (SQLType) Number ¶
func (x SQLType) Number() protoreflect.EnumNumber
func (SQLType) Type ¶
func (SQLType) Type() protoreflect.EnumType
type SQLUndoLog ¶
type SQLUndoLog struct {
SQLType SQLType `protobuf:"varint,1,opt,name=SQLType,proto3,enum=parser.SQLType" json:"SQLType,omitempty"`
TableName string `protobuf:"bytes,2,opt,name=TableName,proto3" json:"TableName,omitempty"`
BeforeImage *RecordImage `protobuf:"bytes,3,opt,name=BeforeImage,proto3" json:"BeforeImage,omitempty"`
AfterImage *RecordImage `protobuf:"bytes,4,opt,name=AfterImage,proto3" json:"AfterImage,omitempty"`
// contains filtered or unexported fields
}
func (*SQLUndoLog) Descriptor
deprecated
func (*SQLUndoLog) Descriptor() ([]byte, []int)
Deprecated: Use SQLUndoLog.ProtoReflect.Descriptor instead.
func (*SQLUndoLog) GetAfterImage ¶
func (x *SQLUndoLog) GetAfterImage() *RecordImage
func (*SQLUndoLog) GetBeforeImage ¶
func (x *SQLUndoLog) GetBeforeImage() *RecordImage
func (*SQLUndoLog) GetSQLType ¶
func (x *SQLUndoLog) GetSQLType() SQLType
func (*SQLUndoLog) GetTableName ¶
func (x *SQLUndoLog) GetTableName() string
func (*SQLUndoLog) ProtoMessage ¶
func (*SQLUndoLog) ProtoMessage()
func (*SQLUndoLog) ProtoReflect ¶
func (x *SQLUndoLog) ProtoReflect() protoreflect.Message
func (*SQLUndoLog) Reset ¶
func (x *SQLUndoLog) Reset()
func (*SQLUndoLog) String ¶
func (x *SQLUndoLog) String() string
type TableMeta ¶
type TableMeta struct {
TableName string `protobuf:"bytes,1,opt,name=TableName,proto3" json:"TableName,omitempty"`
Columns map[string]*ColumnMeta `` /* 155-byte string literal not displayed */
Indexs map[string]*IndexMeta `` /* 153-byte string literal not displayed */
ColumnNames []string `protobuf:"bytes,4,rep,name=ColumnNames,proto3" json:"ColumnNames,omitempty"`
// contains filtered or unexported fields
}
func (*TableMeta) Descriptor
deprecated
func (*TableMeta) GetColumnNames ¶
func (*TableMeta) GetColumns ¶
func (x *TableMeta) GetColumns() map[string]*ColumnMeta
func (*TableMeta) GetTableName ¶
func (*TableMeta) ProtoMessage ¶
func (*TableMeta) ProtoMessage()
func (*TableMeta) ProtoReflect ¶
func (x *TableMeta) ProtoReflect() protoreflect.Message
type UndoLogParser ¶
type UndoLogParser interface {
// Get the name of parser;
// return the name of parser
GetName() string
// Get default context of this parser
// return the default content if undo log is empty
GetDefaultContent() []byte
// Encode branch undo log to byte array.
// param branchUndoLog the branch undo log
// return the byte array
Encode(branchUndoLog *undo.BranchUndoLog) ([]byte, error)
// Decode byte array to branch undo log.
// param bytes the byte array
// return the branch undo log
Decode(bytes []byte) (*undo.BranchUndoLog, error)
}
The interface Undo log parser.
type UndoLogParserCache ¶
type UndoLogParserCache struct {
// contains filtered or unexported fields
}
The type Undo log parser factory.
func GetCache ¶
func GetCache() *UndoLogParserCache
func (*UndoLogParserCache) GetDefault ¶
func (ulpc *UndoLogParserCache) GetDefault() (UndoLogParser, error)
Gets default UndoLogParser instance. return the instance
func (*UndoLogParserCache) Load ¶
func (ulpc *UndoLogParserCache) Load(name string) (UndoLogParser, error)
Gets UndoLogParser by name param name parser name return the UndoLogParser