remove jsonb, because the extra lib support

This commit is contained in:
huangsong
2021-12-21 17:35:51 +08:00
parent 94c5b23204
commit 15ed00a62f
2 changed files with 0 additions and 30 deletions

View File

@ -140,13 +140,6 @@ You can pass `timezone=True` for timezone aware database column.
* Sqlalchemy column: `sqlalchemy.JSON`
* Type (used for pydantic): `pydantic.Json`
### JSONB
`JSONB()` has no required parameters, only support it in the postgresql.
* Sqlalchemy column: `sqlalchemy.dialects.postgresql.JSONB`
* Type (used for pydantic): `pydantic.Json`
### LargeBinary
`LargeBinary(max_length)` has a required `max_length` parameter.

View File

@ -520,29 +520,6 @@ class JSON(ModelFieldFactory, pydantic.Json):
return sqlalchemy.JSON()
class JSONB(JSON):
"""
JSONB field factory that construct Field classes and populated their values,
only support postgresql
"""
_type = pydantic.Json
_sample = '{"jsonb": "jsonb"}'
@classmethod
def get_column_type(cls, **kwargs: Any) -> Any:
"""
Return proper type of db column for given field type.
Accepts required and optional parameters that each column type accepts.
:param kwargs: key, value pairs of sqlalchemy options
:type kwargs: Any
:return: initialized column with proper options
:rtype: sqlalchemy Column
"""
return sqlalchemy.dialects.postgresql.JSONB()
if TYPE_CHECKING: # pragma: nocover # noqa: C901
@overload