PgType.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_value.proto
  4. namespace Ydb;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>Ydb.PgType</code>
  10. */
  11. class PgType extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * pg object id of the type
  15. * full registry could be found here: https://github.com/postgres/postgres/blob/master/src/include/catalog/pg_type.dat
  16. *
  17. * Generated from protobuf field <code>uint32 oid = 1;</code>
  18. */
  19. protected $oid = 0;
  20. /**
  21. * advanced type details useful for pg wire format proxying
  22. *
  23. * Generated from protobuf field <code>int32 typlen = 2;</code>
  24. */
  25. protected $typlen = 0;
  26. /**
  27. * optional, set to 0 by default
  28. *
  29. * Generated from protobuf field <code>int32 typmod = 3;</code>
  30. */
  31. protected $typmod = 0;
  32. /**
  33. * Constructor.
  34. *
  35. * @param array $data {
  36. * Optional. Data for populating the Message object.
  37. *
  38. * @type int $oid
  39. * pg object id of the type
  40. * full registry could be found here: https://github.com/postgres/postgres/blob/master/src/include/catalog/pg_type.dat
  41. * @type int $typlen
  42. * advanced type details useful for pg wire format proxying
  43. * @type int $typmod
  44. * optional, set to 0 by default
  45. * }
  46. */
  47. public function __construct($data = NULL) {
  48. \GPBMetadata\Protos\YdbValue::initOnce();
  49. parent::__construct($data);
  50. }
  51. /**
  52. * pg object id of the type
  53. * full registry could be found here: https://github.com/postgres/postgres/blob/master/src/include/catalog/pg_type.dat
  54. *
  55. * Generated from protobuf field <code>uint32 oid = 1;</code>
  56. * @return int
  57. */
  58. public function getOid()
  59. {
  60. return $this->oid;
  61. }
  62. /**
  63. * pg object id of the type
  64. * full registry could be found here: https://github.com/postgres/postgres/blob/master/src/include/catalog/pg_type.dat
  65. *
  66. * Generated from protobuf field <code>uint32 oid = 1;</code>
  67. * @param int $var
  68. * @return $this
  69. */
  70. public function setOid($var)
  71. {
  72. GPBUtil::checkUint32($var);
  73. $this->oid = $var;
  74. return $this;
  75. }
  76. /**
  77. * advanced type details useful for pg wire format proxying
  78. *
  79. * Generated from protobuf field <code>int32 typlen = 2;</code>
  80. * @return int
  81. */
  82. public function getTyplen()
  83. {
  84. return $this->typlen;
  85. }
  86. /**
  87. * advanced type details useful for pg wire format proxying
  88. *
  89. * Generated from protobuf field <code>int32 typlen = 2;</code>
  90. * @param int $var
  91. * @return $this
  92. */
  93. public function setTyplen($var)
  94. {
  95. GPBUtil::checkInt32($var);
  96. $this->typlen = $var;
  97. return $this;
  98. }
  99. /**
  100. * optional, set to 0 by default
  101. *
  102. * Generated from protobuf field <code>int32 typmod = 3;</code>
  103. * @return int
  104. */
  105. public function getTypmod()
  106. {
  107. return $this->typmod;
  108. }
  109. /**
  110. * optional, set to 0 by default
  111. *
  112. * Generated from protobuf field <code>int32 typmod = 3;</code>
  113. * @param int $var
  114. * @return $this
  115. */
  116. public function setTypmod($var)
  117. {
  118. GPBUtil::checkInt32($var);
  119. $this->typmod = $var;
  120. return $this;
  121. }
  122. }