model
SelectAll
Bases: BaseModel
SelectAll tells the query engine to get all fields from the from() table ONLY.
Ideally it could get fields from joined tables too, but no way for that to work (from a typing POV)
Not recommended for public use, users should rather use their table's all() method.
Source code in src/embar/model.py
20 21 22 23 24 25 26 27 28 | |
generate_model(cls)
Create a model based on a Table.
Note the new table has the same exact name, maybe something to revisit.
from embar.table import Table
from embar.model import generate_model
class MyTable(Table): ...
generate_model(MyTable)
Source code in src/embar/model.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |