Skip to content

Commit

Permalink
Update package name
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasHafner committed May 5, 2024
1 parent 8209532 commit ab90ed6
Show file tree
Hide file tree
Showing 46 changed files with 241 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import java.util.ArrayList;
import java.util.List;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.prism.Frame;
import org.polypheny.jdbc.properties.PolyphenyResultSetProperties;
import org.polypheny.jdbc.types.TypedValue;
import org.polypheny.jdbc.utils.TypedValueUtils;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/polypheny/jdbc/ForwardOnlyScroller.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.prism.Frame;
import org.polypheny.jdbc.properties.PolyphenyResultSetProperties;
import org.polypheny.jdbc.types.TypedValue;
import org.polypheny.jdbc.utils.TypedValueUtils;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/polypheny/jdbc/PolyConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.Executor;
import org.polypheny.db.protointerface.proto.PreparedStatementSignature;
import org.polypheny.prism.PreparedStatementSignature;
import org.polypheny.jdbc.meta.PolyphenyDatabaseMetadata;
import org.polypheny.jdbc.multimodel.PolyStatement;
import org.polypheny.jdbc.properties.PolyphenyConnectionProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.db.protointerface.proto.PreparedStatementSignature;
import org.polypheny.db.protointerface.proto.StatementBatchResponse;
import org.polypheny.db.protointerface.proto.StatementResult;
import org.polypheny.prism.Frame;
import org.polypheny.prism.PreparedStatementSignature;
import org.polypheny.prism.StatementBatchResponse;
import org.polypheny.prism.StatementResult;
import org.polypheny.jdbc.meta.PolyphenyParameterMetaData;
import org.polypheny.jdbc.properties.PolyphenyStatementProperties;
import org.polypheny.jdbc.types.TypedValue;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/polypheny/jdbc/PolyphenyResultSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.db.protointerface.proto.Frame.ResultCase;
import org.polypheny.prism.Frame;
import org.polypheny.prism.Frame.ResultCase;
import org.polypheny.jdbc.meta.MetaScroller;
import org.polypheny.jdbc.meta.MetaUtils;
import org.polypheny.jdbc.meta.PolyphenyColumnMeta;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/polypheny/jdbc/PolyphenyStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
import java.util.List;
import java.util.stream.Collectors;
import lombok.Getter;
import org.polypheny.db.protointerface.proto.ExecuteUnparameterizedStatementRequest;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.db.protointerface.proto.Frame.ResultCase;
import org.polypheny.db.protointerface.proto.Response;
import org.polypheny.db.protointerface.proto.StatementBatchResponse;
import org.polypheny.db.protointerface.proto.StatementResponse;
import org.polypheny.prism.ExecuteUnparameterizedStatementRequest;
import org.polypheny.prism.Frame;
import org.polypheny.prism.Frame.ResultCase;
import org.polypheny.prism.Response;
import org.polypheny.prism.StatementBatchResponse;
import org.polypheny.prism.StatementResponse;
import org.polypheny.jdbc.properties.PolyphenyStatementProperties;
import org.polypheny.jdbc.properties.PropertyUtils;
import org.polypheny.jdbc.utils.CallbackQueue;
Expand Down
94 changes: 48 additions & 46 deletions src/main/java/org/polypheny/jdbc/PrismInterfaceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,50 @@
import java.util.Optional;
import java.util.Properties;
import java.util.stream.Collectors;
import org.polypheny.db.protointerface.proto.ClientInfoProperties;
import org.polypheny.db.protointerface.proto.ClientInfoPropertiesRequest;
import org.polypheny.db.protointerface.proto.CloseResultRequest;
import org.polypheny.db.protointerface.proto.CloseStatementRequest;
import org.polypheny.db.protointerface.proto.CommitRequest;
import org.polypheny.db.protointerface.proto.ConnectionCheckRequest;
import org.polypheny.db.protointerface.proto.ConnectionProperties;
import org.polypheny.db.protointerface.proto.ConnectionPropertiesUpdateRequest;
import org.polypheny.db.protointerface.proto.ConnectionRequest;
import org.polypheny.db.protointerface.proto.ConnectionResponse;
import org.polypheny.db.protointerface.proto.DbmsVersionRequest;
import org.polypheny.db.protointerface.proto.DbmsVersionResponse;
import org.polypheny.db.protointerface.proto.DefaultNamespaceRequest;
import org.polypheny.db.protointerface.proto.DisconnectRequest;
import org.polypheny.db.protointerface.proto.EntitiesRequest;
import org.polypheny.db.protointerface.proto.Entity;
import org.polypheny.db.protointerface.proto.ExecuteIndexedStatementBatchRequest;
import org.polypheny.db.protointerface.proto.ExecuteIndexedStatementRequest;
import org.polypheny.db.protointerface.proto.ExecuteUnparameterizedStatementBatchRequest;
import org.polypheny.db.protointerface.proto.ExecuteUnparameterizedStatementRequest;
import org.polypheny.db.protointerface.proto.FetchRequest;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.db.protointerface.proto.Function;
import org.polypheny.db.protointerface.proto.FunctionsRequest;
import org.polypheny.db.protointerface.proto.IndexedParameters;
import org.polypheny.db.protointerface.proto.Namespace;
import org.polypheny.db.protointerface.proto.NamespacesRequest;
import org.polypheny.db.protointerface.proto.PrepareStatementRequest;
import org.polypheny.db.protointerface.proto.PreparedStatementSignature;
import org.polypheny.db.protointerface.proto.Procedure;
import org.polypheny.db.protointerface.proto.ProceduresRequest;
import org.polypheny.db.protointerface.proto.RollbackRequest;
import org.polypheny.db.protointerface.proto.SqlKeywordsRequest;
import org.polypheny.db.protointerface.proto.SqlNumericFunctionsRequest;
import org.polypheny.db.protointerface.proto.SqlStringFunctionsRequest;
import org.polypheny.db.protointerface.proto.SqlSystemFunctionsRequest;
import org.polypheny.db.protointerface.proto.SqlTimeDateFunctionsRequest;
import org.polypheny.db.protointerface.proto.StatementBatchResponse;
import org.polypheny.db.protointerface.proto.StatementResponse;
import org.polypheny.db.protointerface.proto.StatementResult;
import org.polypheny.db.protointerface.proto.TableType;
import org.polypheny.db.protointerface.proto.TableTypesRequest;
import org.polypheny.db.protointerface.proto.Type;
import org.polypheny.db.protointerface.proto.TypesRequest;
import org.polypheny.prism.ClientInfoProperties;
import org.polypheny.prism.ClientInfoPropertiesRequest;
import org.polypheny.prism.CloseResultRequest;
import org.polypheny.prism.CloseStatementRequest;
import org.polypheny.prism.CommitRequest;
import org.polypheny.prism.ConnectionCheckRequest;
import org.polypheny.prism.ConnectionProperties;
import org.polypheny.prism.ConnectionPropertiesUpdateRequest;
import org.polypheny.prism.ConnectionRequest;
import org.polypheny.prism.ConnectionResponse;
import org.polypheny.prism.DbmsVersionRequest;
import org.polypheny.prism.DbmsVersionResponse;
import org.polypheny.prism.DefaultNamespaceRequest;
import org.polypheny.prism.DisconnectRequest;
import org.polypheny.prism.EntitiesRequest;
import org.polypheny.prism.Entity;
import org.polypheny.prism.ExecuteIndexedStatementBatchRequest;
import org.polypheny.prism.ExecuteIndexedStatementRequest;
import org.polypheny.prism.ExecuteUnparameterizedStatementBatchRequest;
import org.polypheny.prism.ExecuteUnparameterizedStatementRequest;
import org.polypheny.prism.FetchRequest;
import org.polypheny.prism.Frame;
import org.polypheny.prism.Function;
import org.polypheny.prism.FunctionsRequest;
import org.polypheny.prism.IndexedParameters;
import org.polypheny.prism.Namespace;
import org.polypheny.prism.NamespacesRequest;
import org.polypheny.prism.PrepareStatementRequest;
import org.polypheny.prism.PreparedStatementSignature;
import org.polypheny.prism.Procedure;
import org.polypheny.prism.ProceduresRequest;
import org.polypheny.prism.RollbackRequest;
import org.polypheny.prism.SqlKeywordsRequest;
import org.polypheny.prism.SqlNumericFunctionsRequest;
import org.polypheny.prism.SqlStringFunctionsRequest;
import org.polypheny.prism.SqlSystemFunctionsRequest;
import org.polypheny.prism.SqlTimeDateFunctionsRequest;
import org.polypheny.prism.StatementBatchResponse;
import org.polypheny.prism.StatementResponse;
import org.polypheny.prism.StatementResult;
import org.polypheny.prism.TableType;
import org.polypheny.prism.TableTypesRequest;
import org.polypheny.prism.Type;
import org.polypheny.prism.TypesRequest;
import org.polypheny.jdbc.properties.PolyphenyConnectionProperties;
import org.polypheny.jdbc.transport.PlainTransport;
import org.polypheny.jdbc.transport.Transport;
Expand All @@ -75,6 +75,8 @@
import org.polypheny.jdbc.utils.VersionUtil;

public class PrismInterfaceClient {
private static final int MAJOR_API_VERSION = 2;
private static final int MINOR_API_VERSION = 0;

private final Transport con;
private final RpcService rpc;
Expand Down Expand Up @@ -112,8 +114,8 @@ public ConnectionResponse register( PolyphenyConnectionProperties connectionProp
Optional.ofNullable( connectionProperties.getUsername() ).ifPresent( requestBuilder::setUsername );
Optional.ofNullable( connectionProperties.getPassword() ).ifPresent( requestBuilder::setPassword );
requestBuilder
.setMajorApiVersion( VersionUtil.getMajor() )
.setMinorApiVersion( VersionUtil.getMinor() )
.setMajorApiVersion( MAJOR_API_VERSION )
.setMinorApiVersion( MINOR_API_VERSION )
//.setClientUuid( clientUUID )
.setConnectionProperties( buildConnectionProperties( connectionProperties ) );
ConnectionResponse connectionResponse = rpc.connect( requestBuilder.build(), timeout );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.polypheny.jdbc;

import java.sql.SQLException;
import org.polypheny.db.protointerface.proto.ErrorDetails;
import org.polypheny.prism.ErrorDetails;

public class PrismInterfaceServiceException extends SQLException {

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/polypheny/jdbc/ResultFetcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.db.protointerface.proto.Frame.ResultCase;
import org.polypheny.db.protointerface.proto.Row;
import org.polypheny.prism.Frame;
import org.polypheny.prism.Frame.ResultCase;
import org.polypheny.prism.Row;
import org.polypheny.jdbc.properties.PolyphenyResultSetProperties;
import org.polypheny.jdbc.types.TypedValue;
import org.polypheny.jdbc.utils.TypedValueUtils;
Expand Down
110 changes: 55 additions & 55 deletions src/main/java/org/polypheny/jdbc/RpcService.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,61 +27,61 @@
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicLong;
import lombok.extern.slf4j.Slf4j;
import org.polypheny.db.protointerface.proto.ClientInfoProperties;
import org.polypheny.db.protointerface.proto.ClientInfoPropertiesRequest;
import org.polypheny.db.protointerface.proto.ClientInfoPropertiesResponse;
import org.polypheny.db.protointerface.proto.CloseResultRequest;
import org.polypheny.db.protointerface.proto.CloseResultResponse;
import org.polypheny.db.protointerface.proto.CloseStatementRequest;
import org.polypheny.db.protointerface.proto.CloseStatementResponse;
import org.polypheny.db.protointerface.proto.CommitRequest;
import org.polypheny.db.protointerface.proto.CommitResponse;
import org.polypheny.db.protointerface.proto.ConnectionCheckRequest;
import org.polypheny.db.protointerface.proto.ConnectionCheckResponse;
import org.polypheny.db.protointerface.proto.ConnectionPropertiesUpdateRequest;
import org.polypheny.db.protointerface.proto.ConnectionPropertiesUpdateResponse;
import org.polypheny.db.protointerface.proto.ConnectionRequest;
import org.polypheny.db.protointerface.proto.ConnectionResponse;
import org.polypheny.db.protointerface.proto.DbmsVersionRequest;
import org.polypheny.db.protointerface.proto.DbmsVersionResponse;
import org.polypheny.db.protointerface.proto.DefaultNamespaceRequest;
import org.polypheny.db.protointerface.proto.DefaultNamespaceResponse;
import org.polypheny.db.protointerface.proto.DisconnectRequest;
import org.polypheny.db.protointerface.proto.DisconnectResponse;
import org.polypheny.db.protointerface.proto.EntitiesRequest;
import org.polypheny.db.protointerface.proto.EntitiesResponse;
import org.polypheny.db.protointerface.proto.ExecuteIndexedStatementBatchRequest;
import org.polypheny.db.protointerface.proto.ExecuteIndexedStatementRequest;
import org.polypheny.db.protointerface.proto.ExecuteUnparameterizedStatementBatchRequest;
import org.polypheny.db.protointerface.proto.ExecuteUnparameterizedStatementRequest;
import org.polypheny.db.protointerface.proto.FetchRequest;
import org.polypheny.db.protointerface.proto.Frame;
import org.polypheny.db.protointerface.proto.FunctionsRequest;
import org.polypheny.db.protointerface.proto.FunctionsResponse;
import org.polypheny.db.protointerface.proto.MetaStringResponse;
import org.polypheny.db.protointerface.proto.NamespacesRequest;
import org.polypheny.db.protointerface.proto.NamespacesResponse;
import org.polypheny.db.protointerface.proto.PrepareStatementRequest;
import org.polypheny.db.protointerface.proto.PreparedStatementSignature;
import org.polypheny.db.protointerface.proto.ProceduresRequest;
import org.polypheny.db.protointerface.proto.ProceduresResponse;
import org.polypheny.db.protointerface.proto.Request;
import org.polypheny.db.protointerface.proto.Request.TypeCase;
import org.polypheny.db.protointerface.proto.Response;
import org.polypheny.db.protointerface.proto.RollbackRequest;
import org.polypheny.db.protointerface.proto.RollbackResponse;
import org.polypheny.db.protointerface.proto.SqlKeywordsRequest;
import org.polypheny.db.protointerface.proto.SqlNumericFunctionsRequest;
import org.polypheny.db.protointerface.proto.SqlStringFunctionsRequest;
import org.polypheny.db.protointerface.proto.SqlSystemFunctionsRequest;
import org.polypheny.db.protointerface.proto.SqlTimeDateFunctionsRequest;
import org.polypheny.db.protointerface.proto.StatementBatchResponse;
import org.polypheny.db.protointerface.proto.StatementResponse;
import org.polypheny.db.protointerface.proto.StatementResult;
import org.polypheny.db.protointerface.proto.TableTypesRequest;
import org.polypheny.db.protointerface.proto.TableTypesResponse;
import org.polypheny.db.protointerface.proto.TypesRequest;
import org.polypheny.db.protointerface.proto.TypesResponse;
import org.polypheny.prism.ClientInfoProperties;
import org.polypheny.prism.ClientInfoPropertiesRequest;
import org.polypheny.prism.ClientInfoPropertiesResponse;
import org.polypheny.prism.CloseResultRequest;
import org.polypheny.prism.CloseResultResponse;
import org.polypheny.prism.CloseStatementRequest;
import org.polypheny.prism.CloseStatementResponse;
import org.polypheny.prism.CommitRequest;
import org.polypheny.prism.CommitResponse;
import org.polypheny.prism.ConnectionCheckRequest;
import org.polypheny.prism.ConnectionCheckResponse;
import org.polypheny.prism.ConnectionPropertiesUpdateRequest;
import org.polypheny.prism.ConnectionPropertiesUpdateResponse;
import org.polypheny.prism.ConnectionRequest;
import org.polypheny.prism.ConnectionResponse;
import org.polypheny.prism.DbmsVersionRequest;
import org.polypheny.prism.DbmsVersionResponse;
import org.polypheny.prism.DefaultNamespaceRequest;
import org.polypheny.prism.DefaultNamespaceResponse;
import org.polypheny.prism.DisconnectRequest;
import org.polypheny.prism.DisconnectResponse;
import org.polypheny.prism.EntitiesRequest;
import org.polypheny.prism.EntitiesResponse;
import org.polypheny.prism.ExecuteIndexedStatementBatchRequest;
import org.polypheny.prism.ExecuteIndexedStatementRequest;
import org.polypheny.prism.ExecuteUnparameterizedStatementBatchRequest;
import org.polypheny.prism.ExecuteUnparameterizedStatementRequest;
import org.polypheny.prism.FetchRequest;
import org.polypheny.prism.Frame;
import org.polypheny.prism.FunctionsRequest;
import org.polypheny.prism.FunctionsResponse;
import org.polypheny.prism.MetaStringResponse;
import org.polypheny.prism.NamespacesRequest;
import org.polypheny.prism.NamespacesResponse;
import org.polypheny.prism.PrepareStatementRequest;
import org.polypheny.prism.PreparedStatementSignature;
import org.polypheny.prism.ProceduresRequest;
import org.polypheny.prism.ProceduresResponse;
import org.polypheny.prism.Request;
import org.polypheny.prism.Request.TypeCase;
import org.polypheny.prism.Response;
import org.polypheny.prism.RollbackRequest;
import org.polypheny.prism.RollbackResponse;
import org.polypheny.prism.SqlKeywordsRequest;
import org.polypheny.prism.SqlNumericFunctionsRequest;
import org.polypheny.prism.SqlStringFunctionsRequest;
import org.polypheny.prism.SqlSystemFunctionsRequest;
import org.polypheny.prism.SqlTimeDateFunctionsRequest;
import org.polypheny.prism.StatementBatchResponse;
import org.polypheny.prism.StatementResponse;
import org.polypheny.prism.StatementResult;
import org.polypheny.prism.TableTypesRequest;
import org.polypheny.prism.TableTypesResponse;
import org.polypheny.prism.TypesRequest;
import org.polypheny.prism.TypesResponse;
import org.polypheny.jdbc.transport.Transport;
import org.polypheny.jdbc.utils.CallbackQueue;

Expand Down
25 changes: 13 additions & 12 deletions src/main/java/org/polypheny/jdbc/meta/MetaResultSetBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import org.polypheny.db.protointerface.proto.ClientInfoPropertyMeta;
import org.polypheny.db.protointerface.proto.Column;
import org.polypheny.db.protointerface.proto.ForeignKey;
import org.polypheny.db.protointerface.proto.Index;
import org.polypheny.db.protointerface.proto.Namespace;
import org.polypheny.db.protointerface.proto.PrimaryKey;
import org.polypheny.db.protointerface.proto.Procedure;
import org.polypheny.db.protointerface.proto.Table;
import org.polypheny.db.protointerface.proto.TableType;
import org.polypheny.db.protointerface.proto.Type;
import org.polypheny.db.protointerface.proto.UserDefinedType;
import org.polypheny.prism.ClientInfoPropertyMeta;
import org.polypheny.prism.Column;
import org.polypheny.prism.ForeignKey;
import org.polypheny.prism.Function;
import org.polypheny.prism.Index;
import org.polypheny.prism.Namespace;
import org.polypheny.prism.PrimaryKey;
import org.polypheny.prism.Procedure;
import org.polypheny.prism.Table;
import org.polypheny.prism.TableType;
import org.polypheny.prism.Type;
import org.polypheny.prism.UserDefinedType;
import org.polypheny.jdbc.PolyphenyResultSet;
import org.polypheny.jdbc.types.TypedValue;

Expand Down Expand Up @@ -403,7 +404,7 @@ public static ResultSet buildFromUserDefinedTypes( List<UserDefinedType> userDef
}


public static ResultSet fromFunctions( List<org.polypheny.db.protointerface.proto.Function> functions ) throws SQLException {
public static ResultSet fromFunctions( List<Function> functions ) throws SQLException {
// jdbc standard about functions: Rows are ordered by FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME and SPECIFIC_NAME ascending
functions = functions.stream().sorted( MetaResultSetComparators.FUNCTION_COMPARATOR ).collect( Collectors.toList() );
return buildResultSet(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package org.polypheny.jdbc.meta;

import java.util.Comparator;
import org.polypheny.db.protointerface.proto.ClientInfoPropertyMeta;
import org.polypheny.db.protointerface.proto.Column;
import org.polypheny.db.protointerface.proto.Function;
import org.polypheny.db.protointerface.proto.Namespace;
import org.polypheny.db.protointerface.proto.Table;
import org.polypheny.db.protointerface.proto.Type;
import org.polypheny.prism.ClientInfoPropertyMeta;
import org.polypheny.prism.Column;
import org.polypheny.prism.Function;
import org.polypheny.prism.Namespace;
import org.polypheny.prism.Table;
import org.polypheny.prism.Type;
import org.polypheny.jdbc.utils.TypedValueUtils;

public class MetaResultSetComparators {
Expand Down
Loading

0 comments on commit ab90ed6

Please sign in to comment.