> * WebKit/Application.py:
> New method: getDbConnection(), which returns
> a (pooled) database connection.
> Requires 3 new Application.config settings, e.g.:
> 'DbModule': 'PgSQL', # your fav DB-API v2.0 module
> 'DbConnect':'::mydb:me', # DB connection string
> 'DbConnections': 5, # concurrent connections
> Connections in the pool are closed at application
> shutdown, in the interest of database hygiene.
> I prefer this method over Cans, because it's simpler,
> it centralizes the DB stuff in one place, and it's the sort
> of natural functionality WebKit should support out of the box.
We connect to multiple databases. Can this be modified so that each
database is given a data source name (DSN) and so getDbConnection takes
the DSN as an argument? The config could look something like:
'dataSources': {
'billing': {
'DbModule': 'PgSQL',
'DbConnect': '::billing:me',
'DbConnections': 5,
},
'inventory': {
'DbModule': 'PgSQL',
'DbConnect': '::inventory:me',
'DbConnections': 5,
},
},
And used like:
dbB = app.getDbConnection('billing')
dbI = app.getDbConnection('inventory')
-Jeff
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss