Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 97e3569

Browse files
add jsonb type
1 parent 34e9317 commit 97e3569

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sqeleton/abcs/database_types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ class PostgresqlJSON(JSONType):
146146
pass
147147

148148

149+
class PostgresqlJSONB(JSONType):
150+
pass
151+
152+
149153
@dataclass
150154
class Integer(NumericType, IKey):
151155
precision: int = 0

sqeleton/databases/postgresql.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
FractionalType,
1111
Boolean,
1212
Date,
13-
PostgresqlJSON
13+
PostgresqlJSON,
14+
PostgresqlJSONB
1415
)
1516
from ..abcs.mixins import AbstractMixin_MD5, AbstractMixin_NormalizeValue
1617
from .base import BaseDialect, ThreadedDatabase, import_helper, ConnectError, Mixin_Schema
@@ -89,6 +90,7 @@ class PostgresqlDialect(BaseDialect, Mixin_Schema):
8990
"text": Text,
9091
# JSON
9192
"json": PostgresqlJSON,
93+
"jsonb": PostgresqlJSONB,
9294
# UUID
9395
"uuid": Native_UUID,
9496
# Boolean

0 commit comments

Comments
 (0)