There was an error while loading. Please reload this page.
1 parent 36d88b9 commit 1f54d98Copy full SHA for 1f54d98
schema/schema.go
@@ -183,7 +183,7 @@ func (ta *Table) FindColumn(name string) int {
183
return -1
184
}
185
186
-// Get TableColumn by primary index index
+// Get TableColumn by column index of primary key.
187
func (ta *Table) GetPKColumn(index int) *TableColumn {
188
if index >= len(ta.PKColumns) {
189
return nil
@@ -192,8 +192,8 @@ func (ta *Table) GetPKColumn(index int) *TableColumn {
192
193
194
func (ta *Table) IsPrimaryKey(colIndex int) bool {
195
-for _, _colIndex := range ta.PKColumns {
196
-if _colIndex == colIndex {
+for _, i := range ta.PKColumns {
+if i == colIndex {
197
return true
198
199
0 commit comments