You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: functions/Invoke-DBOQuery.ps1
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -217,8 +217,14 @@ function Invoke-DBOQuery {
217
217
}
218
218
$queryText=$fileObjects|Get-Content-Raw
219
219
}
220
+
$delimiter=switch ($Type) {
221
+
SqlServer { 'GO' }
222
+
PostgreSQL { 'semicolon (;)' }
223
+
Oracle { 'semicolon (;)' }
224
+
MySQL { 'semicolon (;)' }
225
+
}
220
226
if ($Interactive) {
221
-
Write-PSFMessage-Level Host -Message "Running in interactive mode. Finish the query with a semicolon to execute it immediately. \q, exit, or quit to exit."
227
+
Write-PSFMessage-Level Host -Message "Running in interactive mode. Finish the query with a $delimiter to execute it immediately. \q, exit, or quit to exit."
222
228
}
223
229
224
230
#Replace tokens in the sql code if any
@@ -235,16 +241,19 @@ function Invoke-DBOQuery {
235
241
$queryList=$inputLine=''
236
242
$interactiveQuery=@()
237
243
# read until user finishes with a ;
238
-
while (-not$inputLine-or$inputLine.substring($inputLine.Length-1,1) -ne';') {
0 commit comments