Skip to content

Commit

Permalink
Add features to connection request
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasHafner committed Aug 8, 2024
1 parent ddd19b7 commit 738cf8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/polypheny/jdbc/PrismInterfaceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ public ConnectionResponse register( PolyphenyConnectionProperties connectionProp
requestBuilder
.setMajorApiVersion( VersionUtil.MAJOR_API_VERSION )
.setMinorApiVersion( VersionUtil.MINOR_API_VERSION )
//.setClientUuid( clientUUID )
.setConnectionProperties( buildConnectionProperties( connectionProperties ) );
.setConnectionProperties( buildConnectionProperties( connectionProperties ) )
.addAllFeatures( VersionUtil.supportedFeatures );
ConnectionResponse connectionResponse = rpc.connect( requestBuilder.build(), timeout );
if ( !connectionResponse.getIsCompatible() ) {
throw new PrismInterfaceServiceException( "client version " + getClientApiVersionString()
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/org/polypheny/jdbc/utils/VersionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
import lombok.extern.slf4j.Slf4j;

Expand All @@ -28,6 +31,8 @@
@Slf4j
public class VersionUtil {

public static List<String> supportedFeatures;

private static final String VERSION_FILE = "polypheny-jdbc-driver-version.properties";
private static final String API_VERSION_PROPERTIES = "prism-api-version.properties";

Expand Down Expand Up @@ -72,6 +77,10 @@ public class VersionUtil {
} catch ( IOException e ) {
throw new RuntimeException( "Error loading API version properties", e );
}

supportedFeatures = new ArrayList<>();
supportedFeatures.add("client_streaming");
supportedFeatures.add("server_streaming");
}

}

0 comments on commit 738cf8a

Please sign in to comment.