@@ -318,16 +318,18 @@ private class DBConnectionImpl{
318
318
private ReentrantLock lock_ ;
319
319
private boolean isReverseStreaming_ = false ;
320
320
private boolean python_ = false ;
321
+ private boolean kdb_ ;
321
322
private SqlStdEnum sqlStd_ ;
322
323
323
324
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 ) {
325
326
sessionID_ = "" ;
326
327
this .sslEnable_ = sslEnable ;
327
328
this .asynTask_ = asynTask ;
328
329
this .compress_ = compress ;
329
330
this .ifUrgent_ = ifUrgent ;
330
331
this .python_ = python ;
332
+ this .kdb_ = kdb ;
331
333
this .isReverseStreaming_ = isReverseStreaming ;
332
334
this .sqlStd_ = sqlStd ;
333
335
this .lock_ = new ReentrantLock ();
@@ -439,6 +441,8 @@ private int generateRequestFlag(boolean clearSessionMemory){
439
441
flag += 64 ;
440
442
if (this .python_ )
441
443
flag += 2048 ;
444
+ if (this .kdb_ )
445
+ flag += 4096 ;
442
446
if (this .isReverseStreaming_ )
443
447
flag += 131072 ;
444
448
if (Objects .nonNull (this .sqlStd_ )) {
@@ -838,7 +842,7 @@ public ExtendedDataInput getDataInputStream() {
838
842
}
839
843
840
844
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 );
842
846
}
843
847
844
848
public DBConnection () {
@@ -862,31 +866,37 @@ public DBConnection(boolean asynchronousTask, boolean useSSL, boolean compress)
862
866
}
863
867
864
868
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 );
866
870
this .mutex_ = new ReentrantLock ();
867
871
}
868
872
869
873
870
874
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 );
872
876
this .mutex_ = new ReentrantLock ();
873
877
}
874
878
875
879
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 );
877
881
this .mutex_ = new ReentrantLock ();
878
882
}
879
883
880
884
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 );
882
886
this .mutex_ = new ReentrantLock ();
883
887
}
884
888
885
889
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 );
887
891
this .mutex_ = new ReentrantLock ();
888
892
}
889
893
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
+
890
900
/**
891
901
* This method has been deprecated since 'Java API 1.30.22.4'.
892
902
* @param asynchronousTask
@@ -899,7 +909,7 @@ public DBConnection(boolean asynchronousTask, boolean useSSL, boolean compress,
899
909
*/
900
910
@ Deprecated
901
911
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 );
903
913
this .mutex_ = new ReentrantLock ();
904
914
}
905
915
0 commit comments