@@ -158,15 +158,17 @@ private class DBConnectionImpl{
158
158
private ReentrantLock lock_ ;
159
159
private boolean isReverseStreaming_ = false ;
160
160
private boolean python_ = false ;
161
+ private boolean kdb_ = false ;
161
162
private SqlStdEnum sqlStd_ ;
162
163
163
- private DBConnectionImpl (boolean asynTask , boolean sslEnable , boolean compress , boolean python , boolean ifUrgent , boolean isReverseStreaming , SqlStdEnum sqlStd , boolean enableSCRAM ){
164
+ private DBConnectionImpl (boolean asynTask , boolean sslEnable , boolean compress , boolean python , boolean ifUrgent , boolean isReverseStreaming , SqlStdEnum sqlStd , boolean enableSCRAM , boolean kdb ){
164
165
sessionID_ = "" ;
165
166
this .sslEnable_ = sslEnable ;
166
167
this .asynTask_ = asynTask ;
167
168
this .compress_ = compress ;
168
169
this .ifUrgent_ = ifUrgent ;
169
170
this .python_ = python ;
171
+ this .kdb_ = kdb ;
170
172
this .isReverseStreaming_ = isReverseStreaming ;
171
173
this .sqlStd_ = sqlStd ;
172
174
this .lock_ = new ReentrantLock ();
@@ -278,6 +280,8 @@ private int generateRequestFlag(boolean clearSessionMemory){
278
280
flag += 64 ;
279
281
if (this .python_ )
280
282
flag += 2048 ;
283
+ if (this .kdb_ )
284
+ flag += 4096 ;
281
285
if (this .isReverseStreaming_ )
282
286
flag += 131072 ;
283
287
if (Objects .nonNull (this .sqlStd_ )) {
@@ -668,7 +672,7 @@ public ExtendedDataInput getDataInputStream() {
668
672
}
669
673
670
674
private DBConnectionImpl createEnableReverseStreamingDBConnectionImpl (boolean asynTask , boolean sslEnable , boolean compress , boolean python , boolean ifUrgent , SqlStdEnum sqlStd ) {
671
- return new DBConnectionImpl (asynTask , sslEnable , compress , python , ifUrgent , true , sqlStd , false );
675
+ return new DBConnectionImpl (asynTask , sslEnable , compress , python , ifUrgent , true , sqlStd , false , false );
672
676
}
673
677
674
678
public DBConnection () {
@@ -692,28 +696,33 @@ public DBConnection(boolean asynchronousTask, boolean useSSL, boolean compress)
692
696
}
693
697
694
698
public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython ){
695
- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , SqlStdEnum .DolphinDB , false );
699
+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , SqlStdEnum .DolphinDB , false , false );
696
700
this .mutex_ = new ReentrantLock ();
697
701
}
698
702
699
703
700
704
public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , SqlStdEnum sqlStd ){
701
- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , sqlStd , false );
705
+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , false , false , sqlStd , false , false );
702
706
this .mutex_ = new ReentrantLock ();
703
707
}
704
708
705
709
public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent ){
706
- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , SqlStdEnum .DolphinDB , false );
710
+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , SqlStdEnum .DolphinDB , false , false );
707
711
this .mutex_ = new ReentrantLock ();
708
712
}
709
713
710
714
public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , SqlStdEnum sqlStd ){
711
- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , false );
715
+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , false , false );
712
716
this .mutex_ = new ReentrantLock ();
713
717
}
714
718
715
719
public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , SqlStdEnum sqlStd , boolean enableSCRAM ){
716
- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , enableSCRAM );
720
+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , enableSCRAM , false );
721
+ this .mutex_ = new ReentrantLock ();
722
+ }
723
+
724
+ public DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , SqlStdEnum sqlStd , boolean enableSCRAM , boolean useKdb ){
725
+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , false , sqlStd , enableSCRAM , useKdb );
717
726
this .mutex_ = new ReentrantLock ();
718
727
}
719
728
@@ -729,7 +738,7 @@ public DBConnection(boolean asynchronousTask, boolean useSSL, boolean compress,
729
738
*/
730
739
@ Deprecated
731
740
private DBConnection (boolean asynchronousTask , boolean useSSL , boolean compress , boolean usePython , boolean isUrgent , boolean isReverseStreaming , SqlStdEnum sqlStd ){
732
- this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , isReverseStreaming , sqlStd , false );
741
+ this .conn_ = new DBConnectionImpl (asynchronousTask , useSSL , compress , usePython , isUrgent , isReverseStreaming , sqlStd , false , false );
733
742
this .mutex_ = new ReentrantLock ();
734
743
}
735
744
0 commit comments