@@ -45,7 +45,7 @@ type ResultsTable struct {
45
45
EditorPages * tview.Pages
46
46
ResultsInfo * tview.TextView
47
47
Tree * Tree
48
- DBDriver * drivers.MySQL
48
+ DBDriver * drivers.MySql
49
49
}
50
50
51
51
var (
55
55
DeleteColor = tcell .ColorRed
56
56
)
57
57
58
- func NewResultsTable (listOfDbChanges * []models.DbDmlChange , listOfDbInserts * []models.DbInsert , tree * Tree , dbdriver * drivers.MySQL ) * ResultsTable {
58
+ func NewResultsTable (listOfDbChanges * []models.DbDmlChange , listOfDbInserts * []models.DbInsert , tree * Tree , dbdriver * drivers.MySql ) * ResultsTable {
59
59
state := & ResultsTableState {
60
60
records : [][]string {},
61
61
columns : [][]string {},
@@ -201,7 +201,7 @@ func (table *ResultsTable) AddInsertedRows() {
201
201
for j , cell := range row {
202
202
tableCell := tview .NewTableCell (cell )
203
203
tableCell .SetExpansion (1 )
204
- tableCell .SetReference (inserts [i ].RowID )
204
+ tableCell .SetReference (inserts [i ].RowId )
205
205
206
206
tableCell .SetTextColor (app .FocusTextColor )
207
207
tableCell .SetBackgroundColor (InsertColor )
@@ -397,7 +397,7 @@ func (table *ResultsTable) tableInputCapture(event *tcell.EventKey) *tcell.Event
397
397
for i , insertedRow := range * table .state .listOfDbInserts {
398
398
cellReference := table .GetCell (selectedRowIndex , 0 ).GetReference ()
399
399
400
- if cellReference != nil && insertedRow .RowID .String () == cellReference .(uuid.UUID ).String () {
400
+ if cellReference != nil && insertedRow .RowId .String () == cellReference .(uuid.UUID ).String () {
401
401
isAnInsertedRow = true
402
402
indexOfInsertedRow = i
403
403
}
@@ -447,7 +447,7 @@ func (table *ResultsTable) tableInputCapture(event *tcell.EventKey) *tcell.Event
447
447
Table : table .GetDBReference (),
448
448
Columns : table .GetRecords ()[0 ],
449
449
Values : newRow ,
450
- RowID : newRowUuid ,
450
+ RowId : newRowUuid ,
451
451
Option : 1 ,
452
452
}
453
453
@@ -958,19 +958,19 @@ func (table *ResultsTable) StartEditingCell(row int, col int, callback func(newV
958
958
App .SetFocus (inputField )
959
959
}
960
960
961
- func (table * ResultsTable ) CheckIfRowIsInserted (rowID uuid.UUID ) bool {
961
+ func (table * ResultsTable ) CheckIfRowIsInserted (rowId uuid.UUID ) bool {
962
962
for _ , insertedRow := range * table .state .listOfDbInserts {
963
- if insertedRow .RowID == rowID {
963
+ if insertedRow .RowId == rowId {
964
964
return true
965
965
}
966
966
}
967
967
968
968
return false
969
969
}
970
970
971
- func (table * ResultsTable ) MutateInsertedRowCell (rowID uuid.UUID , colIndex int , newValue string ) {
971
+ func (table * ResultsTable ) MutateInsertedRowCell (rowId uuid.UUID , colIndex int , newValue string ) {
972
972
for i , insertedRow := range * table .state .listOfDbInserts {
973
- if insertedRow .RowID == rowID {
973
+ if insertedRow .RowId == rowId {
974
974
(* table .state .listOfDbInserts )[i ].Values [colIndex ] = newValue
975
975
}
976
976
}
@@ -992,13 +992,13 @@ func (table *ResultsTable) AppendNewChange(changeType string, tableName string,
992
992
}
993
993
994
994
if ! isInsertedRow {
995
- selectedRowID := table .GetRecords ()[rowIndex ][0 ]
995
+ selectedRowId := table .GetRecords ()[rowIndex ][0 ]
996
996
997
997
alreadyExists := false
998
998
indexOfChange := - 1
999
999
1000
1000
for i , change := range * table .state .listOfDbChanges {
1001
- if change .RowID == selectedRowID && change .Column == table .GetColumnNameByIndex (colIndex ) {
1001
+ if change .RowId == selectedRowId && change .Column == table .GetColumnNameByIndex (colIndex ) {
1002
1002
alreadyExists = true
1003
1003
indexOfChange = i
1004
1004
}
@@ -1038,7 +1038,7 @@ func (table *ResultsTable) AppendNewChange(changeType string, tableName string,
1038
1038
Table : tableName ,
1039
1039
Column : columnName ,
1040
1040
Value : value ,
1041
- RowID : selectedRowID ,
1041
+ RowId : selectedRowId ,
1042
1042
Option : 1 ,
1043
1043
}
1044
1044
@@ -1078,7 +1078,7 @@ func (table *ResultsTable) AppendNewChange(changeType string, tableName string,
1078
1078
Table : tableName ,
1079
1079
Column : "" ,
1080
1080
Value : "" ,
1081
- RowID : selectedRowID ,
1081
+ RowId : selectedRowId ,
1082
1082
Option : 1 ,
1083
1083
}
1084
1084
0 commit comments