summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-03-02 05:43:08 (GMT)
committerEli Bendersky <eliben@gmail.com>2012-03-02 05:43:08 (GMT)
commitb2b18632ce5f8067b2925f4ba2cf783479759ab4 (patch)
tree9a7965bfb2967bd689541df6047463c32bd25461 /Doc
parent20293441da3ed1ee8e90de9747594090e27dca0e (diff)
parentf959618142888fab373c43edd35f20506a9740dc (diff)
downloadcpython-b2b18632ce5f8067b2925f4ba2cf783479759ab4.zip
cpython-b2b18632ce5f8067b2925f4ba2cf783479759ab4.tar.gz
cpython-b2b18632ce5f8067b2925f4ba2cf783479759ab4.tar.bz2
merge 3.2 heads
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sqlite3.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index f0fd86c..41db5c3 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -3,7 +3,7 @@
.. module:: sqlite3
:synopsis: A DB-API 2.0 implementation using SQLite 3.x.
-.. sectionauthor:: Gerhard Häring <gh@ghaering.de>
+.. sectionauthor:: Gerhard Häring <gh@ghaering.de>
SQLite is a C library that provides a lightweight disk-based database that
@@ -20,6 +20,7 @@ To use the module, you must first create a :class:`Connection` object that
represents the database. Here the data will be stored in the
:file:`/tmp/example` file::
+ import sqlite3
conn = sqlite3.connect('/tmp/example')
You can also supply the special name ``:memory:`` to create a database in RAM.
@@ -56,7 +57,7 @@ example::
# Never do this -- insecure!
symbol = 'IBM'
- c.execute("... where symbol = '%s'" % symbol)
+ c.execute("select * from stocks where symbol = '%s'" % symbol)
# Do this instead
t = (symbol,)
@@ -64,7 +65,7 @@ example::
# Larger example
for t in [('2006-03-28', 'BUY', 'IBM', 1000, 45.00),
- ('2006-04-05', 'BUY', 'MSOFT', 1000, 72.00),
+ ('2006-04-05', 'BUY', 'MSFT', 1000, 72.00),
('2006-04-06', 'SELL', 'IBM', 500, 53.00),
]:
c.execute('insert into stocks values (?,?,?,?,?)', t)
@@ -271,7 +272,6 @@ Connection Objects
calling the cursor method, then calls the cursor's :meth:`executemany
<Cursor.executemany>` method with the parameters given.
-
.. method:: Connection.executescript(sql_script)
This is a nonstandard shortcut that creates an intermediate cursor object by
@@ -376,22 +376,22 @@ Connection Objects
aggregates or whole new virtual table implementations. One well-known
extension is the fulltext-search extension distributed with SQLite.
+ Loadable extensions are disabled by default. See [#f1]_.
+
.. versionadded:: 3.2
.. literalinclude:: ../includes/sqlite3/load_extension.py
- Loadable extensions are disabled by default. See [#f1]_.
-
.. method:: Connection.load_extension(path)
This routine loads a SQLite extension from a shared library. You have to
enable extension loading with :meth:`enable_load_extension` before you can
use this routine.
- .. versionadded:: 3.2
-
Loadable extensions are disabled by default. See [#f1]_.
+ .. versionadded:: 3.2
+
.. attribute:: Connection.row_factory
You can change this attribute to a callable that accepts the cursor and the