Fix custom type assignment

This commit is contained in:
Atsushi Ishibashi 2018-05-04 01:45:14 +09:00
parent 2b69a5d53e
commit 99fcbc35f3
4 changed files with 23 additions and 22 deletions

View File

@ -28,23 +28,23 @@ type RowsEstimateMethod string
const ( const (
TableStatusRowsEstimate RowsEstimateMethod = "TableStatusRowsEstimate" TableStatusRowsEstimate RowsEstimateMethod = "TableStatusRowsEstimate"
ExplainRowsEstimate = "ExplainRowsEstimate" ExplainRowsEstimate RowsEstimateMethod = "ExplainRowsEstimate"
CountRowsEstimate = "CountRowsEstimate" CountRowsEstimate RowsEstimateMethod = "CountRowsEstimate"
) )
type CutOver int type CutOver int
const ( const (
CutOverAtomic CutOver = iota CutOverAtomic CutOver = iota
CutOverTwoStep = iota CutOverTwoStep
) )
type ThrottleReasonHint string type ThrottleReasonHint string
const ( const (
NoThrottleReasonHint ThrottleReasonHint = "NoThrottleReasonHint" NoThrottleReasonHint ThrottleReasonHint = "NoThrottleReasonHint"
UserCommandThrottleReasonHint = "UserCommandThrottleReasonHint" UserCommandThrottleReasonHint ThrottleReasonHint = "UserCommandThrottleReasonHint"
LeavingHibernationThrottleReasonHint = "LeavingHibernationThrottleReasonHint" LeavingHibernationThrottleReasonHint ThrottleReasonHint = "LeavingHibernationThrottleReasonHint"
) )
const ( const (

View File

@ -7,17 +7,18 @@ package binlog
import ( import (
"fmt" "fmt"
"github.com/github/gh-ost/go/sql"
"strings" "strings"
"github.com/github/gh-ost/go/sql"
) )
type EventDML string type EventDML string
const ( const (
NotDML EventDML = "NoDML" NotDML EventDML = "NoDML"
InsertDML = "Insert" InsertDML EventDML = "Insert"
UpdateDML = "Update" UpdateDML EventDML = "Update"
DeleteDML = "Delete" DeleteDML EventDML = "Delete"
) )
func ToEventDML(description string) EventDML { func ToEventDML(description string) EventDML {

View File

@ -15,11 +15,11 @@ type ValueComparisonSign string
const ( const (
LessThanComparisonSign ValueComparisonSign = "<" LessThanComparisonSign ValueComparisonSign = "<"
LessThanOrEqualsComparisonSign = "<=" LessThanOrEqualsComparisonSign ValueComparisonSign = "<="
EqualsComparisonSign = "=" EqualsComparisonSign ValueComparisonSign = "="
GreaterThanOrEqualsComparisonSign = ">=" GreaterThanOrEqualsComparisonSign ValueComparisonSign = ">="
GreaterThanComparisonSign = ">" GreaterThanComparisonSign ValueComparisonSign = ">"
NotEqualsComparisonSign = "!=" NotEqualsComparisonSign ValueComparisonSign = "!="
) )
// EscapeName will escape a db/table/column/... name by wrapping with backticks. // EscapeName will escape a db/table/column/... name by wrapping with backticks.

View File

@ -15,13 +15,13 @@ import (
type ColumnType int type ColumnType int
const ( const (
UnknownColumnType ColumnType = iota UnknownColumnType ColumnType = iota
TimestampColumnType = iota TimestampColumnType
DateTimeColumnType = iota DateTimeColumnType
EnumColumnType = iota EnumColumnType
MediumIntColumnType = iota MediumIntColumnType
JSONColumnType = iota JSONColumnType
FloatColumnType = iota FloatColumnType
) )
const maxMediumintUnsigned int32 = 16777215 const maxMediumintUnsigned int32 = 16777215