Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
database::protocol Namespace Reference

Classes

struct  connect_request
 Client connection request. More...
 
struct  connect_response
 Server connection response. More...
 
struct  error_response
 Error response message. More...
 
struct  message_header
 Common header for all protocol messages. More...
 
class  protocol_serializer
 Serialization/deserialization utilities for protocol messages. More...
 
struct  query_request
 Query execution request. More...
 
struct  query_response
 Query execution response. More...
 
struct  transaction_request
 Transaction control request. More...
 
struct  transaction_response
 Transaction control response. More...
 

Enumerations

enum class  message_type : uint16_t {
  CONNECT_REQUEST = 1 , CONNECT_RESPONSE = 2 , DISCONNECT = 3 , PING = 4 ,
  PONG = 5 , QUERY_REQUEST = 10 , QUERY_RESPONSE = 11 , BEGIN_TRANSACTION = 20 ,
  COMMIT_TRANSACTION = 21 , ROLLBACK_TRANSACTION = 22 , TRANSACTION_RESPONSE = 23 , PREPARE_STATEMENT = 30 ,
  EXECUTE_PREPARED = 31 , CLOSE_PREPARED = 32 , ERROR_RESPONSE = 100
}
 Database protocol message types. More...
 
enum class  query_operation : uint8_t {
  SELECT = 1 , INSERT = 2 , UPDATE = 3 , DELETE = 4 ,
  CREATE = 5 , ALTER = 6 , DROP = 7 , OTHER = 99
}
 Type of query operation. More...
 

Enumeration Type Documentation

◆ message_type

enum class database::protocol::message_type : uint16_t
strong

Database protocol message types.

Binary protocol for client-server communication. Each message has a type, request ID, and payload.

Enumerator
CONNECT_REQUEST 
CONNECT_RESPONSE 
DISCONNECT 
PING 
PONG 
QUERY_REQUEST 
QUERY_RESPONSE 
BEGIN_TRANSACTION 
COMMIT_TRANSACTION 
ROLLBACK_TRANSACTION 
TRANSACTION_RESPONSE 
PREPARE_STATEMENT 
EXECUTE_PREPARED 
CLOSE_PREPARED 
ERROR_RESPONSE 

Definition at line 25 of file database_protocol.h.

◆ query_operation

enum class database::protocol::query_operation : uint8_t
strong

Type of query operation.

Enumerator
SELECT 
INSERT 
UPDATE 
DELETE 
CREATE 
ALTER 
DROP 
OTHER 

Definition at line 56 of file database_protocol.h.