Lines Matching refs:sqlite3
1 :mod:`sqlite3` --- DB-API 2.0 interface for SQLite databases
4 .. module:: sqlite3
9 **Source code:** :source:`Lib/sqlite3/`
20 The sqlite3 module was written by Gerhard Häring. It provides a SQL interface
27 import sqlite3
28 conn = sqlite3.connect('example.db')
53 import sqlite3
54 conn = sqlite3.connect('example.db')
103 The pysqlite web page -- sqlite3 is developed externally under the name
150 Setting it makes the :mod:`sqlite3` module parse the declared type for each
206 By default, the :mod:`sqlite3` module uses its :class:`Connection` class for the
211 Consult the section :ref:`sqlite3-types` of this manual for details.
213 The :mod:`sqlite3` module internally uses a statement cache to avoid SQL parsing
222 db = sqlite3.connect('file:path/to/database?mode=ro', uri=True)
261 .. literalinclude:: ../includes/sqlite3/complete_statement.py
286 :ref:`sqlite3-controlling-transactions` for a more detailed explanation.
353 .. literalinclude:: ../includes/sqlite3/md5func.py
370 .. literalinclude:: ../includes/sqlite3/mysumaggr.py
386 .. literalinclude:: ../includes/sqlite3/collation_reverse.py
407 :mod:`sqlite3` module.
418 one. All necessary constants are available in the :mod:`sqlite3` module.
463 .. literalinclude:: ../includes/sqlite3/load_extension.py
484 .. literalinclude:: ../includes/sqlite3/row_factory.py
488 highly-optimized :class:`sqlite3.Row` type. :class:`Row` provides both
500 :mod:`sqlite3` module will return Unicode objects for ``TEXT``. If you want to
508 .. literalinclude:: ../includes/sqlite3/text_factory.py
521 the same capabilities as the :kbd:`.dump` command in the :program:`sqlite3`
527 import sqlite3
529 con = sqlite3.connect('existing_db.db')
563 import sqlite3
568 con = sqlite3.connect('existing_db.db')
569 with sqlite3.connect('backup.db') as bck:
574 import sqlite3
576 source = sqlite3.connect('existing_db.db')
577 dest = sqlite3.connect(':memory:')
600 placeholders instead of SQL literals). The :mod:`sqlite3` module supports two
606 .. literalinclude:: ../includes/sqlite3/execute_1.py
617 the sequence *seq_of_parameters*. The :mod:`sqlite3` module also allows
620 .. literalinclude:: ../includes/sqlite3/executemany_1.py
624 .. literalinclude:: ../includes/sqlite3/executemany_2.py
637 .. literalinclude:: ../includes/sqlite3/executescript.py
677 Although the :class:`Cursor` class of the :mod:`sqlite3` module implements this
727 >>> con = sqlite3.connect(":memory:")
759 conn = sqlite3.connect(":memory:")
771 >>> conn.row_factory = sqlite3.Row
774 <sqlite3.Cursor object at 0x7f4e7dd8fa80>
777 <class 'sqlite3.Row'>
888 The type system of the :mod:`sqlite3` module is extensible in two ways: you can
890 you can let the :mod:`sqlite3` module convert SQLite types to different Python
899 sqlite3 module's supported types for SQLite: one of NoneType, int, float,
902 There are two ways to enable the :mod:`sqlite3` module to adapt a custom Python
922 .. literalinclude:: ../includes/sqlite3/adapter_point_1.py
931 .. literalinclude:: ../includes/sqlite3/adapter_point_2.py
933 The :mod:`sqlite3` module has two default adapters for Python's built-in
938 .. literalinclude:: ../includes/sqlite3/adapter_datetime.py
966 Now you need to make the :mod:`sqlite3` module know that what you select from
973 Both ways are described in section :ref:`sqlite3-module-contents`, in the entries
978 .. literalinclude:: ../includes/sqlite3/converter_point.py
997 .. literalinclude:: ../includes/sqlite3/pysqlite_datetime.py
1009 The underlying ``sqlite3`` library operates in ``autocommit`` mode by default,
1010 but the Python :mod:`sqlite3` module by default does not.
1017 The Python :mod:`sqlite3` module by default issues a ``BEGIN`` statement
1021 You can control which kind of ``BEGIN`` statements :mod:`sqlite3` implicitly
1028 You can disable the :mod:`sqlite3` module's implicit transaction management by
1030 ``sqlite3`` library operating in ``autocommit`` mode. You can then completely
1035 :mod:`sqlite3` used to implicitly commit an open transaction before DDL
1039 Using :mod:`sqlite3` efficiently
1054 .. literalinclude:: ../includes/sqlite3/shortcut_methods.py
1060 One useful feature of the :mod:`sqlite3` module is the built-in
1061 :class:`sqlite3.Row` class designed to be used as a row factory.
1066 .. literalinclude:: ../includes/sqlite3/rowclass.py
1077 .. literalinclude:: ../includes/sqlite3/ctx_manager.py
1095 .. [#f1] The sqlite3 module is not built with loadable extension support by