File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ Contributors
4343* Galden <wudenggang0@163.com>
4444* Iuliia Volkova <xnuinside@gmail.com>
4545* Roman Averchenkov <aragentum@gmail.com>
46+ * AustinPena <austincollinpena@gmail.com>
4647
4748
4849Special thanks to my wife Daisy and her outsourcing company `DecentFoX Studio `_,
Original file line number Diff line number Diff line change @@ -240,25 +240,22 @@ Be ware of the :class:`tuple` in ``.gino.load((...))``.
240240How to do bulk or batch insert / update?
241241-----------------------------------------
242242
243- For a simple example, take a model that has one field, "name." In your application you have a list of names you would like to add to the database:
244-
245- ::
243+ For a simple example, take a model that has one field, "name." In your application you
244+ have a list of names you would like to add to the database::
246245
247246 new_names = ["Austin", "Ali", "Jeff", "Marissa"]
248247
249- To quickly insert the names in one query, first construct a dict with the ``{"model_key": "value"} `` format.
250-
251- ::
248+ To quickly insert the names in one query, first construct a dict with the
249+ ``{"model_key": "value"} `` format::
252250
253251 new_names_dict = [dict(name=new_name) for new_name in new_names]
254252 >> [{'name': 'Austin'}, {'name': 'Ali'}, {'name': 'Jeff'}, {'name': 'Marissa'}]
255253
256- Finally, run an insert statement on the model.
257-
258- ::
254+ Finally, run an insert statement on the model::
259255
260256 await User.insert().gino.all(new_names_dict)
261257
258+
262259How to print the executed SQL?
263260------------------------------
264261
You can’t perform that action at this time.
0 commit comments