]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] Docs: normalize SQL style in sqlite3 docs (GH-96403). (#96409)
authorErlend E. Aasland <erlend.aasland@protonmail.com>
Tue, 30 Aug 2022 08:35:21 +0000 (10:35 +0200)
committerGitHub <noreply@github.com>
Tue, 30 Aug 2022 08:35:21 +0000 (10:35 +0200)
(cherry picked from commit 6d403e264a7dcd1544a91708f139c6dd8612204d)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Doc/library/sqlite3.rst

index 6d9f929fb59070179731deee5ca9d64c9a6ee0a4..18a03a26e29e67600ab828ae1eeb79925260cb8b 100644 (file)
@@ -964,7 +964,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, /)
 
@@ -982,11 +982,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;
          """)