|
1 | | -from typing import Any, Union |
| 1 | +from typing import Any, Sequence, Union |
2 | 2 |
|
3 | 3 | from typing_extensions import Self |
4 | 4 |
|
@@ -82,3 +82,119 @@ class PyMacAddr8: |
82 | 82 | ### Parameters: |
83 | 83 | - `value`: value for MACADDR8 field. |
84 | 84 | """ |
| 85 | + |
| 86 | +class PyPoint: |
| 87 | + """Represent point field in PostgreSQL and Point in Rust.""" |
| 88 | + |
| 89 | + def __init__( |
| 90 | + self: Self, |
| 91 | + value: Sequence[float], |
| 92 | + ) -> None: |
| 93 | + """Create new instance of PyPoint. |
| 94 | +
|
| 95 | + It accepts any sequence of two float numbers. |
| 96 | +
|
| 97 | + ### Parameters: |
| 98 | + - `value`: sequence of two float numbers. |
| 99 | + """ |
| 100 | + |
| 101 | +class PyBox: |
| 102 | + """Represent box field in PostgreSQL and Rect in Rust.""" |
| 103 | + |
| 104 | + def __init__( |
| 105 | + self: Self, |
| 106 | + value: Union[ |
| 107 | + Sequence[Sequence[float]], |
| 108 | + Sequence[float], |
| 109 | + ], |
| 110 | + ) -> None: |
| 111 | + """Create new instance of PyBox. |
| 112 | +
|
| 113 | + You need to pass any of this structures: |
| 114 | + - sequence of two sequences, each with pair of float numbers |
| 115 | + - sequence of two pairs of float |
| 116 | +
|
| 117 | + ### Parameters: |
| 118 | + - `value`: any valid sequence with two pairs of float numbers. |
| 119 | + """ |
| 120 | + |
| 121 | +class PyPath: |
| 122 | + """Represent path field in PostgreSQL and LineString in Rust.""" |
| 123 | + |
| 124 | + def __init__( |
| 125 | + self: Self, |
| 126 | + value: Union[ |
| 127 | + Sequence[Sequence[float]], |
| 128 | + Sequence[float], |
| 129 | + ], |
| 130 | + ) -> None: |
| 131 | + """Create new instance of PyPath. |
| 132 | +
|
| 133 | + You need to pass any of this structures: |
| 134 | + - sequence of sequences, each with pair of float numbers |
| 135 | + - sequence with pairs of float numbers |
| 136 | +
|
| 137 | + ### Parameters: |
| 138 | + - `value`: any valid structure with float numbers. |
| 139 | + """ |
| 140 | + |
| 141 | +class PyLine: |
| 142 | + """Represent line field in PostgreSQL and Line in Rust.""" |
| 143 | + |
| 144 | + def __init__( |
| 145 | + self: Self, |
| 146 | + value: Union[ |
| 147 | + Sequence[Sequence[float]], |
| 148 | + Sequence[float], |
| 149 | + ], |
| 150 | + ) -> None: |
| 151 | + """Create new instance of PyLine. |
| 152 | +
|
| 153 | + You need to pass any of this structures: |
| 154 | + - sequence of three float numbers |
| 155 | + - sequence of two sequences, each with pair of float numbers |
| 156 | + - sequence with two pairs of float numbers |
| 157 | +
|
| 158 | + ### Parameters: |
| 159 | + - `value`: any valid structure with float numbers. |
| 160 | + """ |
| 161 | + |
| 162 | +class PyLineSegment: |
| 163 | + """Represent lseg field in PostgreSQL and Line in Rust.""" |
| 164 | + |
| 165 | + def __init__( |
| 166 | + self: Self, |
| 167 | + value: Union[ |
| 168 | + Sequence[Sequence[float]], |
| 169 | + Sequence[float], |
| 170 | + ], |
| 171 | + ) -> None: |
| 172 | + """Create new instance of PyLineSegment. |
| 173 | +
|
| 174 | + You need to pass any of this structures: |
| 175 | + - sequence of two sequences, each with pair of float numbers |
| 176 | + - sequence with two pairs of float numbers |
| 177 | +
|
| 178 | + ### Parameters: |
| 179 | + - `value`: any valid structure with float numbers. |
| 180 | + """ |
| 181 | + |
| 182 | +class PyPolygon: |
| 183 | + """Represent polygon field in PostgreSQL and Polygon in Rust.""" |
| 184 | + |
| 185 | + def __init__( |
| 186 | + self: Self, |
| 187 | + value: Union[ |
| 188 | + Sequence[Sequence[float]], |
| 189 | + Sequence[float], |
| 190 | + ], |
| 191 | + ) -> None: |
| 192 | + """Create new instance of PyPolygon. |
| 193 | +
|
| 194 | + You need to pass any of this structures: |
| 195 | + - sequence of sequences, each with pair of float numbers |
| 196 | + - sequence with pairs of float numbers |
| 197 | +
|
| 198 | + ### Parameters: |
| 199 | + - `value`: any valid structure with float numbers. |
| 200 | + """ |
0 commit comments