Skip to content

Commit 6eae15a

Browse files
miss-islingtonErlend Egeberg Aasland
and
Erlend Egeberg Aasland
authored
gh-95273: Condense sqlite3 executescript example (GH-95383)
(cherry picked from commit e9c8de6) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
1 parent 3e9a496 commit 6eae15a

File tree

2 files changed

+9
-27
lines changed

2 files changed

+9
-27
lines changed

Doc/includes/sqlite3/executescript.py

-25
This file was deleted.

Doc/library/sqlite3.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -997,9 +997,16 @@ Cursor Objects
997997

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

1000-
Example:
1000+
Example::
10011001

1002-
.. literalinclude:: ../includes/sqlite3/executescript.py
1002+
# cur is an sqlite3.Cursor object
1003+
cur.executescript("""
1004+
begin;
1005+
create table person(firstname, lastname, age);
1006+
create table book(title, author, published);
1007+
create table publisher(name, address);
1008+
commit;
1009+
""")
10031010

10041011

10051012
.. method:: fetchone()

0 commit comments

Comments
 (0)