@@ -318,16 +318,18 @@ private class DBConnectionImpl{
318318 private ReentrantLock lock_ ;
319319 private boolean isReverseStreaming_ = false ;
320320 private boolean python_ = false ;
321+ private boolean kdb_ ;
321322 private SqlStdEnum sqlStd_ ;
322323
323324
324- private DBConnectionImpl (boolean asynTask , boolean sslEnable , boolean compress , boolean python , boolean ifUrgent , boolean isReverseStreaming , SqlStdEnum sqlStd , boolean enableSCRAM ) {
325+ private DBConnectionImpl (boolean asynTask , boolean sslEnable , boolean compress , boolean python , boolean ifUrgent , boolean isReverseStreaming , SqlStdEnum sqlStd , boolean enableSCRAM , boolean kdb ) {
325326 sessionID_ = "" ;
326327 this .sslEnable_ = sslEnable ;
327328 this .asynTask_ = asynTask ;
328329 this .compress_ = compress ;
329330 this .ifUrgent_ = ifUrgent ;
330331 this .python_ = python ;
332+ this .kdb_ = kdb ;
331333 this .isReverseStreaming_ = isReverseStreaming ;
332334 this .sqlStd_ = sqlStd ;
333335 this .lock_ = new ReentrantLock ();
@@ -439,6 +441,8 @@ private int generateRequestFlag(boolean clearSessionMemory){
439441 flag += 64 ;
440442 if (this .python_ )
441443 flag += 2048 ;
444+ if (this .kdb_ )
445+ flag += 4096 ;
442446 if (this .isReverseStreaming_ )
443447 flag += 131072 ;
444448 if (Objects .nonNull (this .sqlStd_ )) {
@@ -838,7 +842,7 @@ public ExtendedDataInput getDataInputStream() {
838842 }
839843
840844 private DBConnectionImpl createEnableReverseStreamingDBConnectionImpl (boolean asynTask , boolean sslEnable , boolean compress , boolean python , boolean ifUrgent , SqlStdEnum sqlStd ) {
841- return new DBConnectionImpl (asynTask , sslEnable , compress , python , ifUrgent , true , sqlStd , false );
845+ return new DBConnectionImpl (asynTask , sslEnable , compress , python , ifUrgent , true , sqlStd , false , false );
842846 }
843847
844848 public DBConnection () {
@@ -862,31 +866,37 @@ public DBConnection(boolean asynchronousTask, boolean useSSL, boolean compress)
862866 }
863867
864868 public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython ){
865- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , SqlStdEnum .DolphinDB , false );
869+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , SqlStdEnum .DolphinDB , false , false );
866870 this .mutex_ = new ReentrantLock ();
867871 }
868872
869873
870874 public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , SqlStdEnum sqlStd ){
871- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , sqlStd , false );
875+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , sqlStd , false , false );
872876 this .mutex_ = new ReentrantLock ();
873877 }
874878
875879 public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent ){
876- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , SqlStdEnum .DolphinDB , false );
880+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , SqlStdEnum .DolphinDB , false , false );
877881 this .mutex_ = new ReentrantLock ();
878882 }
879883
880884 public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , SqlStdEnum sqlStd ){
881- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , false );
885+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , false , false );
882886 this .mutex_ = new ReentrantLock ();
883887 }
884888
885889 public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , SqlStdEnum sqlStd , boolean enableSCRAM ){
886- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , enableSCRAM );
890+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , enableSCRAM , false );
887891 this .mutex_ = new ReentrantLock ();
888892 }
889893
894+ public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , SqlStdEnum sqlStd , boolean enableSCRAM , boolean useKdb ){
895+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , enableSCRAM , useKdb );
896+ this .mutex_ = new ReentrantLock ();
897+ }
898+
899+
890900 /**
891901 * This method has been deprecated since 'Java API 1.30.22.4'.
892902 * @param asynchronousTask
@@ -899,7 +909,7 @@ public DBConnection(boolean asynchronousTask, boolean useSSL, boolean compress,
899909 */
900910 @ Deprecated
901911 private DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , boolean isReverseStreaming , SqlStdEnum sqlStd ){
902- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , isReverseStreaming , sqlStd , false );
912+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , isReverseStreaming , sqlStd , false , false );
903913 this .mutex_ = new ReentrantLock ();
904914 }
905915
0 commit comments