-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix generated column in unique key error #1461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1b863b0
4960711
1c88601
c041017
6c2a036
703ae0d
1875fb9
2fce741
720f685
c0cbfd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ type CharacterSetConversion struct { | |
type Column struct { | ||
Name string | ||
IsUnsigned bool | ||
IsVirtual bool | ||
Charset string | ||
Type ColumnType | ||
EnumValues string | ||
|
@@ -244,6 +245,16 @@ func (this *ColumnList) IsSubsetOf(other *ColumnList) bool { | |
return true | ||
} | ||
|
||
func (this *ColumnList) FilterBy(f func(Column) bool) *ColumnList { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we're creating a new instance of NewFilteredColumnList(ordinals ColumnsMap, f func(Column) bool) *ColumnList {
...
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. really I just want to filter |
||
filteredCols := make([]Column, 0, len(this.columns)) | ||
for _, column := range this.columns { | ||
if f(column) { | ||
filteredCols = append(filteredCols, column) | ||
} | ||
} | ||
return &ColumnList{Ordinals: this.Ordinals, columns: filteredCols} | ||
} | ||
|
||
func (this *ColumnList) Len() int { | ||
return len(this.columns) | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.