@@ -315,6 +315,33 @@ public Void call() throws SQLException {
315
315
executor .schedule (new TimeBombTask (this ), this .queryTimeout , TimeUnit .SECONDS );
316
316
}
317
317
318
+ /**
319
+ * A helper method to build URL and submit the SQL to snowflake for exec
320
+ *
321
+ * @param sql sql statement
322
+ * @param mediaType media type
323
+ * @param bindValues map of binding values
324
+ * @param describeOnly whether only show the result set metadata
325
+ * @param internal run internal query not showing up in history
326
+ * @param asyncExec is async execute
327
+ * @param execTimeData ExecTimeTelemetryData
328
+ * @return raw json response
329
+ * @throws SFException if query is canceled
330
+ * @throws SnowflakeSQLException if query is already running
331
+ */
332
+ public Object executeHelper (
333
+ String sql ,
334
+ String mediaType ,
335
+ Map <String , ParameterBindingDTO > bindValues ,
336
+ boolean describeOnly ,
337
+ boolean internal ,
338
+ boolean asyncExec ,
339
+ ExecTimeTelemetryData execTimeData )
340
+ throws SnowflakeSQLException , SFException {
341
+ return executeHelper (
342
+ sql , null , mediaType , bindValues , describeOnly , internal , asyncExec , execTimeData );
343
+ }
344
+
318
345
/**
319
346
* A helper method to build URL and submit the SQL to snowflake for exec
320
347
*
@@ -706,7 +733,7 @@ public SFBaseResultSet execute(
706
733
CallingMethod caller ,
707
734
ExecTimeTelemetryData execTimeData )
708
735
throws SQLException , SFException {
709
- return execute (sql , null , false , parametersBinding , caller , execTimeData );
736
+ return execute (sql , false , parametersBinding , caller , execTimeData );
710
737
}
711
738
712
739
@ Override
@@ -762,6 +789,29 @@ private void cancelHelper(String sql, String mediaType, CancellationReason cance
762
789
}
763
790
}
764
791
792
+ /**
793
+ * Execute sql
794
+ *
795
+ * @param sql sql statement.
796
+ * @param asyncExec is async exec
797
+ * @param parametersBinding parameters to bind
798
+ * @param caller the JDBC interface method that called this method, if any
799
+ * @param execTimeData ExecTimeTelemetryData
800
+ * @return whether there is result set or not
801
+ * @throws SQLException if failed to execute sql
802
+ * @throws SFException exception raised from Snowflake components
803
+ * @throws SQLException if SQL error occurs
804
+ */
805
+ public SFBaseResultSet execute (
806
+ String sql ,
807
+ boolean asyncExec ,
808
+ Map <String , ParameterBindingDTO > parametersBinding ,
809
+ CallingMethod caller ,
810
+ ExecTimeTelemetryData execTimeData )
811
+ throws SQLException , SFException {
812
+ return execute (sql , null , asyncExec , parametersBinding , caller , execTimeData );
813
+ }
814
+
765
815
/**
766
816
* Execute sql
767
817
*
0 commit comments