Skip to content

Commit

Permalink
gh-95273: Condense sqlite3 executescript example (GH-95383) (#95419)
Browse files Browse the repository at this point in the history
(cherry picked from commit e9c8de6)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
  • Loading branch information
miss-islington and Erlend Egeberg Aasland committed Jul 29, 2022
1 parent f59a5c5 commit 2278dc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
25 changes: 0 additions & 25 deletions Doc/includes/sqlite3/executescript.py

This file was deleted.

11 changes: 9 additions & 2 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,16 @@ Cursor Objects

*sql_script* must be a :class:`string <str>`.

Example:
Example::

.. literalinclude:: ../includes/sqlite3/executescript.py
# cur is an sqlite3.Cursor object
cur.executescript("""
begin;
create table person(firstname, lastname, age);
create table book(title, author, published);
create table publisher(name, address);
commit;
""")


.. method:: fetchone()
Expand Down

0 comments on commit 2278dc7

Please sign in to comment.