File tree Expand file tree Collapse file tree 2 files changed +16
-38
lines changed Expand file tree Collapse file tree 2 files changed +16
-38
lines changed Load Diff This file was deleted. 
Original file line number Diff line number Diff line change @@ -222,14 +222,22 @@ Module functions
222222
223223.. function :: complete_statement(statement) 
224224
225-    Returns ``True `` if the string *statement * contains one or more complete SQL
226-    statements terminated by semicolons. It does not verify that the SQL is
227-    syntactically correct, only that there are no unclosed string literals and the
228-    statement is terminated by a semicolon.
229- 
230-    This can be used to build a shell for SQLite, as in the following example:
231- 
232-    .. literalinclude :: ../includes/sqlite3/complete_statement.py 
225+    Return ``True `` if the string *statement * appears to contain
226+    one or more complete SQL statements.
227+    No syntactic verification or parsing of any kind is performed,
228+    other than checking that there are no unclosed string literals
229+    and the statement is terminated by a semicolon.
230+ 
231+    For example::
232+ 
233+       >>> sqlite3.complete_statement("SELECT foo FROM bar;") 
234+       True 
235+       >>> sqlite3.complete_statement("SELECT foo") 
236+       False 
237+ 
238+    This function may be useful during command-line input
239+    to determine if the entered text seems to form a complete SQL statement,
240+    or if additional input is needed before calling :meth: `~Cursor.execute `.
233241
234242.. function :: enable_callback_tracebacks(flag, /) 
235243
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments