Replies: 2 comments
-
from sqlmodel import Field, Column, SQLModel
from sqlalchemy.dialects.postgresql import JSONB
class AlertBase(SQLModel):
name: str = Field(nullable=False, description="The name of alert", max_length=56)
title: str = Field(nullable=True, description="The title of alert", max_length=100)
labels: dict = Field(sa_column=Column(JSONB)) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
I would like to know how it is possible to convert a JSON type field with SQLModel
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.22
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions