New submission from Dave Sawyer:

The sqlite3.connect method has 6 parameters. 5 of them are documented.  See 
below and search for "check_same_thread".  Patch adds documentation for this 
parameter.

sqlite3.connect(database[, timeout, detect_types, isolation_level, 
check_same_thread, factory, cached_statements])
Opens a connection to the SQLite database file database. You can use ":memory:" 
to open a database connection to a database that resides in RAM instead of on 
disk.

When a database is accessed by multiple connections, and one of the processes 
modifies the database, the SQLite database is locked until that transaction is 
committed. The timeout parameter specifies how long the connection should wait 
for the lock to go away until raising an exception. The default for the timeout 
parameter is 5.0 (five seconds).

For the isolation_level parameter, please see the Connection.isolation_level 
property of Connection objects.

SQLite natively supports only the types TEXT, INTEGER, REAL, BLOB and NULL. If 
you want to use other types you must add support for them yourself. The 
detect_types parameter and the using custom converters registered with the 
module-level register_converter() function allow you to easily do that.

detect_types defaults to 0 (i. e. off, no type detection), you can set it to 
any combination of PARSE_DECLTYPES and PARSE_COLNAMES to turn type detection on.

By default, the sqlite3 module uses its Connection class for the connect call. 
You can, however, subclass the Connection class and make connect() use your 
class instead by providing your class for the factory parameter.

Consult the section SQLite and Python types of this manual for details.

The sqlite3 module internally uses a statement cache to avoid SQL parsing 
overhead. If you want to explicitly set the number of statements that are 
cached for the connection, you can set the cached_statements parameter. The 
currently implemented default is to cache 100 statements.

----------
assignee: docs@python
components: Documentation
files: doc_parm.patch
keywords: patch
messages: 266281
nosy: Dave Sawyer, docs@python
priority: normal
severity: normal
status: open
title: sqlite3 open parameter "check_same_thread" not documented
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42978/doc_parm.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27113>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to