TableServiceClient.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. <?php
  2. // GENERATED CODE -- DO NOT EDIT!
  3. namespace Ydb\Table\V1;
  4. /**
  5. */
  6. class TableServiceClient extends \Grpc\BaseStub {
  7. /**
  8. * @param string $hostname hostname
  9. * @param array $opts channel options
  10. * @param \Grpc\Channel $channel (optional) re-use channel object
  11. */
  12. public function __construct($hostname, $opts, $channel = null) {
  13. parent::__construct($hostname, $opts, $channel);
  14. }
  15. /**
  16. * Create new session. Implicit session creation is forbidden,
  17. * so user must create new session before execute any query,
  18. * otherwise BAD_SESSION status will be returned.
  19. * Simultaneous execution of requests are forbiden.
  20. * Sessions are volatile, can be invalidated by server, for example in case
  21. * of fatal errors. All requests with this session will fail with BAD_SESSION status.
  22. * So, client must be able to handle BAD_SESSION status.
  23. * @param \Ydb\Table\CreateSessionRequest $argument input argument
  24. * @param array $metadata metadata
  25. * @param array $options call options
  26. * @return \Grpc\UnaryCall
  27. */
  28. public function CreateSession(\Ydb\Table\CreateSessionRequest $argument,
  29. $metadata = [], $options = []) {
  30. return $this->_simpleRequest('/Ydb.Table.V1.TableService/CreateSession',
  31. $argument,
  32. ['\Ydb\Table\CreateSessionResponse', 'decode'],
  33. $metadata, $options);
  34. }
  35. /**
  36. * Ends a session, releasing server resources associated with it.
  37. * @param \Ydb\Table\DeleteSessionRequest $argument input argument
  38. * @param array $metadata metadata
  39. * @param array $options call options
  40. * @return \Grpc\UnaryCall
  41. */
  42. public function DeleteSession(\Ydb\Table\DeleteSessionRequest $argument,
  43. $metadata = [], $options = []) {
  44. return $this->_simpleRequest('/Ydb.Table.V1.TableService/DeleteSession',
  45. $argument,
  46. ['\Ydb\Table\DeleteSessionResponse', 'decode'],
  47. $metadata, $options);
  48. }
  49. /**
  50. * Idle sessions can be kept alive by calling KeepAlive periodically.
  51. * @param \Ydb\Table\KeepAliveRequest $argument input argument
  52. * @param array $metadata metadata
  53. * @param array $options call options
  54. * @return \Grpc\UnaryCall
  55. */
  56. public function KeepAlive(\Ydb\Table\KeepAliveRequest $argument,
  57. $metadata = [], $options = []) {
  58. return $this->_simpleRequest('/Ydb.Table.V1.TableService/KeepAlive',
  59. $argument,
  60. ['\Ydb\Table\KeepAliveResponse', 'decode'],
  61. $metadata, $options);
  62. }
  63. /**
  64. * Creates new table.
  65. * @param \Ydb\Table\CreateTableRequest $argument input argument
  66. * @param array $metadata metadata
  67. * @param array $options call options
  68. * @return \Grpc\UnaryCall
  69. */
  70. public function CreateTable(\Ydb\Table\CreateTableRequest $argument,
  71. $metadata = [], $options = []) {
  72. return $this->_simpleRequest('/Ydb.Table.V1.TableService/CreateTable',
  73. $argument,
  74. ['\Ydb\Table\CreateTableResponse', 'decode'],
  75. $metadata, $options);
  76. }
  77. /**
  78. * Drop table.
  79. * @param \Ydb\Table\DropTableRequest $argument input argument
  80. * @param array $metadata metadata
  81. * @param array $options call options
  82. * @return \Grpc\UnaryCall
  83. */
  84. public function DropTable(\Ydb\Table\DropTableRequest $argument,
  85. $metadata = [], $options = []) {
  86. return $this->_simpleRequest('/Ydb.Table.V1.TableService/DropTable',
  87. $argument,
  88. ['\Ydb\Table\DropTableResponse', 'decode'],
  89. $metadata, $options);
  90. }
  91. /**
  92. * Modifies schema of given table.
  93. * @param \Ydb\Table\AlterTableRequest $argument input argument
  94. * @param array $metadata metadata
  95. * @param array $options call options
  96. * @return \Grpc\UnaryCall
  97. */
  98. public function AlterTable(\Ydb\Table\AlterTableRequest $argument,
  99. $metadata = [], $options = []) {
  100. return $this->_simpleRequest('/Ydb.Table.V1.TableService/AlterTable',
  101. $argument,
  102. ['\Ydb\Table\AlterTableResponse', 'decode'],
  103. $metadata, $options);
  104. }
  105. /**
  106. * Creates copy of given table.
  107. * @param \Ydb\Table\CopyTableRequest $argument input argument
  108. * @param array $metadata metadata
  109. * @param array $options call options
  110. * @return \Grpc\UnaryCall
  111. */
  112. public function CopyTable(\Ydb\Table\CopyTableRequest $argument,
  113. $metadata = [], $options = []) {
  114. return $this->_simpleRequest('/Ydb.Table.V1.TableService/CopyTable',
  115. $argument,
  116. ['\Ydb\Table\CopyTableResponse', 'decode'],
  117. $metadata, $options);
  118. }
  119. /**
  120. * Creates consistent copy of given tables.
  121. * @param \Ydb\Table\CopyTablesRequest $argument input argument
  122. * @param array $metadata metadata
  123. * @param array $options call options
  124. * @return \Grpc\UnaryCall
  125. */
  126. public function CopyTables(\Ydb\Table\CopyTablesRequest $argument,
  127. $metadata = [], $options = []) {
  128. return $this->_simpleRequest('/Ydb.Table.V1.TableService/CopyTables',
  129. $argument,
  130. ['\Ydb\Table\CopyTablesResponse', 'decode'],
  131. $metadata, $options);
  132. }
  133. /**
  134. * Creates consistent move of given tables.
  135. * @param \Ydb\Table\RenameTablesRequest $argument input argument
  136. * @param array $metadata metadata
  137. * @param array $options call options
  138. * @return \Grpc\UnaryCall
  139. */
  140. public function RenameTables(\Ydb\Table\RenameTablesRequest $argument,
  141. $metadata = [], $options = []) {
  142. return $this->_simpleRequest('/Ydb.Table.V1.TableService/RenameTables',
  143. $argument,
  144. ['\Ydb\Table\RenameTablesResponse', 'decode'],
  145. $metadata, $options);
  146. }
  147. /**
  148. * Returns information about given table (metadata).
  149. * @param \Ydb\Table\DescribeTableRequest $argument input argument
  150. * @param array $metadata metadata
  151. * @param array $options call options
  152. * @return \Grpc\UnaryCall
  153. */
  154. public function DescribeTable(\Ydb\Table\DescribeTableRequest $argument,
  155. $metadata = [], $options = []) {
  156. return $this->_simpleRequest('/Ydb.Table.V1.TableService/DescribeTable',
  157. $argument,
  158. ['\Ydb\Table\DescribeTableResponse', 'decode'],
  159. $metadata, $options);
  160. }
  161. /**
  162. * Explains data query.
  163. * SessionId of previously created session must be provided.
  164. * @param \Ydb\Table\ExplainDataQueryRequest $argument input argument
  165. * @param array $metadata metadata
  166. * @param array $options call options
  167. * @return \Grpc\UnaryCall
  168. */
  169. public function ExplainDataQuery(\Ydb\Table\ExplainDataQueryRequest $argument,
  170. $metadata = [], $options = []) {
  171. return $this->_simpleRequest('/Ydb.Table.V1.TableService/ExplainDataQuery',
  172. $argument,
  173. ['\Ydb\Table\ExplainDataQueryResponse', 'decode'],
  174. $metadata, $options);
  175. }
  176. /**
  177. * Prepares data query, returns query id.
  178. * SessionId of previously created session must be provided.
  179. * @param \Ydb\Table\PrepareDataQueryRequest $argument input argument
  180. * @param array $metadata metadata
  181. * @param array $options call options
  182. * @return \Grpc\UnaryCall
  183. */
  184. public function PrepareDataQuery(\Ydb\Table\PrepareDataQueryRequest $argument,
  185. $metadata = [], $options = []) {
  186. return $this->_simpleRequest('/Ydb.Table.V1.TableService/PrepareDataQuery',
  187. $argument,
  188. ['\Ydb\Table\PrepareDataQueryResponse', 'decode'],
  189. $metadata, $options);
  190. }
  191. /**
  192. * Executes data query.
  193. * SessionId of previously created session must be provided.
  194. * @param \Ydb\Table\ExecuteDataQueryRequest $argument input argument
  195. * @param array $metadata metadata
  196. * @param array $options call options
  197. * @return \Grpc\UnaryCall
  198. */
  199. public function ExecuteDataQuery(\Ydb\Table\ExecuteDataQueryRequest $argument,
  200. $metadata = [], $options = []) {
  201. return $this->_simpleRequest('/Ydb.Table.V1.TableService/ExecuteDataQuery',
  202. $argument,
  203. ['\Ydb\Table\ExecuteDataQueryResponse', 'decode'],
  204. $metadata, $options);
  205. }
  206. /**
  207. * Executes scheme query.
  208. * SessionId of previously created session must be provided.
  209. * @param \Ydb\Table\ExecuteSchemeQueryRequest $argument input argument
  210. * @param array $metadata metadata
  211. * @param array $options call options
  212. * @return \Grpc\UnaryCall
  213. */
  214. public function ExecuteSchemeQuery(\Ydb\Table\ExecuteSchemeQueryRequest $argument,
  215. $metadata = [], $options = []) {
  216. return $this->_simpleRequest('/Ydb.Table.V1.TableService/ExecuteSchemeQuery',
  217. $argument,
  218. ['\Ydb\Table\ExecuteSchemeQueryResponse', 'decode'],
  219. $metadata, $options);
  220. }
  221. /**
  222. * Begins new transaction.
  223. * @param \Ydb\Table\BeginTransactionRequest $argument input argument
  224. * @param array $metadata metadata
  225. * @param array $options call options
  226. * @return \Grpc\UnaryCall
  227. */
  228. public function BeginTransaction(\Ydb\Table\BeginTransactionRequest $argument,
  229. $metadata = [], $options = []) {
  230. return $this->_simpleRequest('/Ydb.Table.V1.TableService/BeginTransaction',
  231. $argument,
  232. ['\Ydb\Table\BeginTransactionResponse', 'decode'],
  233. $metadata, $options);
  234. }
  235. /**
  236. * Commits specified active transaction.
  237. * @param \Ydb\Table\CommitTransactionRequest $argument input argument
  238. * @param array $metadata metadata
  239. * @param array $options call options
  240. * @return \Grpc\UnaryCall
  241. */
  242. public function CommitTransaction(\Ydb\Table\CommitTransactionRequest $argument,
  243. $metadata = [], $options = []) {
  244. return $this->_simpleRequest('/Ydb.Table.V1.TableService/CommitTransaction',
  245. $argument,
  246. ['\Ydb\Table\CommitTransactionResponse', 'decode'],
  247. $metadata, $options);
  248. }
  249. /**
  250. * Performs a rollback of the specified active transaction.
  251. * @param \Ydb\Table\RollbackTransactionRequest $argument input argument
  252. * @param array $metadata metadata
  253. * @param array $options call options
  254. * @return \Grpc\UnaryCall
  255. */
  256. public function RollbackTransaction(\Ydb\Table\RollbackTransactionRequest $argument,
  257. $metadata = [], $options = []) {
  258. return $this->_simpleRequest('/Ydb.Table.V1.TableService/RollbackTransaction',
  259. $argument,
  260. ['\Ydb\Table\RollbackTransactionResponse', 'decode'],
  261. $metadata, $options);
  262. }
  263. /**
  264. * Describe supported table options.
  265. * @param \Ydb\Table\DescribeTableOptionsRequest $argument input argument
  266. * @param array $metadata metadata
  267. * @param array $options call options
  268. * @return \Grpc\UnaryCall
  269. */
  270. public function DescribeTableOptions(\Ydb\Table\DescribeTableOptionsRequest $argument,
  271. $metadata = [], $options = []) {
  272. return $this->_simpleRequest('/Ydb.Table.V1.TableService/DescribeTableOptions',
  273. $argument,
  274. ['\Ydb\Table\DescribeTableOptionsResponse', 'decode'],
  275. $metadata, $options);
  276. }
  277. /**
  278. * Streaming read table
  279. * @param \Ydb\Table\ReadTableRequest $argument input argument
  280. * @param array $metadata metadata
  281. * @param array $options call options
  282. * @return \Grpc\ServerStreamingCall
  283. */
  284. public function StreamReadTable(\Ydb\Table\ReadTableRequest $argument,
  285. $metadata = [], $options = []) {
  286. return $this->_serverStreamRequest('/Ydb.Table.V1.TableService/StreamReadTable',
  287. $argument,
  288. ['\Ydb\Table\ReadTableResponse', 'decode'],
  289. $metadata, $options);
  290. }
  291. /**
  292. * Upserts a batch of rows non-transactionally.
  293. * Returns success only when all rows were successfully upserted. In case of an error some rows might
  294. * be upserted and some might not.
  295. * @param \Ydb\Table\BulkUpsertRequest $argument input argument
  296. * @param array $metadata metadata
  297. * @param array $options call options
  298. * @return \Grpc\UnaryCall
  299. */
  300. public function BulkUpsert(\Ydb\Table\BulkUpsertRequest $argument,
  301. $metadata = [], $options = []) {
  302. return $this->_simpleRequest('/Ydb.Table.V1.TableService/BulkUpsert',
  303. $argument,
  304. ['\Ydb\Table\BulkUpsertResponse', 'decode'],
  305. $metadata, $options);
  306. }
  307. /**
  308. * Executes scan query with streaming result.
  309. * @param \Ydb\Table\ExecuteScanQueryRequest $argument input argument
  310. * @param array $metadata metadata
  311. * @param array $options call options
  312. * @return \Grpc\ServerStreamingCall
  313. */
  314. public function StreamExecuteScanQuery(\Ydb\Table\ExecuteScanQueryRequest $argument,
  315. $metadata = [], $options = []) {
  316. return $this->_serverStreamRequest('/Ydb.Table.V1.TableService/StreamExecuteScanQuery',
  317. $argument,
  318. ['\Ydb\Table\ExecuteScanQueryPartialResponse', 'decode'],
  319. $metadata, $options);
  320. }
  321. }