summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-12-07 20:13:26 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-12-07 20:13:26 +0000
commit9bab01d37baba445ba7ebd1c7c2df3d2d5661794 (patch)
tree2dcb83f4a6602f0404d636154f3e7276882e711a /lib/sqlalchemy
parent0dbbd6fe669afed79be8f639455e324ab9b817ca (diff)
downloadsqlalchemy-9bab01d37baba445ba7ebd1c7c2df3d2d5661794.tar.gz
- convert __init__ and :members: to be compatible with autoclass_content='both'
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/pool.py19
-rw-r--r--lib/sqlalchemy/types.py21
2 files changed, 26 insertions, 14 deletions
diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py
index cd5ef800b..4bb19d6ee 100644
--- a/lib/sqlalchemy/pool.py
+++ b/lib/sqlalchemy/pool.py
@@ -60,7 +60,8 @@ class Pool(object):
def __init__(self, creator, recycle=-1, echo=None, use_threadlocal=False,
reset_on_return=True, listeners=None):
- """Construct a Pool.
+ """
+ Construct a Pool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
@@ -455,10 +456,11 @@ class SingletonThreadPool(Pool):
default, and also requires a singleton connection if a :memory: database
is being used.
- Options are the same as those of Pool, as well as:
+ Options are the same as those of :class:`Pool`, as well as:
- pool_size: 5
- The number of threads in which to maintain connections at once.
+ :param pool_size: The number of threads in which to maintain connections
+ at once. Defaults to five.
+
"""
def __init__(self, creator, pool_size=5, **params):
@@ -529,7 +531,8 @@ class QueuePool(Pool):
def __init__(self, creator, pool_size=5, max_overflow=10, timeout=30,
**params):
- """Construct a QueuePool.
+ """
+ Construct a QueuePool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
@@ -692,7 +695,8 @@ class StaticPool(Pool):
"""A Pool of exactly one connection, used for all requests."""
def __init__(self, creator, **params):
- """Construct a StaticPool.
+ """
+ Construct a StaticPool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
@@ -766,7 +770,8 @@ class AssertionPool(Pool):
## TODO: modify this to handle an arbitrary connection count.
def __init__(self, creator, **params):
- """Construct an AssertionPool.
+ """
+ Construct an AssertionPool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index 0ca251eb1..70022b354 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -401,7 +401,8 @@ class String(Concatenable, TypeEngine):
"""
def __init__(self, length=None, convert_unicode=False, assert_unicode=None):
- """Create a string-holding type.
+ """
+ Create a string-holding type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -517,7 +518,8 @@ class Unicode(String):
"""
def __init__(self, length=None, **kwargs):
- """Create a Unicode-converting String type.
+ """
+ Create a Unicode-converting String type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -535,7 +537,8 @@ class UnicodeText(Text):
"""A synonym for Text(convert_unicode=True, assert_unicode='warn')."""
def __init__(self, length=None, **kwargs):
- """Create a Unicode-converting Text type.
+ """
+ Create a Unicode-converting Text type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -576,7 +579,8 @@ class Numeric(TypeEngine):
"""
def __init__(self, precision=10, scale=2, asdecimal=True, length=None):
- """Construct a Numeric.
+ """
+ Construct a Numeric.
:param precision: the numeric precision for use in DDL ``CREATE TABLE``.
@@ -625,7 +629,8 @@ class Float(Numeric):
"""A type for ``float`` numbers."""
def __init__(self, precision=10, asdecimal=False, **kwargs):
- """Construct a Float.
+ """
+ Construct a Float.
:param precision: the numeric precision for use in DDL ``CREATE TABLE``.
@@ -688,7 +693,8 @@ class Binary(TypeEngine):
"""
def __init__(self, length=None):
- """Construct a Binary type.
+ """
+ Construct a Binary type.
:param length: optional, a length for the column for use in
DDL statements. May be safely omitted if no ``CREATE
@@ -728,7 +734,8 @@ class PickleType(MutableType, TypeDecorator):
impl = Binary
def __init__(self, protocol=pickle.HIGHEST_PROTOCOL, pickler=None, mutable=True, comparator=None):
- """Construct a PickleType.
+ """
+ Construct a PickleType.
:param protocol: defaults to ``pickle.HIGHEST_PROTOCOL``.