8000 gh-95273: Improve sqlite3.complete_statement docs by erlend-aasland · Pull Request #95840 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95273: Improve sqlite3.complete_statement docs #95840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review
  • Loading branch information
erlend-aasland committed Aug 10, 2022
commit 31b60fb0e6e53e2b6258b2905e0145d2dc25d194
11 changes: 6 additions & 5 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,15 @@ Module functions

.. function:: complete_statement(statement)

Return ``True`` if the string *statement* appears to contain one or more
complete SQL statements terminated by semicolons.
No syntactic verification or parsing of any kind is performed.
Return ``True`` if the string *statement* appears to contain
one or more complete SQL statements.
No syntactic verification or parsing of any kind is performed,
other than checking that there are no unclosed string literals
and the statment is terminated by a semicolon.

This function may be useful during command-line input
to determine if the entered text seems to form a complete SQL statement,
or if additional input is needed before :meth:`executing <Cursor.execute>`
the statement.
or if additional input is needed before calling :meth:`~Cursor.execute`.

See :source:`Lib/sqlite3/__main__.py` for example use.

Expand Down
0