diff options
| author | Jason Kirtland <jek@discorporate.us> | 2007-08-19 17:57:51 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2007-08-19 17:57:51 +0000 |
| commit | b714ebf49147d7fd1e0161df6861feff51470370 (patch) | |
| tree | 22e3783994fbd6b53863f3a71a1dc65bc39bee17 /lib/sqlalchemy/engine/url.py | |
| parent | 5a1db6658882efbeba99d5f079cec2fdab1d880b (diff) | |
| download | sqlalchemy-b714ebf49147d7fd1e0161df6861feff51470370.tar.gz | |
- Connection.begin() no longer accepts nested=True, a possible source of confusion as two forms of nesting are supported. SAVEPOINT-style nesting logic is now contained soley in begin_nested().
- Docstring love for the engine package. More is needed.
Diffstat (limited to 'lib/sqlalchemy/engine/url.py')
| -rw-r--r-- | lib/sqlalchemy/engine/url.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index 31546bae8..1f6f9eff4 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -1,4 +1,4 @@ -"""Provide the URL object as well as the make_url parsing function.""" +"""Provides URL facilities for specifying database connections.""" import re, cgi, sys, urllib from sqlalchemy import exceptions @@ -7,15 +7,16 @@ from sqlalchemy import exceptions class URL(object): """Represent the components of a URL used to connect to a database. - This object is suitable to be passed directly to a ``create_engine()`` - call. The fields of the URL are parsed from a string by the - ``module-level make_url()`` function. the string format of the URL is - an RFC-1738-style string. + This object is suitable to be passed directly to a + ``create_engine()`` call. The fields of the URL are parsed from a + string by the ``module-level make_url()`` function. the string + format of the URL is an RFC-1738-style string. Attributes on URL include: drivername - The name of the database backend. this name will correspond to a module in sqlalchemy/databases + the name of the database backend. This name will correspond to + a module in sqlalchemy/databases or a third party plug-in. username The user name for the connection. @@ -33,7 +34,8 @@ class URL(object): The database. query - A dictionary containing key/value pairs representing the URL's query string. + A dictionary containing key/value pairs representing the URL's + query string. """ def __init__(self, drivername, username=None, password=None, host=None, port=None, database=None, query=None): @@ -100,7 +102,7 @@ class URL(object): raise ImportError('unknown database %r' % self.drivername) def translate_connect_args(self, names): - """Translate this URL's attributes into a dictionary of connection arguments. + """Translate attributes into a dictionary of connection arguments. Given a list of argument names corresponding to the URL attributes (`host`, `database`, `username`, `password`, @@ -121,7 +123,7 @@ class URL(object): def make_url(name_or_url): """Given a string or unicode instance, produce a new URL instance. - The given string is parsed according to the rfc1738 spec. If an + The given string is parsed according to the RFC 1738 spec. If an existing URL object is passed, just returns the object. """ |
