Creates the model instance, saves it in a database and returns the updates model (with pk populated if not passed and autoincrement is set). The allowed kwargs are `Model` fields names and proper value types. :param kwargs: fields names and proper value types
(self, **kwargs: Any)
| 1347 | yield (await self._process_query_result_rows(rows, plan_cache))[0] |
| 1348 | |
| 1349 | async def create(self, **kwargs: Any) -> "T": |
| 1350 | """ |
| 1351 | Creates the model instance, saves it in a database and returns the updates model |
| 1352 | (with pk populated if not passed and autoincrement is set). |
| 1353 | |
| 1354 | The allowed kwargs are `Model` fields names and proper value types. |
| 1355 | |
| 1356 | :param kwargs: fields names and proper value types |
| 1357 | :type kwargs: Any |
| 1358 | :return: created model |
| 1359 | :rtype: Model |
| 1360 | """ |
| 1361 | instance = self.model(**kwargs) |
| 1362 | instance = await instance.save() |
| 1363 | return instance |
| 1364 | |
| 1365 | async def bulk_create(self, objects: list["T"]) -> None: |
| 1366 | """ |