Lines Matching refs:sqlite3
1 :mod:`sqlite3` --- DB-API 2.0 interface for SQLite databases
4 .. module:: sqlite3
18 The sqlite3 module was written by Gerhard Häring. It provides a SQL interface
25 import sqlite3
26 conn = sqlite3.connect('example.db')
51 import sqlite3
52 conn = sqlite3.connect('example.db')
101 The pysqlite web page -- sqlite3 is developed externally under the name
144 Setting it makes the :mod:`sqlite3` module parse the declared type for each
191 By default, the :mod:`sqlite3` module uses its :class:`Connection` class for the
196 Consult the section :ref:`sqlite3-types` of this manual for details.
198 The :mod:`sqlite3` module internally uses a statement cache to avoid SQL parsing
231 .. literalinclude:: ../includes/sqlite3/complete_statement.py
256 :ref:`sqlite3-controlling-transactions` for a more detailed explanation.
315 .. literalinclude:: ../includes/sqlite3/md5func.py
331 .. literalinclude:: ../includes/sqlite3/mysumaggr.py
347 .. literalinclude:: ../includes/sqlite3/collation_reverse.py
368 :mod:`sqlite3` module.
379 one. All necessary constants are available in the :mod:`sqlite3` module.
406 .. literalinclude:: ../includes/sqlite3/load_extension.py
427 .. literalinclude:: ../includes/sqlite3/row_factory.py
431 highly-optimized :class:`sqlite3.Row` type. :class:`Row` provides both
443 :mod:`sqlite3` module will return Unicode objects for ``TEXT``. If you want to
448 :const:`sqlite3.OptimizedUnicode`.
455 .. literalinclude:: ../includes/sqlite3/text_factory.py
468 the same capabilities as the :kbd:`.dump` command in the :program:`sqlite3`
476 import sqlite3, os
478 con = sqlite3.connect('existing_db.db')
496 placeholders instead of SQL literals). The :mod:`sqlite3` module supports two
502 .. literalinclude:: ../includes/sqlite3/execute_1.py
513 the sequence *sql*. The :mod:`sqlite3` module also allows using an
516 .. literalinclude:: ../includes/sqlite3/executemany_1.py
520 .. literalinclude:: ../includes/sqlite3/executemany_2.py
533 .. literalinclude:: ../includes/sqlite3/executescript.py
567 Although the :class:`Cursor` class of the :mod:`sqlite3` module implements this
605 >>> con = sqlite3.connect(":memory:")
639 conn = sqlite3.connect(":memory:")
651 >>> conn.row_factory = sqlite3.Row
654 <sqlite3.Cursor object at 0x7f4e7dd8fa80>
657 <type 'sqlite3.Row'>
728 The type system of the :mod:`sqlite3` module is extensible in two ways: you can
730 you can let the :mod:`sqlite3` module convert SQLite types to different Python
739 sqlite3 module's supported types for SQLite: one of NoneType, int, long, float,
742 There are two ways to enable the :mod:`sqlite3` module to adapt a custom Python
762 .. literalinclude:: ../includes/sqlite3/adapter_point_1.py
776 .. literalinclude:: ../includes/sqlite3/adapter_point_2.py
778 The :mod:`sqlite3` module has two default adapters for Python's built-in
783 .. literalinclude:: ../includes/sqlite3/adapter_datetime.py
811 Now you need to make the :mod:`sqlite3` module know that what you select from
818 Both ways are described in section :ref:`sqlite3-module-contents`, in the entries
823 .. literalinclude:: ../includes/sqlite3/converter_point.py
842 .. literalinclude:: ../includes/sqlite3/pysqlite_datetime.py
854 By default, the :mod:`sqlite3` module opens transactions implicitly before a
861 ...``, ``VACUUM``, ``PRAGMA``, the :mod:`sqlite3` module will commit implicitly
864 is that sqlite3 needs to keep track of the transaction state (if a transaction
867 You can control which kind of ``BEGIN`` statements sqlite3 implicitly executes
879 Using :mod:`sqlite3` efficiently
894 .. literalinclude:: ../includes/sqlite3/shortcut_methods.py
900 One useful feature of the :mod:`sqlite3` module is the built-in
901 :class:`sqlite3.Row` class designed to be used as a row factory.
906 .. literalinclude:: ../includes/sqlite3/rowclass.py
919 .. literalinclude:: ../includes/sqlite3/ctx_manager.py
937 .. [#f1] The sqlite3 module is not built with loadable extension support by