The definition files for the Polypheny Prism API, a multi-model, multi-language query interface.
The Prism Interface uses Protocol Buffer (protobuf) messages to define it’s services. To keep things clear and well-organized, the message definitions are grouped into several files. This simplifies finding specific messages, based on what they do or what part of the system they relate to. The files itself are grouped in categories. Those are expressed in the file names. Two kinds of categories exist:
Request Response Category
The category type contains messages that are used in communication adhering to a request, response scheme. Here the client sends a request message to the server upon which the server sends back a response message.
-
Requests File: This file contains all messages that are sent from the client to the server. The file name adheres to the following pattern:
[category]_requests.proto. For example, all the request messages for making or managing connections would be inconnection_requests.proto. -
Responses File: This is the partner file to Requests. It contains all the messages the server sends back to the client. Following the naming pattern, these files end with
_responses.proto. The response messages related to connections would thus be inconnection_responses.proto.
Other Category
The other kind of category contains messages that are not directly used as a response to a request. An example therefore would be messages representing a specific datatype supported by the DBMS.
This category always contains only one file. The filename adheres to the pattern [category].proto.
Doc Generator
Detailed Documentation of the proto files their messages and enums and much more can automatically be created using the doc generator included in this repo. For this to work, the protobuf compiler must be installed. It’s current version can be downloaded here.
To run the doc generator, execute the file generator.py in the doc-generator directory.
This creates a directory called docs containing the generated documentation.
Generate Python files
Generate the Python code:
python -m grpc_tools.protoc -I . --python_out . org/polypheny/prism/*.proto
Remote Procedure Calls
dbms_version_request
- Request message:
DbmsVersionRequestdbms_version_request - Response message:
DbmsVersionResponsedbms_version_response
default_namespace_request
- Request message:
DefaultNamespaceRequestdefault_namespace_request - Response message:
DefaultNamespaceResponsedefault_namespace_response
table_types_request
- Request message:
TableTypesRequesttable_types_request - Response message:
TableTypesResponsetable_types_response
types_request
- Request message:
TypesRequesttypes_request - Response message:
TypesResponsetypes_response
procedures_request
- Request message:
ProceduresRequestprocedures_request - Response message:
ProceduresResponseprocedures_response
functions_request
- Request message:
FunctionsRequestfunctions_request - Response message:
FunctionsResponsefunctions_response
namespaces_request
- Request message:
NamespacesRequestnamespaces_request - Response message:
NamespacesResponsenamespaces_response
entities_request
- Request message:
EntitiesRequestentities_request - Response message:
EntitiesResponseentities_response
sql_string_functions_request
- Request message:
SqlStringFunctionsRequestsql_string_functions_request - Response message:
MetaStringResponsesql_string_functions_response
sql_system_functions_request
- Request message:
SqlSystemFunctionsRequestsql_system_functions_request - Response message:
MetaStringResponsesql_system_functions_response
sql_time_date_functions_request
- Request message:
SqlTimeDateFunctionsRequestsql_time_date_functions_request - Response message:
MetaStringResponsesql_time_date_functions_response
sql_numeric_functions_request
- Request message:
SqlNumericFunctionsRequestsql_numeric_functions_request - Response message:
MetaStringResponsesql_numeric_functions_response
sql_keywords_request
- Request message:
SqlKeywordsRequestsql_keywords_request - Response message:
MetaStringResponsesql_keywords_response
connection_request
- Request message:
ConnectionRequestconnection_request - Response message:
ConnectionResponseconnection_response
connection_check_request
- Request message:
ConnectionCheckRequestconnection_check_request - Response message:
ConnectionCheckResponseconnection_check_response
disconnect_request
- Request message:
DisconnectRequestdisconnect_request - Response message:
DisconnectResponsedisconnect_response
client_info_properties_request
- Request message:
ClientInfoPropertiesRequestclient_info_properties_request - Response message:
ClientInfoPropertiesclient_info_properties_response
set_client_info_properties_request
- Request message:
ClientInfoPropertiesset_client_info_properties_request - Response message:
ClientInfoPropertiesResponseset_client_info_properties_response
close_statement_request
- Request message:
CloseStatementRequestclose_statement_request - Response message:
CloseStatementResponseclose_statement_response
commit_request
- Request message:
CommitRequestcommit_request - Response message:
CommitResponsecommit_response
rollback_request
- Request message:
RollbackRequestrollback_request - Response message:
RollbackResponserollback_response
connection_properties_update_request
- Request message:
ConnectionPropertiesUpdateRequestconnection_properties_update_request - Response message:
ConnectionPropertiesUpdateResponseconnection_properties_update_response
close_result_request
- Request message:
CloseResultRequestclose_result_request - Response message:
CloseResultResponseclose_result_response
error_response
- Response message:
ErrorResponseerror_response
statement_response
- Response message:
StatementResponsestatement_response
statement_batch_response
- Response message:
StatementBatchResponsestatement_batch_response
statement_result
- Response message:
StatementResultstatement_result
prepared_statement_signature
- Response message:
PreparedStatementSignatureprepared_statement_signature
frame
- Response message:
Frameframe
execute_unparameterized_statement_request
- Request message:
ExecuteUnparameterizedStatementRequestexecute_unparameterized_statement_request
execute_unparameterized_statement_batch_request
- Request message:
ExecuteUnparameterizedStatementBatchRequestexecute_unparameterized_statement_batch_request
prepare_indexed_statement_request
- Request message:
PrepareStatementRequestprepare_indexed_statement_request
execute_indexed_statement_request
- Request message:
ExecuteIndexedStatementRequestexecute_indexed_statement_request
execute_indexed_statement_batch_request
- Request message:
ExecuteIndexedStatementBatchRequestexecute_indexed_statement_batch_request
prepare_named_statement_request
- Request message:
PrepareStatementRequestprepare_named_statement_request
execute_named_statement_request
- Request message:
ExecuteNamedStatementRequestexecute_named_statement_request
fetch_request
- Request message:
FetchRequestfetch_request
Message Categories
Below the available categories of messages and the explicit names of their .proto files are listed below.
namespace_meta_requests
Messages related to describing the metadata of namespaces and their entities.
- Proto File:
namespace_meta_requests.proto
transaction_requests
Messages concerning the handling of transactions.
- Proto File:
transaction_requests.proto
namespace_meta_responses
Messages related to describing the metadata of namespaces and their entities.
- Proto File:
namespace_meta_responses.proto
meta_responses
Messages that are used for querying general metadata.
- Proto File:
meta_responses.proto
protointerface
This file contains basic wrapper messages used for the communication between client and server. Examples for such messages are a response and a request wrapper that are used to wrap a specific response or request message. Further messages for error responses are included.
- Proto File:
protointerface.proto
meta_requests
Messages that are used for querying general metadata.
- Proto File:
meta_requests.proto
connection_requests
Messages related to establishing and maintaining a connection.
- Proto File:
connection_requests.proto
statement_responses
Messages related to statements in a query language and their results.
- Proto File:
statement_responses.proto
error
Messages used to send errors to the client.
- Proto File:
error.proto
relational_frame
Messages related to relational frames as used to represent the results form the relational model.
- Proto File:
relational_frame.proto
document_frame
Messages pertaining to document frames as used to represent results from the document model.
- Proto File:
document_frame.proto
graph_frame
Messages related to graph frames as used to represent results form the labeled property graph model.
- Proto File:
graph_frame.proto
statement_requests
Messages related to statements in a query language and their results.
- Proto File:
statement_requests.proto
transaction_responses
Messages concerning the handling of transactions.
- Proto File:
transaction_responses.proto
value
ProtoValue represents a single value supported by the DBMS. It contains a wide range of fields each corresponding to one supported data type. Only one field can be set at a time.
- Proto File:
value.proto
connection_responses
Messages related to establishing and maintaining a connection.
- Proto File:
connection_responses.proto
Protocol Messages
This section provides a comprehensive breakdown of protocol messages used in the communication between clients and the server. The messages are categorized by the files containing them. Starting from connection-related messages and extending to transaction handling and beyond, the documentation delves into the purpose, structure, and usage of each message.
org/polypheny/prism/namespace_meta_requests.proto
The NamespacesRequest message allows querying for namespaces based on specific patterns in their names as well as their types.
optionalstringnamespace_pattern: 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_”.optionalstringnamespace_type: 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.
The EntitiesRequest message is meant for querying details about entities within a specific namespace, possibly using a pattern to narrow down the results.
stringnamespace_name: The name of the namespace within which entities are to be searched.optionalstringentity_pattern: 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.
org/polypheny/prism/transaction_requests.proto
Represents a request to commit a transaction. This message is used to signal the system to finalize all changes made during the transaction, making them permanent and visible to other transactions.
Represents a request to rollback a transaction. This message is used to signal the system to undo all changes made during the transaction, returning the state of the database to what it was before the transaction began.
org/polypheny/prism/namespace_meta_responses.proto
The NamespacesResponse message delivers a list of namespaces based on the provided criteria in the NamespacesRequest.
repeatedNamespacenamespaces: A list of Namespace messages containing information about each namespace that matches the search criteria.
The EntitiesResponse message returns a list of entities that match the provided criteria from the EntitiesRequest.
repeatedEntityentities: A list of Entity messages containing information about each entity within the requested namespace.
The Namespace message provides detailed information about a specific namespace.
stringnamespace_name: The name of the namespace.boolis_case_sensitive: Indicates if the namespace name is case sensitive.optionalstringnamespace_type: An optional field providing the type of the namespace, if applicable.
The Entity message acts as a generic wrapper for different of entities metadata messages. Only one of the entities metadata fields can be set for a given message instance. Different entity metadata messages are used to represent the metadata of different entity types. The available entity metadata messages are, Table for relational entities, Graph for labeled property graph entities and Document for entities in the document model.
Tabletable: An entity of type Table.Graphgraph: An entity of type Graph.Documentdocument: An entity of type Document.
The Table message provides comprehensive information about a specific table within a database.
stringnamespace_name: The namespace or schema where the table is located.stringtable_name: The name of the table.stringtable_type: The type of the table (e.g., BASE TABLE, VIEW).repeatedColumncolumns: A list of Column messages providing information about each column in the table.optionalPrimaryKeyprimary_key: An optional PrimaryKey message, providing details about the primary key of the table.repeatedForeignKeyforeign_keys: A list of ForeignKey messages detailing the foreign keys associated with the table.repeatedForeignKeyexported_keys: A list of ForeignKey messages detailing the keys in other tables that reference this table.repeatedIndexindexes: A list of Index messages detailing the indexes defined on the table.
The Column message describes the attributes of a specific column within a table.
stringnamespace_name: The namespace or schema of the column’s table.stringtable_name: The table to which this column belongs.stringcolumn_name: The name of the column.stringtype_name: The data type of the column.optionalint32type_length: The length or size of the column type, if applicable.optionalint32type_scale: The scale of the column type, if applicable.boolis_nullable: Indicates if the column can contain null values.optionalstringdefault_value_as_string: The default value of the column, represented as a string.int32column_index: The positional index of the column in the table.optionalstringcollation: The collation name for the column, if applicable.boolis_hidden: Indicates if the column is hidden.ColumnTypecolumn_type: An enumeration indicating the type of column (e.g., REGULAR, CALCULATED, VERSION).
The PrimaryKey message provides details about a table’s primary key.
stringdatabase_name: The database where the primary key’s table is located.stringnamespace_name: The namespace or schema of the primary key’s table.stringtable_name: The table with this primary key.repeatedColumncolumns: The columns that make up the primary key.
The ForeignKey message details a foreign key relationship between tables, providing information about the linkage between a table’s column(s) and the column(s) of another table it references. This relationship is crucial for maintaining referential integrity within the database.
optionalstringreferenced_namespace_name: The namespace or schema of the referenced table. This indicates the specific namespace or schema within the database where the referenced table resides.stringreferenced_table_name: The table being referenced by the foreign key. This field identifies the target table that contains the referenced columns.repeatedColumnreferenced_columns: The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.repeatedColumnforeign_columns: The columns in the current table that make up the foreign key. These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.int32update_rule: A numeric representation of the action taken when a referenced row is updated. This rule determines how changes to the referenced columns affect the rows that hold the foreign key.int32delete_rule: A numeric representation of the action taken when a referenced row is deleted. Similar to the update rule, this defines the behavior of the foreign key relationship when rows in the referenced table are deleted.optionalstringkey_name: An optional name for the foreign key constraint. This allows for the naming of the foreign key constraint for easier reference and management within the database.
The Index message provides details about an index defined on a table. Indexes are crucial for improving the performance of data retrieval operations by effectively organizing the data stored in a database table. This message includes information about the index’s database, namespace (or schema), table, uniqueness, name, columns involved, physical location, and type.
stringnamespace_name: The namespace or schema of the indexed table. This indicates the specific namespace or schema within the database where the indexed table resides.stringtable_name: The table on which the index is defined. This field identifies the specific table within the namespace that the index belongs to.boolunique: Indicates if the index enforces unique values. A boolean value where true means the index ensures that all values in the index are unique.stringindex_name: The name of the index. This allows for the naming of the index for easier reference and management within the database.repeatedColumncolumns: The columns that are part of the index. This repeated field lists all the columns included in the index, defining the order and structure of the index.int64location: A numeric identifier representing the location or storage of the index. This field is used to identify where the index is physically stored within the database system, if applicable.int32index_type: A numeric representation indicating the type or mechanism of the index. This could represent different types of indexing strategies used by the database system, such as B-tree, hash, etc.
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. As of now, the Graph message is a placeholder and does not contain any fields.
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. At this moment, the Document message serves as a placeholder and does not possess any fields.
org/polypheny/prism/meta_responses.proto
The DbmsVersionResponse message relays details about the version and name of the database management system (DBMS) in response to a DbmsVersionRequest.
stringdbms_name: The name of the database management system.stringversion_name: The full version name of the DBMS.int32major_version: The major version number of the DBMS.int32minor_version: The minor version number of the DBMS.
The default namespace
stringdefault_namespace
The TableTypesResponse message conveys information about the various table types present in the system.
repeatedTableTypetable_types: A list of TableType objects detailing each table type present in the system.
The TableType message delineates the nature or category of a table.
stringtable_type: A descriptor denoting the type or category of a table, such as “BASE TABLE”, “VIEW”, or any other classification present in the system.
The TypesResponse message provides a list of native data types supported by the system.
repeatedTypetypes: A list of Type objects detailing each native data type supported by the system.
The Type message describes the characteristics and specifications of a particular native data type.
stringtype_name: The name of the data type.int32precision: The number of total digits for numeric types or the maximum length for string and binary types.optionalstringliteral_prefix: The character(s) used to prefix a literal of this type (e.g., a single quote for strings).optionalstringliteral_suffix: The character(s) used to suffix a literal of this type.boolis_case_sensitive: Indicates whether the data type is case sensitive.int32is_searchable: Indicates how the data type can be used in WHERE clauses.boolis_auto_increment: Indicates whether columns of this data type auto-increment.int32min_scale: The minimum scale for this data type.int32max_scale: The maximum scale for this data type.int32radix: The base number used in representing numeric values.
The UserDefinedType message encapsulates details about a specific user-defined data type.
stringtype_name: The name of the user-defined data type.repeatedValueMetavalue_metas: A list of ValueMeta objects detailing the metadata associated with fields of this data type.
The ValueMeta message offers insights into the metadata of a specific field related to a user-defined type.
stringvalue_name: The name or descriptor of the value’s metadata.
The MetaStringResponse message encapsulates a string that represents some specific metadata information.
stringstring: A string representing the requested metadata information.
The ProceduresResponse message provides a list of stored procedures available within the system.
repeatedProcedureprocedures: A list of Procedure objects detailing each stored procedure present in the system.
The Procedure message encapsulates details about a specific stored procedure in the system.
stringtrivial_name: The simple name of the procedure.stringinput_parameters: The input parameters required by the procedure.stringdescription: A brief description or purpose of the procedure.ReturnTypereturn_type: Enum indicating the return type of the procedure. It can be unspecified, unknown, no result, or result.stringunique_name: A unique name or identifier for the procedure.
The ClientInfoProperties message encapsulates key-value pairs representing client-specific information.
PropertiesEntryproperties: A mapping of property names to their corresponding values, providing insights or settings related to the client.
The ClientInfoPropertyResponse message provides metadata about various client-specific properties.
ClientInfoPropertyMetaResponse
The ClientInfoPropertyMetaResponse message provides metadata about various client-specific properties.
repeatedClientInfoPropertyMetaclient_info_property_metas: A list of ClientInfoPropertyMeta objects detailing metadata for each client-specific property.
The ClientInfoPropertyMeta message encapsulates metadata about a specific client property.
stringkey: The unique key identifier for the client property.stringdefault_value: The default value of the property.int32maxlength: Maximum length of the property value. Useful for validation purposes.stringdescription: A brief description explaining the purpose or usage of the property.
The FunctionsResponse message provides a list of functions available within the system.
repeatedFunctionfunctions: A list of Function objects detailing each function present in the system.
The Function message encapsulates details about a specific function in the system.
stringname: The name of the function.stringsyntax: The expected syntax for using the function.stringfunction_category: The category to which the function belongs. Helps in categorizing functions for better management and understanding.boolis_table_function: Indicates whether the function is a table function. If true, it means the function returns a table; otherwise, it returns a scalar value.
org/polypheny/prism/protointerface.proto
Wrapper message wrapping a specific request message to be sent to the server.
uint64id: The id of the request. Must be strictly greater than 0.DbmsVersionRequestdbms_version_requestDefaultNamespaceRequestdefault_namespace_requestTableTypesRequesttable_types_requestTypesRequesttypes_requestProceduresRequestprocedures_requestFunctionsRequestfunctions_requestNamespacesRequestnamespaces_requestEntitiesRequestentities_requestSqlStringFunctionsRequestsql_string_functions_requestSqlSystemFunctionsRequestsql_system_functions_requestSqlTimeDateFunctionsRequestsql_time_date_functions_requestSqlNumericFunctionsRequestsql_numeric_functions_requestSqlKeywordsRequestsql_keywords_requestConnectionRequestconnection_requestConnectionCheckRequestconnection_check_requestDisconnectRequestdisconnect_requestClientInfoPropertiesRequestclient_info_properties_requestClientInfoPropertiesset_client_info_properties_requestExecuteUnparameterizedStatementRequestexecute_unparameterized_statement_requestExecuteUnparameterizedStatementBatchRequestexecute_unparameterized_statement_batch_requestPrepareStatementRequestprepare_indexed_statement_requestExecuteIndexedStatementRequestexecute_indexed_statement_requestExecuteIndexedStatementBatchRequestexecute_indexed_statement_batch_requestPrepareStatementRequestprepare_named_statement_requestExecuteNamedStatementRequestexecute_named_statement_requestFetchRequestfetch_requestCloseStatementRequestclose_statement_requestCommitRequestcommit_requestRollbackRequestrollback_requestConnectionPropertiesUpdateRequestconnection_properties_update_requestCloseResultRequestclose_result_request
Response message sent to the client by the server in case of an error.
stringmessage: Human readable error message
Wrapper message wrapping a specific response message to be sent to the client.
uint64id: The id of the request this response is related to.boollast: If a request triggers a stream of responses from the server, this flag represents a response to be the end of the stream.ErrorResponseerror_responseDbmsVersionResponsedbms_version_responseDefaultNamespaceResponsedefault_namespace_responseTableTypesResponsetable_types_responseTypesResponsetypes_responseProceduresResponseprocedures_responseFunctionsResponsefunctions_responseNamespacesResponsenamespaces_responseEntitiesResponseentities_responseMetaStringResponsesql_string_functions_responseMetaStringResponsesql_system_functions_responseMetaStringResponsesql_time_date_functions_responseMetaStringResponsesql_numeric_functions_responseMetaStringResponsesql_keywords_responseConnectionResponseconnection_responseConnectionCheckResponseconnection_check_responseDisconnectResponsedisconnect_responseClientInfoPropertiesclient_info_properties_responseClientInfoPropertiesResponseset_client_info_properties_responseStatementResponsestatement_responseStatementBatchResponsestatement_batch_responseStatementResultstatement_resultPreparedStatementSignatureprepared_statement_signatureFrameframeCloseStatementResponseclose_statement_responseCommitResponsecommit_responseRollbackResponserollback_responseConnectionPropertiesUpdateResponseconnection_properties_update_responseCloseResultResponseclose_result_response
org/polypheny/prism/meta_requests.proto
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. This message does not contain any fields. It simply acts as an indicator to prompt the server for DbmsVersionResponse.
Request the default namespace
The TableTypesRequest message is designed to request information about the different types of tables that are supported or recognized by the DBMS. 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.
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. This message does not contain any fields. It simply prompts the server to return a list of supported data types in a TypesResponse.
The SqlStringFunctionsRequest message is used to solicit information about the string functions supported by the SQL implementation of the DBMS. This message is field less and prompts the server to return details of the available string functions in an SqlStringFunctionsResponse.
The SqlSystemFunctionsRequest message aims to retrieve the list of system functions provided by the SQL implementation of the DBMS. Without any fields, this message indicates the server to respond with details about the system functions in an SqlSystemFunctionsResponse.
The SqlTimeDateFunctionsRequest message is dispatched to fetch a list of time and date functions supported by the SQL implementation of the DBMS. This message, being field less, acts as a request for the server to list time and date functions in a SqlTimeDateFunctionsResponse.
The SqlNumericFunctionsRequest message endeavors to obtain details about the numeric functions provided by the SQL implementation of the DBMS. This message, devoid of fields, prompts the server to respond with information about numeric functions in an SqlNumericFunctionsResponse.
The SqlKeywordsRequest message is designed to request a list of reserved keywords utilized by the SQL implementation of the DBMS. With no fields, this message acts as an indicator for the server to provide the list of SQL keywords in an SqlKeywordsResponse.
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.
stringlanguage: The query language for which the procedures are defined. This determines the set of procedures that will be retrieved.optionalstringprocedure_name_pattern: 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.
The ClientInfoPropertiesRequest message facilitates the acquisition of client information properties stored in the database. These properties can offer additional context about the connected client. 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.
The FunctionsRequest message is wielded to obtain a list of functions from the database based on the specified query language and function category.
stringquery_language: Defines the query language for which the functions are sought. This field determines the range of functions that will be retrieved.stringfunction_category: 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.
org/polypheny/prism/connection_requests.proto
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.
int32major_api_version: Specifies the major version of the API that the client is using.int32minor_api_version: Represents the minor version of the API in use.optionalstringusername: (Optional) The username for authentication when establishing the connection.optionalstringpassword: (Optional) The password associated with the specified username for authentication purposes.optionalConnectionPropertiesconnection_properties: (Optional) Contains specific properties related to the connection, such as timeout settings or database preferences.
ConnectionPropertiesUpdateRequest
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.
ConnectionPropertiesconnection_properties: Specifies the new settings for the connection. Contains properties such as transaction auto-commit status and target namespace preference.
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.
optionalboolis_auto_commit: (Optional) Indicates whether transactions are automatically committed upon execution or require manual commitment.optionalstringnamespace_name: (Optional) Specifies the preferred namespace within the database or system that the client wants to interact with.
The ConnectionCheckRequest message in combination with the corresponding remote 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. This message does not contain any fields. It simply acts as an indicator to prompt the server for a ConnectionCheckResponse.
The ConnectionCheckRequest message in combination with the corresponding remote 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.
org/polypheny/prism/statement_responses.proto
Response of the server on the request of a client to close the result set of a specific statement. This message has no fields. It merely serves as an acknowledgement.
Represents the response after executing a statement. This message contains the identifier of the executed statement and optionally, the result of the execution. The result can vary based on the type of statement executed, ranging from scalar values to complex data frames.
int32statement_id: The unique identifier of the executed statement.optionalStatementResultresult: (Optional) The result of the executed statement. This could be a scalar value or a data frame, depending on the type of statement executed.
Encapsulates the result of an executed statement. This can include scalar values for simple queries or data frames for queries that return multiple rows or complex data.
int64scalar: A scalar result value, often used to represent the number of rows affected by an operation.optionalFrameframe: (Optional) A frame of data, which could be a relational table, a graph, or a set of documents.
Represents the response after executing a batch of statements. This includes the batch identifier and a list of scalar results for each statement in the batch, typically representing the number of rows affected by each operation.
int32batch_id: The unique identifier of the executed batch.repeatedint64scalars: List of scalar results for each statement in the batch.
Provides metadata about a prepared statement, including its parameters. This information is crucial for correctly binding parameters to the statement before execution.
int32statement_id: The unique identifier of the prepared statement.repeatedParameterMetaparameter_metas: Metadata about each parameter required by the statement, detailing type, name, and other characteristics.
Provides metadata about a single parameter of a prepared statement. This includes details about the parameter’s precision, scale, data type, and names.
int32precision: Precision of the parameter, typically used for numeric types.int32scale: Scale of the parameter, typically used for decimal types.stringtype_name: The data type of the parameter.optionalstringparameter_name: (Optional) The name of the placeholder specified for this value.stringname: The name of the parameter, if specified.
Represents the response after closing a prepared statement. The message is currently empty, serving as a simple acknowledgment of the action. This message does not contain any fields. It simply serves as an acknowledgment.
Represents a frame of data that could be one of several types, offering flexibility in representing different types of data responses. This structure allows for a more generic interface that can handle various data structures.
boolis_last: Indicates if this frame is the last in a series of frames, useful for paginated results.RelationalFramerelational_frameGraphFramegraph_frameDocumentFramedocument_frame
org/polypheny/prism/error.proto
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.
optionalint32error_code: A numeric code representing the specific error encountered. This code can be used programmatically to handle specific error cases.optionalstringstate: An optional state description in the form of an identifier that provides further context about the error.optionalstringmessage: A human-readable message describing the error in detail. This message offers clients a clear understanding of the issue.
org/polypheny/prism/relational_frame.proto
The RelationalFrame message encapsulates the structure of a relational frame, which includes metadata about columns and rows of data within a relational table. This structure is essential for representing the schema and data of a table in a structured format, facilitating data manipulation and query operations.
repeatedColumnMetacolumn_meta: A collection of metadata about each column in the frame. This provides details such as index, nullability, length, precision, and type information, defining the schema of the table represented by the relational frame.repeatedRowrows: The rows of data within the frame. Each row consists of a series of ProtoValue objects representing the values in the row, mirroring the actual data stored in the table’s rows according to the schema defined by the column metadata.
The ColumnMeta message holds metadata related to a specific column within a relational table.
int32column_index: Index of the column within the table.boolis_nullable: Indicates whether the column can contain null values.int32length: The length of the column values.stringcolumn_label: Label associated with the column, if any.stringcolumn_name: Name of the column.int32precision: Precision of the column, usually for numerical values.stringentity_name: Name of the entity that the column represents.stringschema_name: Name of the schema that the column belongs to.TypeMetatype_meta: Metadata describing the type of the column.int32scale: Scale of the column, typically for numerical values.stringnamespace: Namespace the column resides in.
The FieldMeta message provides metadata for individual fields, which can be part of complex structures like arrays or structs.
int32field_index: Index of the field within its containing structure.boolis_nullable: Indicates whether the field can contain null values.int32length: Length of the field’s value.stringfield_name: Name of the field.int32precision: Precision of the field, usually for numerical values.TypeMetatype_meta: Metadata describing the type of the field.int32scale: Scale of the field, typically for numerical values.
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.
ProtoPolyTypeproto_value_type: Represents the fundamental data type of the value. This can be any basic data type depending on the definitions within ProtoValue.ProtoValueType.optionalStructMetastruct_meta: 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.optionalArrayMetaarray_meta: 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.
The StructMeta message provides metadata specific to structured types, giving details about the fields that make up the structure.
repeatedFieldMetafield_metas: A collection of metadata entries, one for each field within the structure. Each FieldMeta provides details like the field’s name, type, nullability, etc.
The ArrayMeta message provides metadata about array types, detailing the kind of elements they can hold.
TypeMetaelement_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.
The Row message represents a single row within a relational frame.
repeatedProtoValuevalues: The values within the row, represented as a series of ProtoValue objects.
org/polypheny/prism/document_frame.proto
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.
repeatedProtoDocumentdocuments: A list of documents contained within this frame. Each entry in this list is an instance of ProtoDocument, representing an individual document.
org/polypheny/prism/graph_frame.proto
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. Currently, this message does not contain any fields. It is reserved for future use when the graph model is more completely realized.
org/polypheny/prism/statement_requests.proto
Closes the result set of the statement matching the specified statement id. If no such statement exists, or the result is already closed, this request is ignored.
int32statement_id: The id of the statement of which the result set should be closed.
ExecuteUnparameterizedStatementRequest
Represents a request to execute a statement without any parameters. This message includes details about the language in which the statement is written, the statement itself, and optional attributes such as fetch size and namespace name to control how the statement is executed.
stringlanguage_name: Specifies the query language of the statement being executed.stringstatement: The statement to be executed.optionalint32fetch_size: (Optional) Number of rows to include into the response message of this call. More rows can be fetched afterwards. If not specified, a default value is used.optionalstringnamespace_name: (Optional) The namespace under which the statement should be executed. If not specified, the namespace specified for the connection is used.
ExecuteUnparameterizedStatementBatchRequest
Encapsulates a batch of unparameterized statements to be executed. This is useful for executing multiple statements in a single call, improving efficiency and performance by reducing the number of round trips to the server.
repeatedExecuteUnparameterizedStatementRequeststatements: List of statements to be executed. Each statement is an instance of ExecuteUnparameterizedStatementRequest, allowing for individual control over the execution parameters of each statement in the batch.
Represents a request to prepare a statement for execution. This message includes the language of the statement, the statement text itself, and optionally, the namespace where the statement should be prepared. Preparing a statement can improve performance for repeated execution.
stringlanguage_name: Specifies the query language of the statement to be prepared.stringstatement: The statement to be prepared.optionalstringnamespace_name: (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. his allows for efficient execution of prepared statements with the provided parameters.
int32statement_id: The unique identifier of the prepared statement to be executed.IndexedParametersparameters: The indexed parameters to be used with the statement.optionalint32fetch_size: (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. This is useful for executing the same statement with various parameter sets in a single operation, enhancing performance and efficiency.
int32statement_id: The unique identifier of the prepared statement to be executed.repeatedIndexedParametersparameters: List of sets of indexed parameters for multiple executions of the statement.
Represents a request to execute a previously prepared statement by its ID, using named parameters. This approach allows for parameter values to be associated with specific parameter names in the statement, providing clarity and reducing errors in parameter placement.
int32statement_id: The unique identifier of the prepared statement to be executed.NamedParametersparameters: The named parameters to be used with the statement.optionalint32fetch_size: (Optional) Number of rows to include into the response message of this call. More rows can be fetched afterwards.
Encapsulates indexed parameters for a prepared statement. This represents a list of parameter values to be used in the statement, where each parameter’s position in the list corresponds to its position in the statement.
repeatedProtoValueparameters: List of values to be used as parameters, indexed by their position in the list.
Encapsulates named parameters for a prepared statement. This allows for parameters to be specified by name, providing a flexible and clear way to supply parameters to a prepared statement.
ParametersEntryparameters: Map of parameter names to their corresponding values.
Represents a request to close a statement. This operation is used to release resources allocated to the statement on the server. Closing a statement when it is no longer needed is a good practice to manage resources efficiently.
int32statement_id: The unique identifier of the statement to be closed.
Represents a request to fetch a batch of results for a previously executed statement. This is typically used in conjunction with large result sets, where the results are fetched in multiple batches to manage memory and network resources effectively.
int32statement_id: The unique identifier of the statement whose results are to be fetched.optionalint32fetch_size: (Optional) Number of rows to retrieve in this batch. If no fetch size is specified, a default value is used.
org/polypheny/prism/transaction_responses.proto
Represents the response after attempting to commit a transaction. This message serves as an acknowledgment that the commit request was received and processed, finalizing all changes made during the transaction. This message does not contain any fields. It simply serves as an acknowledgment of the commit.
Represents the response after attempting to rollback a transaction. This message serves as an acknowledgment that the rollback request was received and processed, undoing all changes made during the transaction. This message does not contain any fields. It simply serves as an acknowledgment of the rollback.
org/polypheny/prism/value.proto
ProtoValue represents a single value supported by the DBMS. It contains a wide range of fields each corresponding to one supported data type. Only one field can be set at a time.
ProtoBooleanboolean: Field used to represent a boolean. If set, all other fields must be empty.ProtoIntegerinteger: Field used to represent an integer of 32 bits.. If set, all other fields must be empty.ProtoLonglong: Field used to represent a long integer of 64 bits. If set, all other fields must be empty.ProtoBigDecimalbig_decimal: Field used to represent a BigDecimal. The value is represented using an unscaled value (arbitrary length byte string), scale (32bit) and precision (32bit). If set, all other fields must be empty.ProtoFloatfloat: Field used to represent a floating-point number of 32 bits. If set, all other fields must be empty.ProtoDoubledouble: Field used to represent a double-precision (64 bit) floating-point number. If set, all other fields must be empty.ProtoDatedate: Field used to represent a date. Dates are stored in days since epoch till the start of the specified day. If set, all other fields must be empty.ProtoTimetime: Field used to represent a time. The value is specified as milliseconds since midnight of a day. If set, all other fields must be empty.ProtoTimestamptimestamp: Field used to represent a timestamp. The value is specified as milliseconds since epoch. If set, all other fields must be empty.ProtoIntervalinterval: Field used to represent a time interval. Intervals are either specified in milliseconds or months. The unit is specified along the value. If set, all other fields must be empty.ProtoStringstring: Field used to represent an string of arbitrary length. If set, all other fields must be empty.ProtoBinarybinary: Field used to represent binary data of arbitrary length. If set, all other fields must be empty.ProtoNullnull: Field used to represent a null value. If set, all other fields must be empty.ProtoListlist: Field used to represent a list of ProtoValues. If set, all other fields must be empty.ProtoDocumentdocument: Field used to represent a document consisting of key value pairs where keys and values are arbitrary ProtoValues. If set, all other fields must be empty.ProtoFilefile: Field used to represent a FILE type such as FILE, IMAGE, VIDEO or AUDIO.
Represents a boolean value.
boolboolean: A boolean value.
Represents a 32-bit integer value.
int32integer: A 32-bit integer value.
Represents a 64-bit long integer value.
int64long: A 64-bit long integer value.
Represents a BigDecimal value with specified precision and scale. The value is reconstructed by calculating unscaled_value * 10 ^ -scale.
int32scale: The scale of the BigDecimal.bytesunscaled_value: The unscaled value of the BigDecimal.
Represents a single precision floating point number.
floatfloat: A single precision floating point number.
Represents a double precision floating point number.
doubledouble: A double precision floating point number.
Represents a date as a 64-bit integer.
int64date: Days since epoch till start of the specified day.
Represents a time value.
int32time: Milliseconds since midnight of an arbitrary day.
Represents a timestamp value.
int64timestamp: The timestamp value in milliseconds since epoch.
Represents an interval value.
int64millisecondsint64months
Represents a string value.
stringstring: A string value of arbitrary length.
Represents binary data.
bytesbinary: Binary data of arbitrary length.
Represents a null value. This message does not contain any fields.
Represents a list of ProtoValue items.
repeatedProtoValuevalues: The list of ProtoValue items.
Defines a key-value pair using ProtoValues for both key and value.
ProtoValuekey: The key of the entry.ProtoValuevalue: The value of the entry.
Represents a document consisting of multiple ProtoEntry items.
repeatedProtoEntryentries: The list of ProtoEntry items forming the document.
Represents a file containing large binary data.
bytesbinary: The content of the file in binary.
org/polypheny/prism/connection_responses.proto
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.
boolis_compatible: 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.int32major_api_version: The major version number of the server’s API. Helps the client ascertain the API level of the server.int32minor_api_version: The minor version number of the server’s API. Provides finer granularity about the server’s capabilities.
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. This message does not contain any fields. It simply serves as an acknowledgment of the disconnection process.
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. 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. This message does not contain any fields. It serves as an acknowledgment of the update process for the connection properties.
Enums
This section provides an overview of the enums and their values. Enums are categorized by the files containing them.
org/polypheny/prism/namespace_meta_responses.proto
The PrimaryKey message provides details about a table’s primary key.
UNSPECIFIED= 0: The database where the primary key’s table is located.REGULAR= 1: The namespace or schema of the primary key’s table.CALCULATED= 2: The table with this primary key.VERSION= 3: The columns that make up the primary key.
org/polypheny/prism/meta_responses.proto
The return type enum is part of the message Procedure and indicates the possible types of return values for a stored procedure.
UNSPECIFIED= 0: Indicates that the return type is unspecified.UNKNOWN= 1: Indicates that the return type is unknown.NO_RESULT= 2: The procedure does not return a result.RESULT= 3: The procedure returns a result.
org/polypheny/prism/value.proto
Specifies the type of a proto value. This enum contains a value for each datatype supported by the DBMS.
UNSPECIFIED= 0: Default unspecified type.BOOLEAN= 1: Boolean type, true or false.TINYINT= 2: 8-bit integer.SMALLINT= 3: 16-bit integer.INTEGER= 4: 32-bit integer.BIGINT= 5: 64-bit integer.DECIMAL= 6: Arbitrary precision number.REAL= 7: Single precision floating point.FLOAT= 8: Alias for REAL.DOUBLE= 9: Double precision floating point.DATE= 10: Date value representing a specific day independent of time. Specified in days since epoch till the start of the specified day.TIME= 11: Time value without timezone in milliseconds since midnight.TIMESTAMP= 13: Timestamp without timezone. Specified as milliseconds since epoch.INTERVAL= 15: IntervalCHAR= 28: Fixed length character string.VARCHAR= 29: Variable length character string.TEXT= 58: Text data type.BINARY= 30: Binary data as byte string.VARBINARY= 31: Variable length binary data as byte string.NULL= 32: Null type.ARRAY= 33: Array type containing elements of one of the ProtoPolyTypes.MAP= 34: Map type storing key value pairs. Key and value can be arbitrary values of one of the ProtoPolyTypes.DOCUMENT= 35: Document type similar to a map but used in the document model to represent documents returned as a result.GRAPH= 36: Graph type. Returned by a query in the graph data model.NODE= 37: Graph node type. Used inside the graph type to represent a graphs nodes.EDGE= 38: Graph edge type. Used inside the graph type to represent a graphs edges.PATH= 39: Graph path type. Used in results of the graph data model to return a the result of graph queries returning a path.IMAGE= 40: Image data type. Subtype of the file type. Same as binary but containing image data.VIDEO= 41: Video data type. Subtype of the file type. Same as binary but containing video data.AUDIO= 42: Audio data type. Subtype of the file type. Same as binary but containing audio data.FILE= 43: File data type. Same as binary but containing the data of an arbitrary file.DISTINCT= 44: Distinct type (a named scalar type). Not supported yet!STRUCTURED= 45: Structured type. Contains an arbitrary set of other ProtoValues of any of the ProtoValueTypes. Not supported yet!ROW= 46: Row type.OTHER= 47: Other types not specifically listed.CURSOR= 48: Cursor type.COLUMN_LIST= 49: Column list type.DYNAMIC_STAR= 50: Dynamic star type (used for dynamic column projection).GEOMETRY= 51: Geometric data type.SYMBOL= 52: Symbol type.JSON= 53: JSON data type.MULTISET= 54: Multiset type.ANY= 55: Any type (a type that can hold any value).USER_DEFINED_TYPE= 56: User-defined type.ROW_ID= 57: Row identifier type.