sqlite3
index
/usr/lib/python3.6/sqlite3/__init__.py

# pysqlite2/__init__.py: the pysqlite2 package.
#
# Copyright (C) 2005 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty.  In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
#    claim that you wrote the original software. If you use this software
#    in a product, an acknowledgment in the product documentation would be
#    appreciated but is not required.
# 2. Altered source versions must be plainly marked as such, and must not be
#    misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.

 
Package Contents
       
dbapi2
dump

 
Classes
       
builtins.Exception(builtins.BaseException)
Error
DatabaseError
DataError
IntegrityError
InternalError
NotSupportedError
OperationalError
ProgrammingError
InterfaceError
Warning
builtins.object
Cache
Connection
Cursor
PrepareProtocol
Row
Statement

 
class Cache(builtins.object)
     Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
display(...)
For debugging only.
get(...)
Gets an entry from the cache or calls the factory function to produce one.

 
class Connection(builtins.object)
    SQLite database connection object.
 
  Methods defined here:
__call__(self, /, *args, **kwargs)
Call self as a function.
__enter__(...)
For context manager. Non-standard.
__exit__(...)
For context manager. Non-standard.
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
close(...)
Closes the connection.
commit(...)
Commit the current transaction.
create_aggregate(...)
Creates a new aggregate. Non-standard.
create_collation(...)
Creates a collation function. Non-standard.
create_function(...)
Creates a new function. Non-standard.
cursor(...)
Return a cursor for the connection.
enable_load_extension(...)
Enable dynamic loading of SQLite extension modules. Non-standard.
execute(...)
Executes a SQL statement. Non-standard.
executemany(...)
Repeatedly executes a SQL statement. Non-standard.
executescript(...)
Executes a multiple SQL statements at once. Non-standard.
interrupt(...)
Abort any pending database operation. Non-standard.
iterdump(...)
Returns iterator to the dump of the database in an SQL text format. Non-standard.
load_extension(...)
Load SQLite extension module. Non-standard.
rollback(...)
Roll back the current transaction.
set_authorizer(...)
Sets authorizer callback. Non-standard.
set_progress_handler(...)
Sets progress handler callback. Non-standard.
set_trace_callback(...)
Sets a trace callback called for each SQL statement (passed as unicode). Non-standard.

Data descriptors defined here:
DataError
DatabaseError
Error
IntegrityError
InterfaceError
InternalError
NotSupportedError
OperationalError
ProgrammingError
Warning
in_transaction
isolation_level
row_factory
text_factory
total_changes

 
class Cursor(builtins.object)
    SQLite database cursor class.
 
  Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__iter__(self, /)
Implement iter(self).
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
__next__(self, /)
Implement next(self).
close(...)
Closes the cursor.
execute(...)
Executes a SQL statement.
executemany(...)
Repeatedly executes a SQL statement.
executescript(...)
Executes a multiple SQL statements at once. Non-standard.
fetchall(...)
Fetches all rows from the resultset.
fetchmany(...)
Fetches several rows from the resultset.
fetchone(...)
Fetches one row from the resultset.
setinputsizes(...)
Required by DB-API. Does nothing in pysqlite.
setoutputsize(...)
Required by DB-API. Does nothing in pysqlite.

Data descriptors defined here:
arraysize
connection
description
lastrowid
row_factory
rowcount

 
class DataError(DatabaseError)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
DataError
DatabaseError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class DatabaseError(Error)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
DatabaseError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class Error(builtins.Exception)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class IntegrityError(DatabaseError)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
IntegrityError
DatabaseError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class InterfaceError(Error)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
InterfaceError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class InternalError(DatabaseError)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
InternalError
DatabaseError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class NotSupportedError(DatabaseError)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
NotSupportedError
DatabaseError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class OperationalError(DatabaseError)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
OperationalError
DatabaseError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class PrepareProtocol(builtins.object)
     Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

 
class ProgrammingError(DatabaseError)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
ProgrammingError
DatabaseError
Error
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class Row(builtins.object)
     Methods defined here:
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__getitem__(self, key, /)
Return self[key].
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__iter__(self, /)
Implement iter(self).
__le__(self, value, /)
Return self<=value.
__len__(self, /)
Return len(self).
__lt__(self, value, /)
Return self<value.
__ne__(self, value, /)
Return self!=value.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
keys(...)
Returns the keys of the row.

 
class Statement(builtins.object)
     Methods defined here:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

 
class Warning(builtins.Exception)
    Common base class for all non-exit exceptions.
 
 
Method resolution order:
Warning
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.Exception:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__delattr__(self, name, /)
Implement delattr(self, name).
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
helper for pickle
__repr__(self, /)
Return repr(self).
__setattr__(self, name, value, /)
Implement setattr(self, name, value).
__setstate__(...)
__str__(self, /)
Return str(self).
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
Functions
       
adapt(...)
adapt(obj, protocol, alternate) -> adapt obj to given protocol. Non-standard.
complete_statement(...)
complete_statement(sql)
 
Checks if a string contains a complete SQL statement. Non-standard.
connect(...)
connect(database[, timeout, detect_types, isolation_level,
        check_same_thread, factory, cached_statements, uri])
 
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.
enable_callback_tracebacks(...)
enable_callback_tracebacks(flag)
 
Enable or disable callback functions throwing errors to stderr.
enable_shared_cache(...)
enable_shared_cache(do_enable)
 
Enable or disable shared cache mode for the calling thread.
Experimental/Non-standard.
register_adapter(...)
register_adapter(type, callable)
 
Registers an adapter with pysqlite's adapter registry. Non-standard.
register_converter(...)
register_converter(typename, callable)
 
Registers a converter with pysqlite. Non-standard.

 
Data
        PARSE_COLNAMES = 2
PARSE_DECLTYPES = 1
SQLITE_ALTER_TABLE = 26
SQLITE_ANALYZE = 28
SQLITE_ATTACH = 24
SQLITE_CREATE_INDEX = 1
SQLITE_CREATE_TABLE = 2
SQLITE_CREATE_TEMP_INDEX = 3
SQLITE_CREATE_TEMP_TABLE = 4
SQLITE_CREATE_TEMP_TRIGGER = 5
SQLITE_CREATE_TEMP_VIEW = 6
SQLITE_CREATE_TRIGGER = 7
SQLITE_CREATE_VIEW = 8
SQLITE_DELETE = 9
SQLITE_DENY = 1
SQLITE_DETACH = 25
SQLITE_DROP_INDEX = 10
SQLITE_DROP_TABLE = 11
SQLITE_DROP_TEMP_INDEX = 12
SQLITE_DROP_TEMP_TABLE = 13
SQLITE_DROP_TEMP_TRIGGER = 14
SQLITE_DROP_TEMP_VIEW = 15
SQLITE_DROP_TRIGGER = 16
SQLITE_DROP_VIEW = 17
SQLITE_IGNORE = 2
SQLITE_INSERT = 18
SQLITE_OK = 0
SQLITE_PRAGMA = 19
SQLITE_READ = 20
SQLITE_REINDEX = 27
SQLITE_SELECT = 21
SQLITE_TRANSACTION = 22
SQLITE_UPDATE = 23
adapters = {(<class 'datetime.date'>, <class 'sqlite3.PrepareProtocol'>): <function register_adapters_and_converters.<locals>.adapt_date>, (<class 'datetime.datetime'>, <class 'sqlite3.PrepareProtocol'>): <function register_adapters_and_converters.<locals>.adapt_datetime>}
apilevel = '2.0'
converters = {'DATE': <function register_adapters_and_converters.<locals>.convert_date>, 'TIMESTAMP': <function register_adapters_and_converters.<locals>.convert_timestamp>}
paramstyle = 'qmark'
sqlite_version = '3.22.0'
sqlite_version_info = (3, 22, 0)
threadsafety = 1
version = '2.6.0'
version_info = (2, 6, 0)