summaryrefslogtreecommitdiff
path: root/sqlplain/doc/doc.py
diff options
context:
space:
mode:
authormichele.simionato <devnull@localhost>2009-03-20 10:45:59 +0000
committermichele.simionato <devnull@localhost>2009-03-20 10:45:59 +0000
commit3332b5c162b461494d29c1ea990e8ceab382517c (patch)
treef0beb6d91976351925a09cce3a86cfe7a679650a /sqlplain/doc/doc.py
parentb165b51cfe79a38e52070fee931fb1a2673a7f81 (diff)
downloadmicheles-3332b5c162b461494d29c1ea990e8ceab382517c.tar.gz
Lots of work in sqlplain, and renamed lazyconnect->connect
Diffstat (limited to 'sqlplain/doc/doc.py')
-rw-r--r--sqlplain/doc/doc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sqlplain/doc/doc.py b/sqlplain/doc/doc.py
index 67e3a43..65b0a07 100644
--- a/sqlplain/doc/doc.py
+++ b/sqlplain/doc/doc.py
@@ -95,8 +95,8 @@ Asimov. That can be done with the following code:
.. code-block:: python
- >> from sqlplain import lazyconnect
- >> bookdb = lazyconnect('mssql://pyadmin:secret@localhost/bookdb')
+ >> from sqlplain import connect
+ >> bookdb = connect('mssql://pyadmin:secret@localhost/bookdb')
>> bookdb.execute("SELECT * FROM book WHERE author LIKE :author",
('%Asimov%',))
@@ -267,7 +267,7 @@ However, if you are writing functional tests and you invoke them
with (say) nose_, you cannot use this pattern since ``sys.argv[1]``
is the name of the file to be tested. When writing nose tests it makes sense to
use a global lazy connection, instantiated at the top of your
-testing script, something like ``testdb = lazyconnect('testdb')`` where
+testing script, something like ``testdb = connect('testdb')`` where
``testdb`` is an alias to the database used for your automatic tests.
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/
@@ -283,7 +283,7 @@ with methods ``commit`` and ``rollback``
.. code-block:: python
- >> bookdb = lazyconnect('mssql://pyadmin:secret@localhost/bookdb',
+ >> bookdb = connect('mssql://pyadmin:secret@localhost/bookdb',
isolation_level='SERIALIZABLE')
Transactional connections have support the ``with`` statement,