In our gRPC architecture, the Protocol Buffer (protobuf) messages defining the interface of our services are meticulously structured for better organization and clarity. Instead of housing all messages within a single .proto file, they are categorized based on functionality or domain.
For each such category, two distinct files are maintained:
-
Requests: This file encompasses all the protobuf message definitions that pertain to requests made from clients to the server. By convention, the filename for this category always concludes with
_requests.proto
. For example, if we’re handling user-related data, the request messages might be contained within a file nameduser_requests.proto
. -
Responses: In tandem with our request definitions, every category also maintains a file that specifically contains messages related to the responses returned by the server to the client. This file is identified by its suffix
_responses.proto
. Following our earlier example, response messages related to user operations would be located in `user_responses.proto.
This separation ensures a clean demarcation between the request and response message definitions, making it straightforward for developers to locate, update, or extend the RPC message definitions based on their nature and purpose.
In our gRPC system architecture, there’s a distinct file named protointerface.proto
that plays a pivotal role. This file is dedicated to consolidating all the remote procedure calls (RPCs) that our proto interface supports. By centralizing the definitions of the RPCs in protointerface.proto
, we ensure a clear and easily accessible overview of all the available service methods, separate from the categorized request and response message definitions.
Message categories
The table below contains the available categories of messages and the explicit names of their .proto files.
Category | Request Proto File | Response Proto File | Description |
---|---|---|---|
connection | connection_requests.proto | connection_responses.proto | Messages related to establishing and maintaining a connection. |
document_frame | document_frame.proto | - | Messages pertaining to document frames as used to represent results from the document model. |
error | error.proto | - | Messages used to send errors to the client. |
graph_frame | graph_frame.proto | - | Messages related to graph frames as used to represent results form the labeled property graph model. |
meta | meta_requests.proto | meta_responses.proto | Messages that are used for querying general metadata. |
namespace | namespace_requests.proto | namespace_responses.proto | Messages used for querying namespace specific metadata. |
relational_frame | relational_frame.proto | - | Messages related to relational framesas used to represent the results form the relational model. |
statement | statement_requests.proto | statement_responses.proto | Messages related to statements in a query language and their results. |
transaction | transaction_requests.proto | transaction_responses.proto | Messages concerning the handlig of transactions. |
value | value.proto | - | Messages used to represent the types and values of the polypheny proprietary type system. |
Remote Procedure calls
This chapter outlines the remote procedure calls (RPCs) available within the proto interface. Readers will gain insight into the service methods and the corresponding request and response structures. A vrief overview aove all calls is given in the table below.
Procedure Name | Type | Input Message | Return Message |
---|---|---|---|
CheckConnection | Unary RPC | ConnectionCheckRequest | ConnectionCheckResponse |
CloseStatement | Unary RPC | CloseStatementRequest | CloseStatementResponse |
CommitTransaction | Unary RPC | CommitRequest | CommitResponse |
Connect | Unary RPC | ConnectionRequest | ConnectionResponse |
Disconnect | Unary RPC | DisconnectRequest | DisconnectionResponse |
ExecuteIndexedStatement | Unary RPC | ExecuteIndexedStatementRequest | StatementResult |
ExecuteIndexedStatementBatch | Unary RPC | ExecuteIndexedStatementBatchRequest | StatementBatchResponse |
ExecuteNamedStatement | Unary RPC | ExecuteNamedStatementRequest | StatementResult |
ExecuteUnparameterizedStatement | Server Streaming RPC | ExecuteUnparameterizedStatementRequest | stream StatementResponse |
ExecuteUnparameterizedStatementBatch | Server Streaming RPC | ExecuteUnparameterizedStatementBatchRequest | stream StatementBatchResponse |
FetchResult | Unary RPC | FetchRequest | Frame |
GetClientInfoProperties | Unary RPC | ClientInfoPropertiesRequest | ClientInfoProperties |
GetClientInfoPropertyMetas | Unary RPC | ClientInfoPropertyMetaRequest | ClientInfoPropertyMetaResponse |
GetDatabases | Unary RPC | DatabasesRequest | DatabasesResponse |
GetDbmsVersion | Unary RPC | DbmsVersionRequest | DbmsVersionResponse |
GetNamespace | Unary RPC | NamespaceRequest | Namespace |
GetSqlKeywords | Unary RPC | SqlKeywordsRequest | MetaStringResponse |
GetSqlNumericFunctions | Unary RPC | SqlNumericFunctionsRequest | MetaStringResponse |
GetSqlStringFunctions | Unary RPC | SqlStringFunctionsRequest | MetaStringResponse |
GetSqlSystemFunctions | Unary RPC | SqlSystemFunctionsRequest | MetaStringResponse |
GetSqlTimeDateFunctions | Unary RPC | SqlTimeDateFunctionsRequest | MetaStringResponse |
GetSupportedLanguages | Unary RPC | LanguageRequest | LanguageResponse |
GetTableTypes | Unary RPC | TableTypesRequest | TableTypesResponse |
GetTypes | Unary RPC | TypesRequest | TypesResponse |
GetUserDefinedTypes | Unary RPC | UserDefinedTypesRequest | UserDefinedTypesResponse |
PrepareIndexedStatement | Unary RPC | PrepareStatementRequest | PreparedStatementSignature |
PrepareNamedStatement | Unary RPC | PrepareStatementRequest | PreparedStatementSignature |
RollbackTransaction | Unary RPC | RollbackRequest | RollbackResponse |
SearchEntities | Unary RPC | EntitiesRequest | EntitiesResponse |
SearchFunctions | Unary RPC | FunctionsRequest | FunctionsResponse |
SearchNamespaces | Unary RPC | NamespacesRequest | NamespacesResponse |
SearchProcedures | Unary RPC | ProceduresRequest | ProceduresResponse |
SetClientInfoProperties | Unary RPC | ClientInfoProperties | ClientInfoPropertiesResponse |
UpdateConnectionProperties | Unary RPC | ConnectionPropertiesUpdateRequest | ConnectionPropertiesUpdateResponse |
For more details on the different call types such as Unary, Server Streaming, Client Streaming, and more, please refer to the official gRPC documentation.
CheckConnection
The CheckConnection
procedure is utilized to verify the state of an established connection to the server. It allows clients to ensure that the connection is still active and in good health.
Input Message:
- Message Name:
ConnectionCheckRequest
- Contained in File:
connection_requests.proto
Return Message:
- Message Name:
ConnectionCheckResponse
- Contained in File:
connection_responses.proto
Signature:
rpc CheckConnection(ConnectionCheckRequest) returns (ConnectionCheckResponse) {}
CloseStatement
The CloseStatement
procedure is used to formally close a previously prepared or executed database statement. Closing a statement releases the resources associated with it and ensures that there are no lingering locks or allocations.
Input Message:
- Message Name:
CloseStatementRequest
- Contained in File:
statement_requests.proto
Return Message:
- Message Name:
CloseStatementResponse
- Contained in File:
statement_responses.proto
Signature:
rpc CloseStatement(CloseStatementRequest) returns (CloseStatementResponse) {}
CommitTransaction
The CommitTransaction
procedure is utilized to commit the changes made during a database transaction. Committing ensures that all the modifications made during the transaction are permanently saved in the database. If any error occurs during the commit, the changes can be rolled back to maintain the database’s consistency.
Input Message:
- Message Name:
CommitRequest
- Contained in File:
transaction_requests.proto
Return Message:
- Message Name:
CommitResponse
- Contained in File:
transaction_responses.proto
Signature:
rpc CommitTransaction(CommitRequest) returns (CommitResponse) {}
Connect
The Connect
procedure is designed to establish a connection to the database. Once connected, clients can perform various operations like executing queries, fetching results, or managing transactions. This procedure serves as the initial entry point for interactions between the client and the database.
Input Message:
- Message Name:
ConnectionRequest
- Contained in File:
connection_requests.proto
Return Message:
- Message Name:
ConnectionResponse
- Contained in File:
connection_responses.proto
Signature:
rpc Connect(ConnectionRequest) returns (ConnectionResponse) {}
Disconnect
The Disconnect
procedure is utilized to safely terminate an existing connection to the database. Disconnecting ensures that any pending transactions or uncommitted changes are dealt with appropriately, and resources associated with the connection are released.
Input Message:
- Message Name:
DisconnectRequest
- Contained in File:
connection_requests.proto
Return Message:
- Message Name:
DisconnectionResponse
- Contained in File:
connection_responses.proto
Signature:
rpc Disconnect(DisconnectRequest) returns (DisconnectionResponse) {}
ExecuteIndexedStatement
The ExecuteIndexedStatement
procedure is designed to execute a provided indexed statement in the database. An indexed statement contains placeholders, where values can be assigned based on their order, rather than by specific placeholder names.
Input Message:
- Message Name:
ExecuteIndexedStatementRequest
- Contained in File:
statement_requests.proto
Return Message:
- Message Name:
StatementResult
- Contained in File:
statement_responses.proto
Signature:
rpc ExecuteIndexedStatement(ExecuteIndexedStatementRequest) returns (StatementResult) {}
ExecuteIndexedStatementBatch
The ExecuteIndexedStatementBatch
procedure allows for the execution of a batch of indexed statements. These indexed statements contain placeholders where values are assigned based on their order in the statement. By processing these statements in batches, clients can optimize database interactions and potentially achieve better performance, especially when dealing with large amounts of data.
Input Message:
- Message Name:
ExecuteIndexedStatementBatchRequest
- Contained in File:
statement_requests.proto
Return Message:
- Message Name:
StatementBatchResponse
- Contained in File:
statement_responses.proto
Signature:
rpc ExecuteIndexedStatementBatch(ExecuteIndexedStatementBatchRequest) returns (StatementBatchResponse) {}
ExecuteNamedStatement
The ExecuteNamedStatement
procedure facilitates the execution of a previously prepared named statement in the database. Named statements are database queries with named placeholders, providing clarity when assigning values to the statement.
Input Message:
- Message Name:
ExecuteNamedStatementRequest
- Contained in File:
statement_requests.proto
Return Message:
- Message Name:
StatementResult
- Contained in File:
statement_responses.proto
Signature:
rpc ExecuteNamedStatement(ExecuteNamedStatementRequest) returns (StatementResult) {}
ExecuteUnparameterizedStatement
The ExecuteUnparameterizedStatement
procedure is employed to execute a database statement that does not contain any parameters or placeholders. This straightforward approach ensures a direct interaction with the database without any variable assignments.
Input Message:
- Message Name:
ExecuteUnparameterizedStatementRequest
- Contained in File:
statement_requests.proto
Return Message (stream):
- Message Name:
StatementResponse
- Contained in File:
statement_responses.proto
Signature:
rpc ExecuteUnparameterizedStatement(ExecuteUnparameterizedStatementRequest) returns (stream StatementResponse) {}
The ExecuteUnparameterizedStatement
call is a server streaming RPC. When invoked, it returns two StatementResponse
messages in sequence:
- The first
StatementResponse
provides the statement ID of the executed statement, serving as a unique identifier. - The second
StatementResponse
delivers both the same statement ID and the initial frame of the result, allowing clients to commence with data processing or further fetch operations.
ExecuteUnparameterizedStatementBatch
The ExecuteUnparameterizedStatementBatch
procedure allows for the execution of a batch of unparameterized database statements. These are statements that do not require any dynamic placeholders or parameters. The use of server streaming in the response indicates that the server can send back multiple StatementBatchResponse
messages to the client within a single call, ideal for processing large batches or sets of results.
Input Message:
- Message Name:
ExecuteUnparameterizedStatementBatchRequest
- Contained in File:
statement_requests.proto
Return Message (stream):
- Message Name:
StatementBatchResponse
- Contained in File:
statement_responses.proto
Signature:
rpc ExecuteUnparameterizedStatementBatch(ExecuteUnparameterizedStatementBatchRequest) returns (stream StatementBatchResponse) {}
The ExecuteUnparameterizedStatementBatch
call is a server streaming RPC. When invoked, it returns two StatementBatchResponse
messages in sequence:
- The first
StatementBatchResponse
provides the statement ID of the statement batch, serving as a unique identifier. - The second
StatementResponse
delivers both the same statement ID and a list of update counts of the individual statements.
FetchResult
The FetchResult
procedure is employed to retrieve the result frames of previously executed statements.This RPC allows to sequentially fetch the associated result frames from the database. This is useful for statements that produce large results, enabling the client to retrieve data in manageable portions rather than all at once.
Input Message:
- Message Name:
FetchRequest
- Contained in File:
statement_requests.proto
Return Message:
- Message Name:
Frame
- Contained in File:
statement_responses.proto
Signature:
rpc FetchResult(FetchRequest) returns (Frame) {}
GetClientInfoProperties
The GetClientInfoProperties
procedure retrieves the client-specific client properties stored on the database. These properties consist of a set of arbitrary key-value pairs set by the client and can be used to stor additional information about a client.
Input Message:
- Message Name:
ClientInfoPropertiesRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
ClientInfoProperties
- Contained in File:
meta_responses.proto
Signature:
rpc GetClientInfoProperties(ClientInfoPropertiesRequest) returns (ClientInfoProperties) {}
GetClientInfoPropertyMetas
The GetClientInfoPropertyMetas
procedure retrieves metadata about the client properties stored on the database. This metadata provides insights into the structure, constraints, and possible values of the client properties, aiding in understanding and correctly setting client-specific information.
Input Message:
- Message Name:
ClientInfoPropertyMetaRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
ClientInfoPropertyMetaResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetClientInfoPropertyMetas(ClientInfoPropertyMetaRequest) returns (ClientInfoPropertyMetaResponse) {}
GetDatabases
The GetDatabases
procedure is designed to fetch a list of databases that are present in the system. By invoking this RPC, clients can receive an overview of all available databases, enabling them to choose a specific database for operations or understand the data landscape of the connected environment.
Input Message:
- Message Name:
DatabasesRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
DatabasesResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetDatabases(DatabasesRequest) returns (DatabasesResponse) {}
GetDbmsVersion
The GetDbmsVersion
procedure provides a means to retrieve the version details of the Database Management System (DBMS) in use.
Input Message:
- Message Name:
DbmsVersionRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
DbmsVersionResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetDbmsVersion(DbmsVersionRequest) returns (DbmsVersionResponse) {}
GetNamespace
The GetNamespace
procedure is specifically designed to retrieve metadata about a particular namespace specified in the NamespaceRequest
.
Input Message:
- Message Name:
NamespaceRequest
- Contained in File:
namespace_meta_requests.proto
Return Message:
- Message Name:
Namespace
- Contained in File:
namespace_meta_responses.proto
Signature:
rpc GetNamespace(NamespaceRequest) returns (Namespace) {}
GetSqlKeywords
The GetSqlKeywords
procedure is used for retrieving a list of SQL keywords supported by the DBMS.
Input Message:
- Message Name:
SqlKeywordsRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
MetaStringResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetSqlKeywords(SqlKeywordsRequest) returns (MetaStringResponse) {}
GetSqlNumericFunctions
The GetSqlNumericFunctions
procedure is designed to fetch a list of SQL numeric functions that the DBMS supports.
Input Message:
- Message Name:
SqlNumericFunctionsRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
MetaStringResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetSqlNumericFunctions(SqlNumericFunctionsRequest) returns (MetaStringResponse) {}
GetSqlStringFunctions
The GetSqlStringFunctions
procedure is used to retrieve a list of SQL string functions supported by the DBMS.
Input Message:
- Message Name:
SqlStringFunctionsRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
MetaStringResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetSqlStringFunctions(SqlStringFunctionsRequest) returns (MetaStringResponse) {}
GetSqlSystemFunctions
The GetSqlSystemFunctions
procedure is engineered to obtain a list of SQL system functions that the DBMS supports.
Input Message:
- Message Name:
SqlSystemFunctionsRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
MetaStringResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetSqlSystemFunctions(SqlSystemFunctionsRequest) returns (MetaStringResponse) {}
GetSqlTimeDateFunctions
The GetSqlTimeDateFunctions
procedure is dedicated to fetching a list of SQL time and date functions that the DBMS supports.
Input Message:
- Message Name:
SqlTimeDateFunctionsRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
MetaStringResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetSqlTimeDateFunctions(SqlTimeDateFunctionsRequest) returns (MetaStringResponse) {}
GetSupportedLanguages
The GetSupportedLanguages
procedure is geared towards retrieving a list of query languages that the DBMS supports for statements.
Input Message:
- Message Name:
LanguageRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
LanguageResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetSupportedLanguages(LanguageRequest) returns (LanguageResponse) {}
GetTableTypes
The GetTableTypes
procedure is specifically crafted to retrieve a list of table types that the DBMS supports.
Input Message:
- Message Name:
TableTypesRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
TableTypesResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetTableTypes(TableTypesRequest) returns (TableTypesResponse) {}
GetTypes
The GetTypes
procedure aims to fetch a list of data types supported by the DBMS.
Input Message:
- Message Name:
TypesRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
TypesResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetTypes(TypesRequest) returns (TypesResponse) {}
GetUserDefinedTypes
The GetUserDefinedTypes
procedure is constructed to retrieve a list of user-defined data types present in the DBMS.
Input Message:
- Message Name:
UserDefinedTypesRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
UserDefinedTypesResponse
- Contained in File:
meta_responses.proto
Signature:
rpc GetUserDefinedTypes(UserDefinedTypesRequest) returns (UserDefinedTypesResponse) {}
PrepareIndexedStatement
The PrepareIndexedStatement
procedure is designed to prepare a statement containing placeholders based on their order, referred to as an indexed statement. The PreparedStatementSignature
returned by this call contains metadata for ablut the values permitted for each placeholder.
Input Message:
- Message Name:
PrepareStatementRequest
- Contained in File:
statement_requests.proto
Return Message:
- Message Name:
PreparedStatementSignature
- Contained in File:
statement_responses.proto
Signature:
rpc PrepareIndexedStatement(PrepareStatementRequest) returns (PreparedStatementSignature) {}
PrepareNamedStatement
The PrepareNamedStatement
procedure is used to prepare a database statement that uses named placeholders for variable values. Named statements provide a mechanism to identify variables by a specific name, making it easier to assign values without relying solely on the order of appearance. he PreparedStatementSignature
returned by this call contains metadata for ablut the values permitted for each placeholder.
Input Message:
- Message Name:
PrepareStatementRequest
- Contained in File:
statement_requests.proto
Return Message:
- Message Name:
PreparedStatementSignature
- Contained in File:
statement_responses.proto
Signature:
rpc PrepareNamedStatement(PrepareStatementRequest) returns (PreparedStatementSignature) {}
RollbackTransaction
The RollbackTransaction
procedure provides the functionality to revert any changes made within the current transaction, ensuring data integrity and consistency.
Input Message:
- Message Name:
RollbackRequest
- Contained in File:
transaction_requests.proto
Return Message:
- Message Name:
RollbackResponse
- Contained in File:
transaction_responses.proto
Signature:
rpc RollbackTransaction(RollbackRequest) returns (RollbackResponse) {}
SearchEntities
The SearchEntities
procedure allows clients to retrieve metadata about specific entities within a specific namespace. Entities can refer to tables, documents or graphs.
Input Message:
- Message Name:
EntitiesRequest
- Contained in File:
namespace_meta_requests.proto
Return Message:
- Message Name:
EntitiesResponse
- Contained in File:
namespace_meta_responses.proto
Signature:
rpc SearchEntities(EntitiesRequest) returns (EntitiesResponse) {}
SearchFunctions
The SearchFunctions
procedure facilitates clients in searching for and retrieving metadata of specific functions available within the DBMS. Functions could be built-in, user-defined, or any other supported categories. This RPC allows users to locate and get details of functions based on certain criteria.
Input Message:
- Message Name:
FunctionsRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
FunctionsResponse
- Contained in File:
meta_responses.proto
Signature:
rpc SearchFunctions(FunctionsRequest) returns (FunctionsResponse) {}
SearchNamespaces
The SearchNamespaces
procedure is designed to allow clients to retrieve a list of metadata related to the namespaces within the DBMS.
Input Message:
- Message Name:
NamespacesRequest
- Contained in File:
namespace_meta_requests.proto
Return Message:
- Message Name:
NamespacesResponse
- Contained in File:
namespace_meta_responses.proto
Signature:
rpc SearchNamespaces(NamespacesRequest) returns (NamespacesResponse) {}
SearchProcedures
The SearchProcedures
procedure enables clients to search for and retrieve metadata about specific stored procedures available within the DBMS.
Input Message:
- Message Name:
ProceduresRequest
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
ProceduresResponse
- Contained in File:
meta_responses.proto
Signature:
rpc SearchProcedures(ProceduresRequest) returns (ProceduresResponse) {}
SetClientInfoProperties
The SetClientInfoProperties
procedure facilitates clients in setting or updating key-value pairs known as client info properties on the database. These properties provide additional information about a connected client, aiding in tasks such as monitoring, auditing, and debugging.
Input Message:
- Message Name:
ClientInfoProperties
- Contained in File:
meta_requests.proto
Return Message:
- Message Name:
ClientInfoPropertiesResponse
- Contained in File:
meta_responses.proto
Signature:
rpc SetClientInfoProperties(ClientInfoProperties) returns (ClientInfoPropertiesResponse) {}
UpdateConnectionProperties
The UpdateConnectionProperties
procedure is utilized by clients to update various properties related to a connection.
Input Message:
- Message Name:
ConnectionPropertiesUpdateRequest
- Contained in File:
connection_requests.proto
Return Message:
- Message Name:
ConnectionPropertiesUpdateResponse
- Contained in File:
connection_responses.proto
Signature:
rpc UpdateConnectionProperties(ConnectionPropertiesUpdateRequest) returns (ConnectionPropertiesUpdateResponse) {}
Protocol Messages
This section provides a comprehensive breakdown of protocol messages used in the communication between clients and the server. The messages are categorized into distinct groups, each representing a specific aspect of the interaction. Starting from connection-related messages and extending to transaction handling and beyond, the documentation delves into the purpose, structure, and usage of each message.
Connection Messages
The following section provides information about all messages related to a client’s connection and it’s properties.
ConnectionRequest
The ConnectionRequest
message is designed to initiate a connection request from the client to the server. It contains information regarding the API version, client identity, and optional credentials, as well as properties associated with the connection.
Field Name | Protobuf Type | Description |
---|---|---|
major_api_version |
int32 |
Specifies the major version of the API that the client is using. |
minor_api_version |
int32 |
Represents the minor version of the API in use. |
client_uuid |
string |
A unique identifier for the client, used to distinguish individual clients in communication. |
username |
optional string |
(Optional) The username for authentication when establishing the connection. |
password |
optional string |
(Optional) The password associated with the specified username for authentication purposes. |
connection_properties |
optional ConnectionProperties |
(Optional) Contains specific properties related to the connection, such as timeout settings or database preferences. |
When no username is specified the default user of the database is chosen. The absence of a password is used to specify that the selected user does not require a password to authenticate. If no connection properties are specified a set of default properties is used. If connection properties are specified that have unset fields default values are used for those.
ConnectionProperties
The ConnectionProperties
message defines specific properties related to the client-server connection. It allows clients to specify certain behaviors and settings for the connection, such as transaction auto-commit status and target namespace preference.
Field Name | Protobuf Type | Description |
---|---|---|
is_auto_commit |
optional bool |
(Optional) Indicates whether transactions are automatically committed upon execution or require manual commitment. |
namespace_name |
optional string |
(Optional) Specifies the preferred namespace within the database or system that the client wants to interact with. |
Absent values are either ignored or replaced with default values depending on the context or remote procedure. See the coresponding documentations for reference.
ConnectionPropertiesUpdateRequest
The ConnectionPropertiesUpdateRequest
message allows clients to update the properties associated with their connection. This request enables dynamic modification of connection behavior without necessitating a re-establishment of the connection.
Field Name | Protobuf Type | Description |
---|---|---|
connection_properties |
ConnectionProperties |
Specifies the new settings for the connection. Contains properties such as transaction auto-commit status and target namespace preference. |
When the specified connection properties miss some of the parameters only the paramers containing a value are updated.
ConnectionCheckRequest
The ConnectionCheckRequest
message in combination with the corresponding remot procedure call is utilized to verify the current state of an established connection. It acts as a simple “ping” request, enabling clients to ascertain if the server is responsive and if the connection is still valid.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply acts as an indicator to prompt the server for a ConnectionCheckResponse . |
DisconnectRequest
The DisconnectRequest
message, when paired with its respective remote procedure call, signals the intent to terminate an established connection. It serves as a formal request from the client to disconnect from the server, ensuring a graceful termination process.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. Its presence communicates the desire to initiate the disconnection procedure. |
ConnectionResponse
The ConnectionResponse
message is sent by the server in response to a ConnectionRequest
from the client. It provides feedback regarding the compatibility of the client’s API version with the server, as well as other important information about the connection.
Field Name | Protobuf Type | Description |
---|---|---|
is_compatible |
bool |
Indicates whether the client’s API version is compatible with the server. If true , the connection can proceed; if false , the client should consider updating or downgrading its API version. |
major_api_version |
int32 |
The major version number of the server’s API. Helps the client ascertain the API level of the server. |
minor_api_version |
int32 |
The minor version number of the server’s API. Provides finer granularity about the server’s capabilities. |
heartbeat_interval |
optional int64 |
Specifies the interval in milliseconds at which the client should send heartbeat signals to maintain the connection. If not provided, the connection does not require a heartbeat to remain valid. |
DisconnectionResponse
The DisconnectionResponse
message is sent by the server in response to a DisconnectRequest
from the client. It provides an acknowledgment that the disconnection process has been acknowledged and processed by the server.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply serves as an acknowledgment of the disconnection process. |
ConnectionCheckResponse
The ConnectionCheckResponse
message is sent by the server in response to a ConnectionCheckRequest
from the client. It acts as an affirmation that the server is responsive, and the connection is still valid.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. Its receipt by the client is an indicator of the server’s responsiveness and the validity of the connection. |
ConnectionPropertiesUpdateResponse
The ConnectionPropertiesUpdateResponse
message is sent by the server in response to a ConnectionPropertiesUpdateRequest
from the client. It acknowledges the success of the requested connection properties update.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It serves as an acknowledgment of the update process for the connection properties. |
Document Frame Messages
This section describes all messages required to represent a frame of a result in the document model.
DocumentFrame
The DocumentFrame
message represents a frame containing one or more documents and is used to relay results or data entries structured as documents from the server to the client.
Field Name | Protobuf Type | Description |
---|---|---|
documents |
repeated ProtoDocument |
A list of documents contained within this frame. Each entry in this list is an instance of ProtoDocument , representing an individual document. |
The
ProtoDocument
is one of the datatypes upported by the proto interface. Consult the corresponding documentation in the section Value Messages for further details.
Error Messages
This section describes all messages required to represent an exception.
ErrorDetails
The ErrorDetails
message conveys specific information about an error encountered during the processing of a request. This detailed feedback aids clients in understanding the nature and cause of an issue.
Field Name | Protobuf Type | Description |
---|---|---|
error_code |
optional int32 |
A numeric code representing the specific error encountered. This code can be used programmatically to handle specific error cases. |
state |
optional string |
An optional state description in the form of an identifier that provides further context about the error. |
message |
optional string |
A human-readable message describing the error in detail. This message offers clients a clear understanding of the issue. |
Graph Frame Messages
This section describes all messages required to represent a frame of a result in the graph model.
GraphFrame
The GraphFrame
message is a placeholder intended to represent graph frames as part of the labeled property graph model. As of now, the graph model is not fully implemented, making this message void of fields. It acts as a provision for future developments where fields related to the graph model will be added.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | Currently, this message does not contain any fields. It is reserved for future use when the graph model is more completely realized. |
Meta Messages
Messages that are used for querying general metadata.
DbmsVersionRequest
The DbmsVersionRequest
message is utilized to request the version information of the database management system (DBMS) in use. It acts as a trigger for the server to respond with the specific version details of the DBMS.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply acts as an indicator to prompt the server for DbmsVersionResponse . |
LanguageRequest
The LanguageRequest
message facilitates the retrieval of supported query languages that can be used for constructing statements.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It acts as a request for the server to return the list of supported query languages in a LanguageResponse . |
DatabasesRequest
The DatabasesRequest
message is employed to solicit a list of databases that are currently managed by the DBMS. This is pivotal for clients aiming to interact with a specific database or to understand the landscape of databases under management.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not have any fields. It signals the server to provide a list of databases in a DatabasesResponse . |
TableTypesRequest
The TableTypesRequest
message is designed to request information about the different types of tables that are supported or recognized by the DBMS.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It’s a prompt for the server to respond with details about the supported table types in a TableTypesResponse . |
TypesRequest
The TypesRequest
message is deployed to obtain a list of data types supported by the database management system. This helps clients understand the range of data types they can utilize when defining or querying tables.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply prompts the server to return a list of supported data types in a TypesResponse . |
UserDefinedTypesRequest
The UserDefinedTypesRequest
message facilitates the retrieval of user-defined data types present in the database. These custom data types can be crafted to meet specific needs not met by standard types.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message is devoid of fields. It acts as a signal for the server to provide details of user-defined data types in a UserDefinedTypesResponse . |
SqlStringFunctionsRequest
The SqlStringFunctionsRequest
message is used to solicit information about the string functions supported by the SQL implementation of the DBMS.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message is fieldless and prompts the server to return details of the available string functions in an SqlStringFunctionsResponse . |
SqlSystemFunctionsRequest
The SqlSystemFunctionsRequest
message aims to retrieve the list of system functions provided by the SQL implementation of the DBMS.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | Without any fields, this message indicates the server to respond with details about the system functions in an SqlSystemFunctionsResponse . |
SqlTimeDateFunctionsRequest
The SqlTimeDateFunctionsRequest
message is dispatched to fetch a list of time and date functions supported by the SQL implementation of the DBMS.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message, being fieldless, acts as a request for the server to list time and date functions in a SqlTimeDateFunctionsResponse . |
SqlNumericFunctionsRequest
The SqlNumericFunctionsRequest
message endeavors to obtain details about the numeric functions provided by the SQL implementation of the DBMS.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message, devoid of fields, prompts the server to respond with information about numeric functions in an SqlNumericFunctionsResponse . |
SqlKeywordsRequest
The SqlKeywordsRequest
message is designed to request a list of reserved keywords utilized by the SQL implementation of the DBMS.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | With no fields, this message acts as an indicator for the server to provide the list of SQL keywords in an SqlKeywordsResponse . |
ProceduresRequest
The ProceduresRequest
message is employed to retrieve a list of stored procedures in the database for a specified query language. The client can also narrow down the results by specifying a procedure name pattern.
Field Name | Protobuf Type | Description |
---|---|---|
language |
string |
The query language for which the procedures are defined. This determines the set of procedures that will be retrieved. |
procedure_name_pattern |
optional string |
A pattern to filter the names of procedures. For example, providing “get%” might retrieve procedures named getUser , getDetails , etc. If not specified, all procedures for the provided language will be returned. Like in sql, the symbol _ can be used to match a single character. |
ClientInfoPropertiesRequest
The ClientInfoPropertiesRequest
message facilitates the acquisition of client information properties stored in the database. These properties can offer additional context about the connected client.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message doesn’t possess any fields. It acts as a directive for the server to provide the associated client information properties in a ClientInfoPropertiesResponse . |
ClientInfoPropertyMetaRequest
The ClientInfoPropertyMetaRequest
message aids in extracting metadata about the client information properties present in the database.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This fieldless message prompts the server to detail metadata concerning client information properties in a ClientInfoPropertyMetaResponse . |
FunctionsRequest
The FunctionsRequest
message is wielded to obtain a list of functions from the database based on the specified query language and function category.
Field Name | Protobuf Type | Description |
---|---|---|
queryLanguage |
string |
Defines the query language for which the functions are sought. This field determines the range of functions that will be retrieved. |
functionCategory |
string |
Categorizes the function, allowing clients to filter results based on specific categories, such as “NUMERIC”, “STRING”, or “SYSTEM”. This helps in refining the search for specific types of functions. |
DbmsVersionResponse
The DbmsVersionResponse
message relays details about the version and name of the database management system (DBMS) in response to a DbmsVersionRequest
.
Field Name | Protobuf Type | Description |
---|---|---|
dbms_name |
string |
The name of the database management system. |
version_name |
string |
The full version name of the DBMS. |
major_version |
int32 |
The major version number of the DBMS. |
minor_version |
int32 |
The minor version number of the DBMS. |
LanguageResponse
The LanguageResponse
message offers a list of query languages supported by the system.
Field Name | Protobuf Type | Description |
---|---|---|
language_names |
repeated string |
A list containing the names of all supported query languages. |
DatabasesResponse
The DatabasesResponse
message provides details about the databases present in the system.
Field Name | Protobuf Type | Description |
---|---|---|
databases |
repeated Database |
A list of Database objects detailing each database present in the system. |
Database
The Database
message encapsulates details about an individual database.
Field Name | Protobuf Type | Description |
---|---|---|
database_name |
string |
The name of the database. |
owner_name |
string |
The name of the owner of the database. |
default_namespace_name |
string |
The default namespace associated with the database. |
TableTypesResponse
The TableTypesResponse
message conveys information about the various table types present in the system.
Field Name | Protobuf Type | Description |
---|---|---|
table_types |
repeated TableType |
A list of TableType objects detailing each table type present in the system. |
TableType
The TableType
message delineates the nature or category of a table.
Field Name | Protobuf Type | Description |
---|---|---|
table_type |
string |
A descriptor denoting the type or category of a table, such as “BASE TABLE”, “VIEW”, or any other classification present in the system. |
TypesResponse
The TypesResponse
message provides a list of native data types supported by the system.
Field Name | Protobuf Type | Description |
---|---|---|
types |
repeated Type |
A list of Type objects detailing each native data type supported by the system. |
Type
The Type
message describes the characteristics and specifications of a particular native data type.
Field Name | Protobuf Type | Description |
---|---|---|
type_name |
string |
The name of the data type. |
precision |
int32 |
The number of total digits for numeric types or the maximum length for string and binary types. |
literal_prefix |
optional string |
The character(s) used to prefix a literal of this type (e.g., a single quote for strings). |
literal_suffix |
optional string |
The character(s) used to suffix a literal of this type. |
is_case_sensitive |
bool |
Indicates whether the data type is case sensitive. |
is_searchable |
int32 |
Indicates how the data type can be used in WHERE clauses. |
is_auto_increment |
bool |
Indicates whether columns of this data type auto-increment. |
min_scale |
int32 |
The minimum scale for this data type. |
max_scale |
int32 |
The maximum scale for this data type. |
radix |
int32 |
The base number used in representing numeric values. |
UserDefinedTypesResponse
The UserDefinedTypesResponse
message offers a list of user-defined data types present in the system.
Field Name | Protobuf Type | Description |
---|---|---|
user_defined_types |
repeated UserDefinedType |
A list of UserDefinedType objects detailing each user-defined data type in the system. |
UserDefinedType
The UserDefinedType
message encapsulates details about a specific user-defined data type.
Field Name | Protobuf Type | Description |
---|---|---|
type_name |
string |
The name of the user-defined data type. |
value_metas |
repeated ValueMeta |
A list of ValueMeta objects detailing the metadata associated with fields of this data type. |
ValueMeta
The ValueMeta
message offers insights into the metadata of a specific fieldrelated to a user-defined type.
Field Name | Protobuf Type | Description |
---|---|---|
value_name |
string |
The name or descriptor of the value’s metadata. |
MetaStringResponse
The MetaStringResponse
message encapsulates a string that represents some specific metadata information.
Field Name | Protobuf Type | Description |
---|---|---|
string |
string |
A string representing the requested metadata information. |
ProceduresResponse
The ProceduresResponse
message provides a list of stored procedures available within the system.
Field Name | Protobuf Type | Description |
---|---|---|
procedures |
repeated Procedure |
A list of Procedure objects detailing each stored procedure present in the system. |
Procedure
The Procedure
message encapsulates details about a specific stored procedure in the system.
Field Name | Protobuf Type | Description |
---|---|---|
trivial_name |
string |
The simple name of the procedure. |
input_parameters |
string |
The input parameters required by the procedure. |
description |
string |
A brief description or purpose of the procedure. |
return_type |
ReturnType |
Enum indicating the return type of the procedure. It can be unspecified, unknown, no result, or result. |
unique_name |
string |
A unique name or identifier for the procedure. |
ReturnType Enum
The reuturn type enum is part of the message Procedure
and indicates the possible types of return values for a stored procedure.
Enum Value | Description |
---|---|
UNSPECIFIED |
Indicates that the return type is unspecified. |
UNKNOWN |
Indicates that the return type is unknown. |
NO_RESULT |
The procedure does not return a result. |
RESULT |
The procedure returns a result. |
ClientInfoProperties
The ClientInfoProperties
message encapsulates key-value pairs representing client-specific information.
Field Name | Protobuf Type | Description |
---|---|---|
properties |
map<string, string> |
A mapping of property names to their corresponding values, providing insights or settings related to the client. |
ClientInfoPropertyMetaResponse
The ClientInfoPropertyMetaResponse
message provides metadata about various client-specific properties.
Field Name | Protobuf Type | Description |
---|---|---|
clientInfoPropertyMetas |
repeated ClientInfoPropertyMeta |
A list of ClientInfoPropertyMeta objects detailing metadata for each client-specific property. |
ClientInfoPropertyMeta
The ClientInfoPropertyMeta
message encapsulates metadata about a specific client property.
Field Name | Protobuf Type | Description |
---|---|---|
key |
string |
The unique key identifier for the client property. |
default_value |
string |
The default value of the property. |
maxlength |
int32 |
Maximum length of the property value. Useful for validation purposes. |
description |
string |
A brief description explaining the purpose or usage of the property. |
FunctionsResponse
The FunctionsResponse
message provides a list of functions available within the system.
Field Name | Protobuf Type | Description |
---|---|---|
functions |
repeated Function |
A list of Function objects detailing each function present in the system. |
Function
The Function
message encapsulates details about a specific function in the system.
Field Name | Protobuf Type | Description |
---|---|---|
name |
string |
The name of the function. |
syntax |
string |
The expected syntax for using the function. |
function_category |
string |
The category to which the function belongs. Helps in categorizing functions for better management and understanding. |
is_table_function |
bool |
Indicates whether the function is a table function. If true , it means the function returns a table; otherwise, it returns a scalar value. |
Namespace Meta Messages
This section contains all messages related describing the metadata of namespaces and their entities.
NamespaceRequest
The NamespaceRequest
message is designed for querying specific details about aspecific namespace.
Field Name | Protobuf Type | Description |
---|---|---|
namespace_name |
string |
The name of the namespace for which details are being requested. |
NamespacesRequest
The NamespacesRequest
message allows querying for namespaces based on specific patterns in their names as well as their types.
Field Name | Protobuf Type | Description |
---|---|---|
namespace_pattern |
optional string |
An optional pattern that can be used to filter the returned namespaces based on their names. For example, using a pattern like “user_*” might return all namespaces starting with “user_”. |
namespace_type |
optional string |
An optional type specifier that can be used to filter namespaces based on their type. This allows clients to request namespaces of a particular type. |
EntitiesRequest
The EntitiesRequest
message is meant for querying details about entities within a specific namespace, possibly using a pattern to narrow down the results.
Field Name | Protobuf Type | Description |
---|---|---|
namespace_name |
string |
The name of the namespace within which entities are to be searched. |
entity_pattern |
optional string |
An optional pattern for filtering the returned entities. This can help in narrowing down the list of entities based on a naming pattern or other criteria. |
NamespacesResponse
The NamespacesResponse
message delivers a list of namespaces based on the provided criteria in the NamespacesRequest
.
Field Name | Protobuf Type | Description |
---|---|---|
namespaces |
repeated Namespace |
A list of Namespace messages containing information about each namespace that matches the search criteria. |
EntitiesResponse
The EntitiesResponse
message returns a list of entities that match the provided criteria from the EntitiesRequest
.
Field Name | Protobuf Type | Description |
---|---|---|
entities |
repeated Entity |
A list of Entity messages containing information about each entity within the requested namespace. |
Namespace
The Namespace
message provides detailed information about a specific namespace.
Field Name | Protobuf Type | Description |
---|---|---|
namespace_name |
string |
The name of the namespace. |
database_name |
string |
The name of the database to which this namespace belongs. |
owner_name |
string |
The name of the owner of the namespace. |
is_case_sensitive |
bool |
Indicates if the namespace name is case sensitive. |
namespace_type |
optional string |
An optional field providing the type of the namespace, if applicable. |
Entity
The Entity
message encapsulates different types of entities. Only one of the entities can be set for a given message instance.
Field Name | Protobuf Type | Description |
---|---|---|
table |
Table |
An entity of type Table . |
graph |
Graph |
An entity of type Graph . |
document |
Document |
An entity of type Document . |
Table
The Table
message provides comprehensive information about a specific table within a database.
Field Name | Protobuf Type | Description |
---|---|---|
source_database_name |
string |
The source database where the table resides. |
namespace_name |
string |
The namespace or schema where the table is located. |
table_name |
string |
The name of the table. |
table_type |
string |
The type of the table (e.g., BASE TABLE, VIEW). |
owner_name |
string |
The owner of the table. |
columns |
repeated Column |
A list of Column messages providing information about each column in the table. |
primary_key |
optional PrimaryKey |
An optional PrimaryKey message, providing details about the primary key of the table. |
foreign_keys |
repeated ForeignKey |
A list of ForeignKey messages detailing the foreign keys associated with the table. |
exported_keys |
repeated ForeignKey |
A list of ForeignKey messages detailing the keys in other tables that reference this table. |
indexes |
repeated Index |
A list of Index messages detailing the indexes defined on the table. |
Column
The Column
message describes the attributes of a specific column within a table.
Field Name | Protobuf Type | Description |
---|---|---|
database_name |
string |
The database where the column’s table is located. |
namespace_name |
string |
The namespace or schema of the column’s table. |
table_name |
string |
The table to which this column belongs. |
column_name |
string |
The name of the column. |
type_name |
string |
The data type of the column. |
type_length |
optional int32 |
The length or size of the column type, if applicable. |
type_scale |
optional int32 |
The scale of the column type, if applicable. |
is_nullable |
bool |
Indicates if the column can contain null values. |
default_value_as_string |
optional string |
The default value of the column, represented as a string. |
column_index |
int32 |
The positional index of the column in the table. |
collation |
optional string |
The collation name for the column, if applicable. |
isHidden |
bool |
Indicates if the column is hidden. |
column_type |
ColumnType |
An enumeration indicating the type of column (e.g., REGULAR, CALCULATED, VERSION). |
PrimaryKey
The PrimaryKey
message provides details about a table’s primary key.
Field Name | Protobuf Type | Description |
---|---|---|
database_name |
string |
The database where the primary key’s table is located. |
namespace_name |
string |
The namespace or schema of the primary key’s table. |
table_name |
string |
The table with this primary key. |
columns |
repeated Column |
The columns that make up the primary key. |
ForeignKey
The ForeignKey
message details a foreign key relationship between tables.
Field Name | Protobuf Type | Description |
---|---|---|
referenced_database_name |
optional string |
The database of the referenced table. |
referenced_namespace_name |
optional string |
The namespace or schema of the referenced table. |
referenced_table_name |
string |
The table being referenced by the foreign key. |
referenced_columns |
repeated Column |
The columns in the referenced table. |
foreign_columns |
repeated Column |
The columns in the current table that make up the foreign key. |
update_rule |
int32 |
A numeric representation of the action taken when a referenced row is updated. |
delete_rule |
int32 |
A numeric representation of the action taken when a referenced row is deleted. |
key_name |
optional string |
An optional name for the foreign key constraint. |
Index
The Index
message provides details about an index defined on a table.
Field Name | Protobuf Type | Description |
---|---|---|
database_name |
string |
The database where the indexed table is located. |
namespace_name |
string |
The namespace or schema of the indexed table. |
table_name |
string |
The table on which the index is defined. |
unique |
bool |
Indicates if the index enforces unique values. |
index_name |
string |
The name of the index. |
columns |
repeated Column |
The columns that are part of the index. |
location |
int64 |
A numeric identifier representing the location or storage of the index. |
index_type |
int32 |
A numeric representation indicating the type or mechanism of the index. |
Graph
The Graph
message will be used to represent the metadata of a graph entity. As of now, the structure is empty but it is expected to encapsulate various attributes and details about graph entities in the future.
Field Name | Protobuf Type | Description |
---|---|---|
(To be added) | (To be added) | As of now, the Graph message is a placeholder and does not contain any fields. |
Document
The Document
message will be used to encapsulate the metadata related to a document entity. The structure is presently empty, but it’s expected to be expanded with attributes pertinent to documents in future updates.
Field Name | Protobuf Type | Description |
---|---|---|
(To be added) | (To be added) | At this moment, the Document message serves as a placeholder and does not possess any fields. |
Relational Frame Messages
Messages related to relational frames as used to represent the results from the relational model.
RelationalFrame
The RelationalFrame
message encapsulates the structure of a relational frame, which includes metadata about columns and rows of data within a relational table.
Field Name | Protobuf Type | Description |
---|---|---|
column_meta |
repeated ColumnMeta |
A collection of metadata about each column in the frame. This provides details such as index, nullability, length, precision, and type information. |
rows |
repeated Row |
The rows of data within the frame. Each row consists of a series of ProtoValue objects representing the values in the row. |
ColumnMeta
The ColumnMeta
message holds metadata related to a specific column within a relational table.
Field Name | Protobuf Type | Description |
---|---|---|
column_index |
int32 |
Index of the column within the table. |
is_nullable |
bool |
Indicates whether the column can contain null values. |
length |
int32 |
The length of the column values. |
column_label |
string |
Label associated with the column, if any. |
column_name |
string |
Name of the column. |
precision |
int32 |
Precision of the column, usually for numerical values. |
entity_name |
string |
Name of the entity that the column represents. |
schema_name |
string |
Name of the schema that the column belongs to. |
type_meta |
TypeMeta |
Metadata describing the type of the column. |
scale |
int32 |
Scale of the column, typically for numerical values. |
namespace |
string |
Namespace the column resides in. |
FieldMeta
The FieldMeta
message provides metadata for individual fields, which can be part of complex structures like arrays or structs.
Field Name | Protobuf Type | Description |
---|---|---|
field_index |
int32 |
Index of the field within its containing structure. |
is_nullable |
bool |
Indicates whether the field can contain null values. |
length |
int32 |
Length of the field’s value. |
field_name |
string |
Name of the field. |
precision |
int32 |
Precision of the field, usually for numerical values. |
type_meta |
TypeMeta |
Metadata describing the type of the field. |
scale |
int32 |
Scale of the field, typically for numerical values. |
TypeMeta
The TypeMeta
message is a comprehensive descriptor for the data types used within the system. This message not only defines simple data types but also accommodates complex types such as structures and arrays. Its flexibility allows it to describe a wide range of data types and data structures.
Field Name | Protobuf Type | Description |
---|---|---|
proto_value_type |
ProtoValue.ProtoValueType |
Represents the fundamental data type of the value. This can be any basic data type depending on the definitions within ProtoValue.ProtoValueType . |
struct_meta |
optional StructMeta |
If the proto_value_type indicates a structure, this field provides the metadata for that structure. Contains details about the fields within the structure. This field will be absent for non-structured types. |
array_meta |
optional ArrayMeta |
If the proto_value_type indicates an array, this field provides metadata about the type of elements within the array. This field will be absent for non-array types. |
StructMeta
The StructMeta
message provides metadata specific to structured types, giving details about the fields that make up the structure.
Field Name | Protobuf Type | Description |
---|---|---|
field_metas |
repeated FieldMeta |
A collection of metadata entries, one for each field within the structure. Each FieldMeta provides details like the field’s name, type, nullability, etc. |
ArrayMeta
The ArrayMeta
message provides metadata about array types, detailing the kind of elements they can hold.
Field Name | Protobuf Type | Description |
---|---|---|
element_type |
TypeMeta |
This field describes the type of elements contained within the array. It uses the TypeMeta message, meaning an array can contain any data type, including nested arrays or structures. |
Row
The Row
message represents a single row within a relational frame.
Field Name | Protobuf Type | Description |
---|---|---|
values |
repeated ProtoValue |
The values within the row, represented as a series of ProtoValue objects. |
Statement Messages
Messages related to statements in a query language and their results.
ExecuteUnparameterizedStatementRequest
Represents a request to execute a statement without any parameters.
Field Name | Protobuf Type | Description |
---|---|---|
language_name |
string |
Specifies the query language of the statement being executed. |
statement |
string |
The statement to be executed. |
fetch_size |
optional int32 |
(Optional) Number of rows to include into the response message of this call. More rows can be fetched afterwards. |
namespace_name |
optional string |
(Optional) The namespace under which the statement should be executed. |
If no fetch siz eis specified, a default value is used. If no namespace name is specified the namespace specified for the connection is used.
ExecuteUnparameterizedStatementBatchRequest
Encapsulates a batch of unparameterized statements to be executed.
Field Name | Protobuf Type | Description |
---|---|---|
statements |
repeated ExecuteUnparameterizedStatementRequest |
List of statements to be executed. |
PrepareStatementRequest
Represents a request to prepare a statement for execution.
Field Name | Protobuf Type | Description |
---|---|---|
language_name |
string |
Specifies the query language of the statement to be prepared. |
statement |
string |
The statement to be prepared. |
namespace_name |
optional string |
(Optional) The namespace under which the statement should be prepared. |
ExecuteIndexedStatementRequest
Represents a request to execute a previously prepared statement by its ID, using indexed parameters.
Field Name | Protobuf Type | Description |
---|---|---|
statementId |
int32 |
The unique identifier of the prepared statement to be executed. |
parameters |
IndexedParameters |
The indexed parameters to be used with the statement. |
fetch_size |
optional int32 |
(Optional) Number of rows to include into the response message of this call. More rows can be fetched afterwards. |
ExecuteIndexedStatementBatchRequest
Encapsulates a batch request to execute a prepared statement multiple times with different sets of indexed parameters.
Field Name | Protobuf Type | Description |
---|---|---|
statement_id |
int32 |
The unique identifier of the prepared statement to be executed. |
parameters |
repeated IndexedParameters |
List of sets of indexed parameters for multiple executions of the statement. |
ExecuteNamedStatementRequest
Represents a request to execute a previously prepared statement by its ID, using named parameters.
Field Name | Protobuf Type | Description |
---|---|---|
statementId |
int32 |
The unique identifier of the prepared statement to be executed. |
parameters |
NamedParameters |
The named parameters to be used with the statement. |
fetch_size |
optional int32 |
(Optional) Number of rows to include into the response message of this call. More rows can be fetched afterwards. |
IndexedParameters
Encapsulates indexed parameters for a prepared statement.
Field Name | Protobuf Type | Description |
---|---|---|
parameters |
repeated ProtoValue |
List of values to be used as parameters, indexed by their position in the list. |
NamedParameters
Encapsulates named parameters for a prepared statement.
Field Name | Protobuf Type | Description |
---|---|---|
parameters |
map<string, ProtoValue> |
Map of parameter names to their corresponding values. |
CloseStatementRequest
Represents a request to close a statement.
Field Name | Protobuf Type | Description |
---|---|---|
statement_id |
int32 |
The unique identifier of the statement to be closed. |
FetchRequest
Represents a request to fetch a batch of results for a previously executed statement.
Field Name | Protobuf Type | Description |
---|---|---|
statement_id |
int32 |
The unique identifier of the statement whose results are to be fetched. |
fetchSize |
optional int32 |
(Optional) Number of rows to retrieve in this batch. |
If no fetch size is specified a default value is used.
StatementResponse
Represents the response after executing a statement.
Field Name | Protobuf Type | Description |
---|---|---|
statement_id |
int32 |
The unique identifier of the executed statement. |
result |
optional StatementResult |
(Optional) The result of the executed statement. This could be a scalar value or a data frame, depending on the type of statement executed. |
StatementResult
Encapsulates the result of an executed statement.
Field Name | Protobuf Type | Description |
---|---|---|
scalar |
int64 |
A scalar result value, often used to represent the number of rows affected by an operation. |
frame |
optional Frame |
(Optional) A frame of data, which could be a relational table, a graph, or a set of documents. |
StatementBatchResponse
Represents the response after executing a batch of statements.
Field Name | Protobuf Type | Description |
---|---|---|
batch_id |
int32 |
The unique identifier of the executed batch. |
scalars |
repeated int64 |
List of scalar results for each statement in the batch. |
PreparedStatementSignature
Provides metadata about a prepared statement, including its parameters.
Field Name | Protobuf Type | Description |
---|---|---|
statement_id |
int32 |
The unique identifier of the prepared statement. |
parameter_metas |
repeated ParameterMeta |
Metadata about each parameter required by the statement. |
ParameterMeta
Provides metadata about a single parameter of a prepared statement.
Field Name | Protobuf Type | Description |
---|---|---|
precision |
int32 |
Precision of the parameter, typically used for numeric types. |
scale |
int32 |
Scale of the parameter, typically used for decimal types. |
type_name |
string |
The data type of the parameter. |
parameter_name |
optional string |
(Optional) The name of the placeholder specified for this value. |
name |
string |
The name of the parameter, if specified. |
CloseStatementResponse
Represents the response after closing a prepared statement. The message is currently empty, indicating a simple acknowledgment of the action.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply serves as an acknowledgment. |
Frame
Represents a frame of data that could be one of several types.
Field Name | Protobuf Type | Description |
---|---|---|
isLast |
bool |
Indicates if this frame is the last in a series of frames, useful for paginated results. |
result |
oneof result |
The actual data frame. It could be a relational table (RelationalFrame ), a graph (GraphFrame ), or a document (DocumentFrame ). |
This structure offers flexibility in representing different types of data responses, allowing for a more generic interface that can handle various data structures.
Transaction Messages
This section describes the messages involved in handling transactions.
CommitRequest
Represents a request to commit a transaction.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply serves as an instruction to commit. |
RollbackRequest
Represents a request to rollback a transaction.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply serves as an instruction to rollback. |
CommitResponse
Represents the response after attempting to commit a transaction.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply serves as an acknowledgment of the commit. |
RollbackResponse
Represents the response after attempting to rollback a transaction.
Field Name | Protobuf Type | Description |
---|---|---|
- | - | This message does not contain any fields. It simply serves as an acknowledgment of the rollback. |
Value Messages
Messages used to represent the types and values of the polypheny proprietary type system.
ProtoValue:
This message represents a single value supported by the DBMS. It acts as a container bundling the representation of a value together with it’s type.
Field Name | Protobuf Type | Description |
---|---|---|
type |
ProtoValueType |
An enumeration that signifies the data type of the value encapsulated in the value field. Identifies which field of the oneof is set. |
value |
oneof |
A special field type in Protocol Buffers with multiple potential fields, but only one can be set at any given time. This field is used to store the representation used to store the data of the type specified in the field type . It’s possible values are listed below. |
Available ProtoValueType
values:
Enum Name | Enum Value |
---|---|
UNSPECIFIED |
0 |
BOOLEAN |
1 |
TINYINT |
2 |
SMALLINT |
3 |
INTEGER |
4 |
BIGINT |
5 |
DECIMAL |
6 |
REAL |
7 |
FLOAT |
8 |
DOUBLE |
9 |
DATE |
10 |
TIME |
11 |
TIME_WITH_LOCAL_TIME_ZONE |
12 |
TIMESTAMP |
13 |
TIMESTAMP_WITH_LOCAL_TIME_ZONE |
14 |
INTERVAL_SECOND |
15 |
INTERVAL_MINUTE_SECOND |
16 |
INTERVAL_MINUTE |
17 |
INTERVAL_HOUR_SECOND |
18 |
INTERVAL_HOUR_MINUTE |
19 |
INTERVAL_HOUR |
20 |
INTERVAL_DAY_SECOND |
21 |
INTERVAL_DAY_MINUTE |
22 |
INTERVAL_DAY_HOUR |
23 |
INTERVAL_DAY |
24 |
INTERVAL_MONTH |
25 |
INTERVAL_YEAR_MONTH |
26 |
INTERVAL_YEAR |
27 |
CHAR |
28 |
VARCHAR |
29 |
BINARY |
30 |
VARBINARY |
31 |
NULL |
32 |
ARRAY |
33 |
MAP |
34 |
DOCUMENT |
35 |
GRAPH |
36 |
NODE |
37 |
EDGE |
38 |
PATH |
39 |
IMAGE |
40 |
VIDEO |
41 |
AUDIO |
42 |
FILE |
43 |
DISTINCT |
44 |
STRUCTURED |
45 |
ROW |
46 |
OTHER |
47 |
CURSOR |
48 |
COLUMN_LIST |
49 |
DYNAMIC_STAR |
50 |
GEOMETRY |
51 |
SYMBOL |
52 |
JSON |
53 |
MULTISET |
54 |
ANY |
55 |
USER_DEFINED_TYPE |
56 |
ROW_ID |
57 |
Values available in the oneof value
:
Value Name | Protobuf Type | Description |
---|---|---|
boolean |
ProtoBoolean |
Contains boolean values. |
integer |
ProtoInteger |
Contains integer values. |
long |
ProtoLong |
Contains long integer values. |
binary |
ProtoBinary |
Contains binary data. |
date |
ProtoDate |
Represents date values. |
double |
ProtoDouble |
Contains double-precision floating point numbers. |
float |
ProtoFloat |
Contains floating point numbers. |
string |
ProtoString |
Contains string data. |
time |
ProtoTime |
Represents time values. |
time_stamp |
ProtoTimeStamp |
Contains timestamp values. |
null |
ProtoNull |
Represents null values. |
big_decimal |
ProtoBigDecimal |
Contains decimal numbers with arbitrary precision. |
interval |
ProtoInterval |
Represents interval values. |
user_defined_type |
ProtoUserDefinedType |
Contains user-defined type values. |
file |
ProtoFile |
Represents file data. |
list |
ProtoList |
Contains a list of values. |
map |
ProtoMap |
Represents a map with key-value pairs. |
document |
ProtoDocument |
Contains structured document entries. |
node |
ProtoNode |
Represents a node in a graph. |
edge |
ProtoEdge |
Represents an edge in a graph. |
path |
ProtoPath |
Represents a path in a graph structure. |
graph |
ProtoGraph |
Represents a graph structure. |
row_id |
ProtoRowId |
Contains unique row identifier values. |
This structure provides a versatile way to store and transmit various types of values. The use of the oneof
keyword ensures that only one datatype is set at a given time.
ProtoBoolean
Represents a boolean value.
Field Name | Protobuf Type | Description |
---|---|---|
boolean |
bool |
A boolean value. |
ProtoInteger
Represents a 32-bit integer value.
Field Name | Protobuf Type | Description |
---|---|---|
integer |
int32 |
A 32-bit integer value. |
ProtoLong
Represents a 64-bit long integer value.
Field Name | Protobuf Type | Description |
---|---|---|
long |
int64 |
A 64-bit long integer value. |
ProtoBinary
Represents a binary data.
Field Name | Protobuf Type | Description |
---|---|---|
binary |
bytes |
Binary data. |
ProtoDate
Represents a date as a 64-bit integer.
Field Name | Protobuf Type | Description |
---|---|---|
date |
int64 |
Milliseconds since epoch till start of the specified day. |
ProtoDouble
Represents a double precision floating point number.
Field Name | Protobuf Type | Description |
---|---|---|
double |
double |
A double precision floating point number. |
ProtoFloat
Represents a single precision floating point number.
Field Name | Protobuf Type | Description |
---|---|---|
float |
float |
A single precision floating point number. |
ProtoNull
Represents a null value. This message doesn’t contain any fields.
ProtoString
Represents a string value.
Field Name | Protobuf Type | Description |
---|---|---|
string |
string |
A string value. |
ProtoTime
Represents a time value with a specified unit of time.
Field Name | Protobuf Type | Description |
---|---|---|
value |
int32 |
The value of the time, based on the unit provided. |
time_unit |
TimeUnit |
The unit of time for the specified value. See TimeUnit enum for possible values. |
TimeUnit
Enumerates possible units of time.
Value Name | Enum Value | Description |
---|---|---|
UNSPECIFIED |
0 | Default, unspecified value. |
YEAR |
1 | Represents a year. |
MONTH |
2 | Represents a month. |
DAY |
3 | Represents a day. |
HOUR |
4 | Represents an hour. |
MINUTE |
5 | Represents a minute. |
SECOND |
6 | Represents a second. |
QUARTER |
7 | Represents a quarter. |
ISOYEAR |
8 | Represents an ISO year. |
WEEK |
9 | Represents a week. |
MILLISECOND |
10 | Represents a millisecond. |
MICROSECOND |
11 | Represents a microsecond. |
NANOSECOND |
12 | Represents a nanosecond. |
DOW |
13 | Day of the week. |
ISODOW |
14 | ISO day of the week. |
DOY |
15 | Day of the year. |
EPOCH |
16 | Epoch time unit. |
DECADE |
17 | Represents a decade. |
CENTURY |
18 | Represents a century. |
MILLENNIUM |
19 | Represents a millennium. |
ProtoTimeStamp
Represents a timestamp value.
Field Name | Protobuf Type | Description |
---|---|---|
time_stamp |
int64 |
The timestamp value in milliseconds since epoch. |
ProtoBigDecimal
Represents a BigDecimal value with specified precision and scale.
Field Name | Protobuf Type | Description |
---|---|---|
scale |
uint32 |
The scale of the BigDecimal. |
precision |
uint32 |
The precision of the BigDecimal. |
unscaled_value |
bytes |
The unscaled value of the BigDecimal. |
ProtoStructured
Represents a structured data type comprising multiple ProtoValue fields.
Field Name | Protobuf Type | Description |
---|---|---|
fields |
repeated ProtoValue |
The list of ProtoValue fields within the structured type. |
ProtoInterval
Represents an interval value using a BigDecimal.
Field Name | Protobuf Type | Description |
---|---|---|
value |
ProtoBigDecimal |
The BigDecimal value of the interval. |
ProtoUserDefinedType
Defines a user-defined type with a specified template and value.
Field Name | Protobuf Type | Description |
---|---|---|
template |
map<string, ProtoValue.ProtoValueType> |
The template describing the data type. |
value |
map<string, ProtoValue> |
The values corresponding to the user-defined type. |
ProtoFile
Represents a file in byte format.
Field Name | Protobuf Type | Description |
---|---|---|
bytes |
bytes |
The file in bytes. |
ProtoList
Represents a list of ProtoValue items.
Field Name | Protobuf Type | Description |
---|---|---|
values |
repeated ProtoValue |
The list of ProtoValue items. |
ProtoMap
Represents a map of ProtoEntry items.
Field Name | Protobuf Type | Description |
---|---|---|
entries |
repeated ProtoEntry |
The list of ProtoEntry items forming the map. |
ProtoEntry
Defines a key-value pair using ProtoValue for both key and value.
Field Name | Protobuf Type | Description |
---|---|---|
key |
ProtoValue |
The key of the entry. |
value |
ProtoValue |
The value of the entry. |
ProtoDocument
Represents a document consisting of multiple ProtoEntry items.
Field Name | Protobuf Type | Description |
---|---|---|
entries |
repeated ProtoEntry |
The list of ProtoEntry items forming the document. |
ProtoEdge
Represents an edge in a graph.
Field Name | Protobuf Type | Description |
---|---|---|
graph_property_holder |
ProtoGraphPropertyHolder |
Holds graph properties for the edge. |
source |
ProtoString |
Source node identifier. |
target |
ProtoString |
Target node identifier. |
edge_direction |
EdgeDirection (enum) |
Specifies the direction of the edge. |
ProtoNode
Represents a node in a graph.
Field Name | Protobuf Type | Description |
---|---|---|
graph_property_holder |
ProtoGraphPropertyHolder |
Holds graph properties for the node. |
ProtoGraph
Represents a graph entity with nodes and edges.
Field Name | Protobuf Type | Description |
---|---|---|
id |
ProtoString |
Unique identifier for the graph. |
variable_name |
ProtoString |
Variable name associated with the graph. |
nodes |
ProtoMap |
Collection of nodes in the graph. |
edges |
ProtoMap |
Collection of edges in the graph. |
ProtoPath
Represents a path through nodes and edges in a graph.
Field Name | Protobuf Type | Description |
---|---|---|
nodes |
ProtoList |
Nodes present in the path. |
edges |
ProtoList |
Edges present in the path. |
names |
ProtoList |
Names associated with the path. |
paths |
repeated ProtoGraphPropertyHolder |
Holds graph properties for the paths. |
segments |
repeated ProtoSegment |
Segments that make up the path. |
ProtoSegment
Represents a segment within a path in a graph.
Field Name | Protobuf Type | Description |
---|---|---|
id |
ProtoString |
Unique identifier for the segment. |
variable_name |
ProtoString |
Variable name associated with the segment. |
source_id |
ProtoString |
Source node identifier for the segment. |
edge_id |
ProtoString |
Edge identifier for the segment. |
target_id |
ProtoString |
Target node identifier for the segment. |
source |
ProtoNode |
Source node of the segment. |
edge |
ProtoEdge |
Edge of the segment. |
target |
ProtoNode |
Target node of the segment. |
is_ref |
bool |
Indicates if the segment is a reference. |
edge_direction |
ProtoEdge.EdgeDirection (enum) |
Specifies the direction of the edge in the segment. |
ProtoGraphPropertyHolder
Holds properties and labels for graph elements.
Field Name | Protobuf Type | Description |
---|---|---|
id |
ProtoString |
Unique identifier for the holder. |
variable_name |
ProtoString |
Variable name associated with the holder. |
properties |
ProtoMap |
Dictionary of properties. |
labels |
ProtoList |
List of labels associated with the holder. |
ProtoRowId
Represents the row identifier.
Field Name | Protobuf Type | Description |
---|---|---|
row_id |
string |
The row identifier. |
Metadata
The ProtoInterface uses the function of gRPC to send additional values as part of the header together with the remote procedure calls. This is used from the client to the server to send the clientUUID with each call, so that calls can be linked to a client. On the way back from the server to the client the header is used in case of an error to transmit additional info. For this the following two context keys are used which must be used to add the respective data to the header or to read it.
ClientUUID
Key name: clientUUID
Type: Metadata.ASCII_STRING_MARSHALLER
A custom ClientInterceptor implemenation can be used to add the clientUUID to a call. An example of such an implementation is provided below:
public class ClientMetaInterceptor implements ClientInterceptor {
private final String clientUUID;
public ClientMetaInterceptor(String clientUUID) {
this.clientUUID = clientUUID;
}
@Override
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {
return new ForwardingClientCall.SimpleForwardingClientCall<ReqT, RespT>(next.newCall(method, callOptions)) {
@Override
public void start(final Listener<RespT> responseListener, final Metadata headers) {
headers.put(Metadata.Key.of("clientUUID", Metadata.ASCII_STRING_MARSHALLER), clientUUID);
super.start(responseListener, headers);
}
};
}
}
Error Details
This metadata key will automatically be generated by gRPC. To get it use the following java code. ErrorDetails
is the java object created by the protobuf compiler from the message that contains the additional error information.
public static final Metadata.Key<ErrorDetails> ERROR_DETAILS_KEY = ProtoUtils.keyForProto( ErrorDetails.getDefaultInstance() );
The key generated above can be used to retrieve the data from the gRPC StatusRuntimeException as follows:
try {
//execute a gRPC call that might fail...
return blockingStub.someCallThatMightFail(...)
} catch ( StatusRuntimeException e ) {
ErrorDetails errorDetails = Status.trailersFromThrowable( e ).get( ERROR_DETAILS_KEY );
}