diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2022-08-29 22:50:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 22:50:42 (GMT) |
commit | 6d403e264a7dcd1544a91708f139c6dd8612204d (patch) | |
tree | f7ccd046e6f44846254d72a18f60f6b93fcbbcec /Doc/library | |
parent | 6324b135acb92042017c2364540c37426b0ea65f (diff) | |
download | cpython-6d403e264a7dcd1544a91708f139c6dd8612204d.zip cpython-6d403e264a7dcd1544a91708f139c6dd8612204d.tar.gz cpython-6d403e264a7dcd1544a91708f139c6dd8612204d.tar.bz2 |
Docs: normalize SQL style in sqlite3 docs (#96403)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/sqlite3.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index f6a86e6..31a0e7f 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -387,7 +387,7 @@ Module functions ... print(f"Error message: {unraisable.err_msg}") >>> import sys >>> sys.unraisablehook = debug - >>> cur = con.execute("select 1") + >>> cur = con.execute("SELECT 1") ZeroDivisionError('division by zero') in callback evil_trace Error message: None @@ -1219,7 +1219,7 @@ Cursor objects ("row2",), ] # cur is an sqlite3.Cursor object - cur.executemany("insert into data values(?)", rows) + cur.executemany("INSERT INTO data VALUES(?)", rows) .. method:: executescript(sql_script, /) @@ -1237,11 +1237,11 @@ Cursor objects # 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; + BEGIN; + CREATE TABLE person(firstname, lastname, age); + CREATE TABLE book(title, author, published); + CREATE TABLE publisher(name, address); + COMMIT; """) |