diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-08-14 00:40:23 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-08-14 00:40:23 +0000 |
commit | 0285ec6beb695bf38ae5cccef8245e04fe5585a0 (patch) | |
tree | c35da2760042e2eae31e80a670e176ab83396362 /lib/sqlalchemy/engine/url.py | |
parent | e623c179da241c1f2bfd8ed5eeeea898d803ab52 (diff) | |
download | sqlalchemy-0285ec6beb695bf38ae5cccef8245e04fe5585a0.tar.gz |
added engine_from_config() function for helping to create_engine()
from an .ini style config
Diffstat (limited to 'lib/sqlalchemy/engine/url.py')
-rw-r--r-- | lib/sqlalchemy/engine/url.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index 98d4d442e..31546bae8 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -66,7 +66,17 @@ class URL(object): keys.sort() s += '?' + "&".join(["%s=%s" % (k, self.query[k]) for k in keys]) return s - + + def __eq__(self, other): + return \ + isinstance(other, URL) and \ + self.drivername == other.drivername and \ + self.username == other.username and \ + self.password == other.password and \ + self.host == other.host and \ + self.database == other.database and \ + self.query == other.query + def get_dialect(self): """Return the SQLAlchemy database dialect class corresponding to this URL's driver name.""" dialect=None |