1 | <?php |
||
13 | class ClientSession |
||
14 | { |
||
15 | /** @var string */ |
||
16 | protected $host; |
||
17 | |||
18 | /** @var string */ |
||
19 | protected $catalog; |
||
20 | |||
21 | /** @var UuidInterface */ |
||
22 | protected $transactionId; |
||
23 | |||
24 | /** @var string */ |
||
25 | protected $schema = 'default'; |
||
26 | |||
27 | /** @var string */ |
||
28 | protected $user = 'presto'; |
||
29 | |||
30 | /** @var string */ |
||
31 | protected $source = PrestoHeaders::PRESTO_SOURCE_VALUE; |
||
32 | |||
33 | /** @var Property[] */ |
||
34 | protected $property = []; |
||
35 | |||
36 | /** @var PreparedStatement[] */ |
||
37 | protected $preparedStatement = []; |
||
38 | |||
39 | /** |
||
40 | * PrestoSession constructor. |
||
41 | * |
||
42 | * @param string $host |
||
43 | * @param string $catalog |
||
44 | */ |
||
45 | public function __construct(string $host, string $catalog) |
||
50 | |||
51 | /** |
||
52 | * @param string $schema |
||
53 | */ |
||
54 | public function setSchema(string $schema) |
||
58 | |||
59 | /** |
||
60 | * @param string $user |
||
61 | */ |
||
62 | public function setUser(string $user) |
||
66 | |||
67 | /** |
||
68 | * @param string $source |
||
69 | */ |
||
70 | public function setSource(string $source) |
||
74 | |||
75 | /** |
||
76 | * @param UuidInterface $transactionId |
||
77 | */ |
||
78 | public function setTransactionId(UuidInterface $transactionId) |
||
82 | |||
83 | /** |
||
84 | * @param Property $property |
||
85 | */ |
||
86 | public function setProperty(Property $property) |
||
90 | |||
91 | /** |
||
92 | * @param PreparedStatement $preparedStatement |
||
93 | */ |
||
94 | public function setPreparedStatement(PreparedStatement $preparedStatement) |
||
98 | |||
99 | /** |
||
100 | * @return Property[] |
||
101 | */ |
||
102 | public function getProperty(): array |
||
106 | |||
107 | /** |
||
108 | * @return PreparedStatement[] |
||
109 | */ |
||
110 | public function getPreparedStatement(): array |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getHost(): string |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getCatalog(): string |
||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | public function getSchema(): string |
||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | public function getUser(): string |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getSource(): string |
||
154 | |||
155 | /** |
||
156 | * @return UuidInterface|null |
||
157 | */ |
||
158 | public function getTransactionId() |
||
162 | } |
||
163 |