python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
CreatedAt mixin (base class) in python SQLModel
I'm using SQLModel and would like to define base class with created_at field to inherit from it in others models.
class CreatedAtMixin(SQLModel):
created_at: datetime = Field(default=datetime.now(...
Nikita
Votes: 0
Answers: 1
How to perform a recursive query
I have a database of companies in a hierarchical structure where all the companies are in the same table but each refer to a parent company that is referenced in a parent_id column. This value matches...
noob
Votes: 0
Answers: 0
INSERT OR IGNORE with SQLModel using Python
Does anyone know if its possible to get a INSERT OR IGNORE function with SQLModel? And if not, does anyone know if there is a workaround to get the same results?
I haven't tried anything to get the re...
Majd Mustafa
Votes: 0
Answers: 0
How do class declaration parameters work in python?
Recently I came across SQLModel package. It combines pydantic and sqlalchemy features to work with database objects.
What I noticed in documentation is that table=True parameter that you use to declar...
Artem Ilin
Votes: 0
Answers: 1