Doc updates

This commit is contained in:
adustman
2002-02-25 05:42:03 +00:00
parent 5fb120b446
commit 24081f4e13
2 changed files with 56 additions and 21 deletions

View File

@@ -49,7 +49,7 @@
The connection string used for Z MySQL Database Connection
is of the form:
<pre>
[+/-]database[@host[:port]] [user [password [unix_socket]]]
[*lock] [+/-]database[@host[:port]] [user [password [unix_socket]]]
</pre>
or typically:
<pre>
@@ -57,17 +57,33 @@
</pre>
to use a MySQL server on localhost via the standard UNIX socket.
Only specify host if the server is on a remote system. You can
use a non-standard port, if necessary. If the UNIX socket is in
a non-standard location, you can specify the full path to it
after the password. A '-' in front of the database tells ZMySQLDA
to not use Zope's Transaction Manager, even if the server supports
transactions. A '+' in front of the database tells ZMySQLDA that
it must use transactions; an exception will be raised if they are
not supported by the server. If neither '-' or '+' are present,
then transactions will be enabled if the server supports them.
If you are using non-transaction safe tables (TSTs) on a server that
use a non-standard port, if necessary. Hint: To use a non-standard
port on the local system, use 127.0.0.1 for the host instead of
localhost.
<p>
If the UNIX socket is in a non-standard location, you can specify
the full path to it after the password.
<p>
A '-' in front of the database tells ZMySQLDA to not use Zope's
Transaction Manager, even if the server supports transactions. A
'+' in front of the database tells ZMySQLDA that it must use
transactions; an exception will be raised if they are not
supported by the server. If neither '-' or '+' are present, then
transactions will be enabled if the server supports them. If you
are using non-transaction safe tables (TSTs) on a server that
supports TSTs, use '-'. If you require transactions, use '+'. If
you aren't sure, don't use either.
<p>
*<em>lock</em> at the begining of the connection string means to
psuedo-transactional. When the transaction begins, it will acquire
a lock on the server named <em>lock</em> (i.e. MYLOCK). When the
transaction commits, the lock will be released. If the transaction
is aborted and restarted, which can happen due to a ConflictError,
you'll get an error in the logs, and inconsistent data. In this
respect, it's equivalent to transactions turned off.
<p>
Transactions are highly recommended. Using a named lock in
conjunctions with transactions is probably pointless.
</dd></dl>
</body>

View File

@@ -19,18 +19,37 @@ def manage_addZMySQLConnection(self, id, title,
'database user password'
to use a MySQL server on localhost via the standard UNIX socket.
Only specify host if the server is on a remote system. You can
use a non-standard port, if necessary. If the UNIX socket is in
a non-standard location, you can specify the full path to it
after the password. Transactions will be used if the server
supports them. If you are using non-transaction-safe tables,
a '-' at the beginning will disable transactions. If you want to
be sure transactions are used, a '+' at the beginning will
forcibly enable transactions; an exception will be raised if
the server does not support transactions.
to use a MySQL server on localhost via the standard UNIX
socket. Only specify host if the server is on a remote
system. You can use a non-standard port, if necessary. If the
UNIX socket is in a non-standard location, you can specify the
full path to it after the password. Hint: To use a
non-standard port on the local system, use 127.0.0.1 for the
host instead of localhost.
A '-' in front of the database tells ZMySQLDA to not use
Zope's Transaction Manager, even if the server supports
transactions. A '+' in front of the database tells ZMySQLDA
that it must use transactions; an exception will be raised if
they are not supported by the server. If neither '-' or '+'
are present, then transactions will be enabled if the server
supports them. If you are using non-transaction safe tables
(TSTs) on a server that supports TSTs, use '-'. If you require
transactions, use '+'. If you aren't sure, don't use either.
"""
*lock at the begining of the connection string means to
psuedo-transactional. When the transaction begins, it will
acquire a lock on the server named lock (i.e. MYLOCK). When
the transaction commits, the lock will be released. If the
transaction is aborted and restarted, which can happen due to
a ConflictError, you'll get an error in the logs, and
inconsistent data. In this respect, it's equivalent to
transactions turned off.
Transactions are highly recommended. Using a named lock in
conjunctions with transactions is probably pointless.
"""
class Connection:
"""MySQL Connection Object"""