Skip to content

Commit

Permalink
gh-95273: Condense sqlite3 executescript example (#95383)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erlend Egeberg Aasland authored Jul 29, 2022
1 parent 3e7cad3 commit e9c8de6
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 @@ -1007,9 +1007,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 e9c8de6

Please sign in to comment.