Skip to content

Commit ba3c25d

Browse files
committed
Added expicit array types, changed how they convert
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
1 parent 4b87182 commit ba3c25d

File tree

5 files changed

+653
-254
lines changed

5 files changed

+653
-254
lines changed

python/psqlpy/_internal/extra_types.pyi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class Int64Array:
389389
- `inner`: inner value, sequence of int values.
390390
"""
391391

392-
class Flaot32Array:
392+
class Float32Array:
393393
"""Represent FLOAT4 ARRAY in PostgreSQL."""
394394

395395
def __init__(
@@ -402,13 +402,13 @@ class Flaot32Array:
402402
],
403403
],
404404
) -> None:
405-
"""Create new instance of Flaot32Array.
405+
"""Create new instance of Float32Array.
406406
407407
### Parameters:
408408
- `inner`: inner value, sequence of float values.
409409
"""
410410

411-
class Flaot64Array:
411+
class Float64Array:
412412
"""Represent FLOAT8 ARRAY in PostgreSQL."""
413413

414414
def __init__(
@@ -421,7 +421,7 @@ class Flaot64Array:
421421
],
422422
],
423423
) -> None:
424-
"""Create new instance of Flaot64Array.
424+
"""Create new instance of Float64Array.
425425
426426
### Parameters:
427427
- `inner`: inner value, sequence of float values.
@@ -475,7 +475,9 @@ class JSONBArray:
475475
inner: typing.Sequence[
476476
typing.Union[
477477
typing.Dict[str, typing.Any],
478+
PyJSONB,
478479
typing.Sequence[typing.Dict[str, typing.Any]],
480+
typing.Sequence[PyJSONB],
479481
typing.Sequence[typing.Any],
480482
]
481483
],
@@ -494,7 +496,9 @@ class JSONArray:
494496
inner: typing.Sequence[
495497
typing.Union[
496498
typing.Dict[str, typing.Any],
499+
PyJSON,
497500
typing.Sequence[typing.Dict[str, typing.Any]],
501+
typing.Sequence[PyJSON],
498502
typing.Sequence[typing.Any],
499503
]
500504
],

python/psqlpy/extra_types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
DateArray,
77
DateTimeArray,
88
DateTimeTZArray,
9-
Flaot32Array,
10-
Flaot64Array,
119
Float32,
10+
Float32Array,
1211
Float64,
12+
Float64Array,
1313
Int16Array,
1414
Int32Array,
1515
Int64Array,
@@ -77,8 +77,8 @@
7777
"Int16Array",
7878
"Int32Array",
7979
"Int64Array",
80-
"Flaot32Array",
81-
"Flaot64Array",
80+
"Float32Array",
81+
"Float64Array",
8282
"MoneyArray",
8383
"IpAddressArray",
8484
"JSONBArray",

0 commit comments

Comments
 (0)