[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces - rdb.py:1.4
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Aug 19 04:10:18 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/interfaces
In directory cvs.zope.org:/tmp/cvs-serv15967/interfaces
Modified Files:
rdb.py
Log Message:
Heads up, this is the beginning of Servicegeddon. We noticed that named
components are a pain in the butt and that we can simpluify our code a lot
by making these named components local utilities.
So I started with the SQL Connection service and database adapters and
simplified the code greatly. Database Adaptors are now just simple
utilities.
I also took the oppurtunity and updated all database adapters.
This change is not backward compatible and you will have to toss your ZODB.
Although all tests pass, I expect there to be some hickups, so feel free to
fix or report these.
Next I will fix up the front screen a bit and try to factor some other
pieces. I also still miss some functionality in the Utilities, which I plan
to add.
=== Zope3/src/zope/app/interfaces/rdb.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/interfaces/rdb.py:1.3 Mon Jul 7 13:14:50 2003
+++ Zope3/src/zope/app/interfaces/rdb.py Tue Aug 19 03:09:43 2003
@@ -17,7 +17,8 @@
"""
from zope.interface import Interface
from zope.interface import Attribute
-
+from zope.schema import TextLine
+from zope.app.i18n import ZopeMessageIDFactory as _
class IDBITypeInfoProvider(Interface):
"""This object can get the Type Info for a particular DBI
@@ -382,6 +383,21 @@
def getDSN():
"""Get the DSN of the Adapter instance"""
+
+ dsn = TextLine(
+ title=_("DSN"),
+ description=_(
+ "Specify the DSN (Data Source Name) of the database. "
+ "Examples include:\n"
+ "\n"
+ "dbi://dbname\n"
+ "dbi://dbname;param1=value...\n"
+ "dbi://user:passwd/dbname\n"
+ "dbi://user:passwd/dbname;param1=value...\n"
+ "dbi://user:passwd@host:port/dbname\n"
+ "dbi://user:passwd@host:port/dbname;param1=value...\n"),
+ default=u"dbi://dbname",
+ required=True)
def connect():
"""Connect to the specified database."""
More information about the Zope3-Checkins
mailing list