[Checkins] SVN: relstorage/trunk/ Copied the ZConfig documentation of the storage options into README.
Shane Hathaway
shane at hathawaymix.org
Mon Sep 28 23:04:38 EDT 2009
Log message for revision 104594:
Copied the ZConfig documentation of the storage options into README.
Added the keep-history options to component.xml.
Changed:
U relstorage/trunk/CHANGES.txt
U relstorage/trunk/README.txt
U relstorage/trunk/relstorage/component.xml
U relstorage/trunk/relstorage/config.py
-=-
Modified: relstorage/trunk/CHANGES.txt
===================================================================
--- relstorage/trunk/CHANGES.txt 2009-09-28 19:03:07 UTC (rev 104593)
+++ relstorage/trunk/CHANGES.txt 2009-09-29 03:04:38 UTC (rev 104594)
@@ -6,6 +6,8 @@
to false to keep no history. (Packing is still required for
garbage collection and blob deletion.)
+- Copied the ZConfig documentation of the storage options into README.
+
- Renamed relstorage.py to storage.py to overcome import issues.
- Updated the patch for ZODB 3.7 and 3.8 to fix an issue with
Modified: relstorage/trunk/README.txt
===================================================================
--- relstorage/trunk/README.txt 2009-09-28 19:03:07 UTC (rev 104593)
+++ relstorage/trunk/README.txt 2009-09-29 03:04:38 UTC (rev 104594)
@@ -170,6 +170,101 @@
.. _migrate-to-1.0.txt: http://svn.zope.org/*checkout*/relstorage/trunk/notes/migrate-to-1.0.txt
+Adapter Options
+===============
+
+Common options
+--------------
+
+All of the adapters support the following options.
+
+keep-history
+
+ If this parameter is set to true (the default), the adapter
+ will create and use a history-preserving database schema,
+ similar to FileStorage. A history-preserving schema supports
+ ZODB-level undo, but grows more quickly and requires extensive
+ packing on a regular basis.
+
+ If this parameter is set to false, the adapter will create and
+ use a history-free database schema. Undo will not be supported,
+ but the database will not grow as quickly. The database will
+ still require regular garbage collection (which is accessible
+ through the database pack mechanism.)
+
+ This parameter must not change once the database schema has
+ been installed. If you want to convert between a
+ history-preserving and a history-free database, use the
+ zodbconvert utility to copy to a new database.
+
+PostgreSQL adapter options
+--------------------------
+
+In addition to the common options, the PostgreSQL adapter accepts:
+
+dsn
+
+ Specifies the data source name for connecting to PostgreSQL.
+ A PostgreSQL DSN is a list of parameters separated with
+ whitespace. A typical DSN looks like::
+
+ dbname='zodb' user='username' host='localhost' password='pass'
+
+ If dsn is omitted, the adapter will connect to a local database with
+ no password. Both the user and database name will match the
+ name of the owner of the current process.
+
+MySQL options
+-------------
+
+In addition to the common options, this adapter accepts most parameters
+supported by the MySQL-python library, including:
+
+host
+ string, host to connect
+user
+ string, user to connect as
+passwd
+ string, password to use
+db
+ string, database to use
+port
+ integer, TCP/IP port to connect to
+unix_socket
+ string, location of unix_socket (UNIX-ish only)
+conv
+ mapping, maps MySQL FIELD_TYPE.* to Python functions which convert a
+ string to the appropriate Python type
+connect_timeout
+ number of seconds to wait before the connection attempt fails.
+compress
+ if set, gzip compression is enabled
+named_pipe
+ if set, connect to server via named pipe (Windows only)
+init_command
+ command which is run once the connection is created
+read_default_file
+ see the MySQL documentation for mysql_options()
+read_default_group
+ see the MySQL documentation for mysql_options()
+client_flag
+ client flags from MySQLdb.constants.CLIENT
+load_infile
+ int, non-zero enables LOAD LOCAL INFILE, zero disables
+
+Oracle options
+--------------
+
+In addition to the common options, the Oracle adapter accepts:
+
+user
+ The Oracle account name
+password
+ The Oracle account password
+dsn
+ The Oracle data source name. The Oracle client library will
+ normally expect to find the DSN in /etc/oratab.
+
Optional Features
=================
Modified: relstorage/trunk/relstorage/component.xml
===================================================================
--- relstorage/trunk/relstorage/component.xml 2009-09-28 19:03:07 UTC (rev 104593)
+++ relstorage/trunk/relstorage/component.xml 2009-09-29 03:04:38 UTC (rev 104594)
@@ -137,6 +137,26 @@
<sectiontype name="postgresql" implements="relstorage.adapter"
datatype=".PostgreSQLAdapterFactory">
+ <key name="keep-history" datatype="boolean" default="true">
+ <description>
+ If this parameter is set to true (the default), the adapter
+ will create and use a history-preserving database schema,
+ similar to FileStorage. A history-preserving schema supports
+ ZODB-level undo, but grows more quickly and requires extensive
+ packing on a regular basis.
+
+ If this parameter is set to false, the adapter will create and
+ use a history-free database schema. Undo will not be supported,
+ but the database will not grow as quickly. The database will
+ still require regular garbage collection (which is accessible
+ through the database pack mechanism.)
+
+ This parameter must not change once the database schema has
+ been installed. If you want to convert between a
+ history-preserving and a history-free database, use the
+ zodbconvert utility to copy to a new database.
+ </description>
+ </key>
<key name="dsn" datatype="string" required="no" default="">
<description>
The PostgreSQL data source name. For example:
@@ -152,6 +172,27 @@
<sectiontype name="oracle" implements="relstorage.adapter"
datatype=".OracleAdapterFactory">
+ <key name="keep-history" datatype="boolean" default="true">
+ <description>
+ If this parameter is set to true (the default), the adapter
+ will create and use a history-preserving database schema,
+ similar to FileStorage. A history-preserving schema supports
+ ZODB-level undo, but grows more quickly and requires extensive
+ packing on a regular basis.
+
+ If this parameter is set to false, the adapter will create and
+ use a history-free database schema. Undo will not be supported,
+ but the database will not grow as quickly. The database will
+ still require regular garbage collection (which is accessible
+ through the database pack mechanism.)
+
+ This parameter must not change once the database schema has
+ been installed. If you want to convert between a
+ history-preserving and a history-free database, use the
+ zodbconvert utility to copy to a new database.
+ </description>
+ </key>
+
<key name="user" datatype="string" required="yes">
<description>
The Oracle account name
@@ -173,6 +214,27 @@
<sectiontype name="mysql" implements="relstorage.adapter"
datatype=".MySQLAdapterFactory">
+ <key name="keep-history" datatype="boolean" default="true">
+ <description>
+ If this parameter is set to true (the default), the adapter
+ will create and use a history-preserving database schema,
+ similar to FileStorage. A history-preserving schema supports
+ ZODB-level undo, but grows more quickly and requires extensive
+ packing on a regular basis.
+
+ If this parameter is set to false, the adapter will create and
+ use a history-free database schema. Undo will not be supported,
+ but the database will not grow as quickly. The database will
+ still require regular garbage collection (which is accessible
+ through the database pack mechanism.)
+
+ This parameter must not change once the database schema has
+ been installed. If you want to convert between a
+ history-preserving and a history-free database, use the
+ zodbconvert utility to copy to a new database.
+ </description>
+ </key>
+
<key name="host" datatype="string" required="no">
<description>
host to connect
Modified: relstorage/trunk/relstorage/config.py
===================================================================
--- relstorage/trunk/relstorage/config.py 2009-09-28 19:03:07 UTC (rev 104593)
+++ relstorage/trunk/relstorage/config.py 2009-09-29 03:04:38 UTC (rev 104594)
@@ -35,14 +35,22 @@
class PostgreSQLAdapterFactory(BaseConfig):
def create(self):
from adapters.postgresql import PostgreSQLAdapter
- return PostgreSQLAdapter(self.config.dsn)
+ return PostgreSQLAdapter(
+ dsn=self.config.dsn,
+ keep_history=self.config.keep_history,
+ )
class OracleAdapterFactory(BaseConfig):
def create(self):
from adapters.oracle import OracleAdapter
config = self.config
- return OracleAdapter(config.user, config.password, config.dsn)
+ return OracleAdapter(
+ user=config.user,
+ password=config.password,
+ dsn=config.dsn,
+ keep_history=config.keep_history,
+ )
class MySQLAdapterFactory(BaseConfig):
More information about the checkins
mailing list