1 Connect Strings

When calling PyDO.PyDBI.DBIInitAlias, you have to specify a connect string. If you are using PyDO from within the SkunkWeb server, use the caching versions of the connect strings so that connections get rolled back properly in the event of an error. Obviously, if you dont have the pylib modules required for the caching versions, use the direct methods.

For Oracle, they take one of two forms (either can optionally have |verbose appended to them to log the sql executed by the connection):

pydo:oracle:user|cache
uses the connection caching of the Oracle pylib that is used by the oracle SkunkWeb service.
pydo:oracle:user/pw@host
use the DCOracle module directly.

For PostgreSQL, they also take one of two forms (either can optionally have :verbose appended to them to log the sql executed by the connection):

pydo:postgresql:user:cache
uses the connection caching of the PostgreSql pylib that is used by the postgresql SkunkWeb service.
pydo:postgresql:normal_postgresql_connstr
use the pgdb module directly. In addition, if, in lieu of the host portion of the normal PostgreSQL connection string you put host|port instead, it will connect to the database listening on the port port instead of the default port.

For MySQL, they can take one of a few forms:

pydo:mysql:normal_mysql_connect_string
use the MySQL module directly. To use a cached connection (maintained by the mysql SkunkWeb Service, just use pydo:mysql:::::name where name is the connection name from the MySQLConnectParams configuration variable in sw.conf.