Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Defined2014 committed Dec 24, 2024
1 parent 3c0deae commit 44a05c1
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,7 @@ func (t *tester) Run() error {
t.replaceColumn = append(t.replaceColumn, ReplaceColumn{col: colNr, replace: []byte(cols[i+1])})
}
case Q_CONNECT:
q.Query = strings.TrimSpace(q.Query)
if q.Query[len(q.Query)-1] == ';' {
q.Query = q.Query[:len(q.Query)-1]
}
q.Query = strings.TrimSuffix(strings.TrimSpace(q.Query), q.delimiter)
q.Query = q.Query[1 : len(q.Query)-1]
args := strings.Split(q.Query, ",")
for i := range args {
Expand All @@ -481,16 +478,10 @@ func (t *tester) Run() error {
}
t.addConnection(args[0], args[1], args[2], args[3], args[4])
case Q_CONNECTION:
q.Query = strings.TrimSpace(q.Query)
if q.Query[len(q.Query)-1] == ';' {
q.Query = q.Query[:len(q.Query)-1]
}
q.Query = strings.TrimSuffix(strings.TrimSpace(q.Query), q.delimiter)
t.switchConnection(q.Query)
case Q_DISCONNECT:
q.Query = strings.TrimSpace(q.Query)
if q.Query[len(q.Query)-1] == ';' {
q.Query = q.Query[:len(q.Query)-1]
}
q.Query = strings.TrimSuffix(strings.TrimSpace(q.Query), q.delimiter)
t.disconnect(q.Query)
case Q_LET:
q.Query = strings.TrimSpace(q.Query)
Expand Down

0 comments on commit 44a05c1

Please sign in to comment.