sqlx_exasol/responses/
session_info.rs1use serde::Deserialize;
2
3use crate::options::ProtocolVersion;
4
5#[derive(Debug, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct SessionInfo {
9 protocol_version: ProtocolVersion,
10 session_id: u64,
11 release_version: String,
12 database_name: String,
13 product_name: String,
14 max_data_message_size: u64,
15 max_identifier_length: u64,
16 max_varchar_length: u64,
17 identifier_quote_string: String,
18 time_zone: String,
19 time_zone_behavior: String,
20}
21
22impl SessionInfo {
23 #[must_use]
24 pub fn protocol_version(&self) -> ProtocolVersion {
25 self.protocol_version
26 }
27
28 #[must_use]
29 pub fn session_id(&self) -> u64 {
30 self.session_id
31 }
32
33 #[must_use]
34 pub fn release_version(&self) -> &str {
35 &self.release_version
36 }
37
38 #[must_use]
39 pub fn database_name(&self) -> &str {
40 &self.database_name
41 }
42
43 #[must_use]
44 pub fn product_name(&self) -> &str {
45 &self.product_name
46 }
47
48 #[must_use]
49 pub fn max_data_message_size(&self) -> u64 {
50 self.max_data_message_size
51 }
52
53 #[must_use]
54 pub fn max_identifier_length(&self) -> u64 {
55 self.max_identifier_length
56 }
57
58 #[must_use]
59 pub fn max_varchar_length(&self) -> u64 {
60 self.max_varchar_length
61 }
62
63 #[must_use]
64 pub fn identifier_quote_string(&self) -> &str {
65 &self.identifier_quote_string
66 }
67
68 #[must_use]
69 pub fn timezone(&self) -> &str {
70 &self.time_zone
71 }
72
73 #[must_use]
74 pub fn time_zone_behavior(&self) -> &str {
75 &self.time_zone_behavior
76 }
77}