Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4d2bfb5e
Commit
4d2bfb5e
authored
Mar 01, 2012
by
Petri Lehtinen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqlite3: Port documentation changes from the 2.7 branch
Issue #13491.
parent
bbe2f60b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Doc/library/sqlite3.rst
Doc/library/sqlite3.rst
+8
-8
No files found.
Doc/library/sqlite3.rst
View file @
4d2bfb5e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
.. module:: sqlite3
.. module:: sqlite3
:synopsis: A DB-API 2.0 implementation using SQLite 3.x.
: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
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
...
@@ -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
represents the database. Here the data will be stored in the
:file:`/tmp/example` file::
:file:`/tmp/example` file::
import sqlite3
conn = sqlite3.connect('/tmp/example')
conn = sqlite3.connect('/tmp/example')
You can also supply the special name ``:memory:`` to create a database in RAM.
You can also supply the special name ``:memory:`` to create a database in RAM.
...
@@ -56,7 +57,7 @@ example::
...
@@ -56,7 +57,7 @@ example::
# Never do this -- insecure!
# Never do this -- insecure!
symbol = 'IBM'
symbol = 'IBM'
c.execute("
...
where symbol = '%s'" % symbol)
c.execute("
select * from stocks
where symbol = '%s'" % symbol)
# Do this instead
# Do this instead
t = (symbol,)
t = (symbol,)
...
@@ -64,7 +65,7 @@ example::
...
@@ -64,7 +65,7 @@ example::
# Larger example
# Larger example
for t in [('2006-03-28', 'BUY', 'IBM', 1000, 45.00),
for t in [('2006-03-28', 'BUY', 'IBM', 1000, 45.00),
('2006-04-05', 'BUY', 'MS
O
FT', 1000, 72.00),
('2006-04-05', 'BUY', 'MSFT', 1000, 72.00),
('2006-04-06', 'SELL', 'IBM', 500, 53.00),
('2006-04-06', 'SELL', 'IBM', 500, 53.00),
]:
]:
c.execute('insert into stocks values (?,?,?,?,?)', t)
c.execute('insert into stocks values (?,?,?,?,?)', t)
...
@@ -271,7 +272,6 @@ Connection Objects
...
@@ -271,7 +272,6 @@ Connection Objects
calling the cursor method, then calls the cursor's :meth:`executemany
calling the cursor method, then calls the cursor's :meth:`executemany
<Cursor.executemany>` method with the parameters given.
<Cursor.executemany>` method with the parameters given.
.. method:: Connection.executescript(sql_script)
.. method:: Connection.executescript(sql_script)
This is a nonstandard shortcut that creates an intermediate cursor object by
This is a nonstandard shortcut that creates an intermediate cursor object by
...
@@ -376,22 +376,22 @@ Connection Objects
...
@@ -376,22 +376,22 @@ Connection Objects
aggregates or whole new virtual table implementations. One well-known
aggregates or whole new virtual table implementations. One well-known
extension is the fulltext-search extension distributed with SQLite.
extension is the fulltext-search extension distributed with SQLite.
Loadable extensions are disabled by default. See [#f1]_.
.. versionadded:: 3.2
.. versionadded:: 3.2
.. literalinclude:: ../includes/sqlite3/load_extension.py
.. literalinclude:: ../includes/sqlite3/load_extension.py
Loadable extensions are disabled by default. See [#f1]_.
.. method:: Connection.load_extension(path)
.. method:: Connection.load_extension(path)
This routine loads a SQLite extension from a shared library. You have to
This routine loads a SQLite extension from a shared library. You have to
enable extension loading with :meth:`enable_load_extension` before you can
enable extension loading with :meth:`enable_load_extension` before you can
use this routine.
use this routine.
.. versionadded:: 3.2
Loadable extensions are disabled by default. See [#f1]_.
Loadable extensions are disabled by default. See [#f1]_.
.. versionadded:: 3.2
.. attribute:: Connection.row_factory
.. attribute:: Connection.row_factory
You can change this attribute to a callable that accepts the cursor and the
You can change this attribute to a callable that accepts the cursor and the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment