diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-28 00:44:16 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-28 00:44:16 +0000 |
| commit | d56e11ffe290515e44d8bdeda76f06ff87a2b096 (patch) | |
| tree | b290e2ec80656d30b7c9d1610093ffe391527773 /doc | |
| parent | 3f6e94e8185591bd5a32f3558bb5419e0df01763 (diff) | |
| download | sqlalchemy-d56e11ffe290515e44d8bdeda76f06ff87a2b096.tar.gz | |
default value of assert_unicode is None on String, False on create_engine(), and True on Unicode type.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/build/content/dbengine.txt | 2 | ||||
| -rw-r--r-- | doc/build/content/types.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/build/content/dbengine.txt b/doc/build/content/dbengine.txt index 9fc0ae591..c83cf3023 100644 --- a/doc/build/content/dbengine.txt +++ b/doc/build/content/dbengine.txt @@ -126,7 +126,7 @@ Keyword options can also be specified to `create_engine()`, following the string A list of all standard options, as well as several that are used by particular database dialects, is as follows: -* **assert_unicode=None** - defaults to `True` when `convert_unicode==True`. This will assert that all incoming string bind parameters are instances of `unicode`. Only takes effect when `convert_unicode==True`. Set to `False` to disable unicode assertions when `convert_unicode==True`. This flag is also available on the `String` type and its decsendants. New in 0.4.2. +* **assert_unicode=False** - When set to `True` alongside convert_unicode=`True`, asserts that incoming string bind parameters are instances of `unicode`, otherwise raises an error. Only takes effect when `convert_unicode==True`. This flag is also available on the `String` type and its decsendants. New in 0.4.2. * **connect_args** - a dictionary of options which will be passed directly to the DBAPI's `connect()` method as additional keyword arguments. * **convert_unicode=False** - if set to True, all String/character based types will convert Unicode values to raw byte values going into the database, and all raw byte values to Python Unicode coming out in result sets. This is an engine-wide method to provide unicode conversion across the board. For unicode conversion on a column-by-column level, use the `Unicode` column type instead, described in [types](rel:types). * **creator** - a callable which returns a DBAPI connection. This creation function will be passed to the underlying connection pool and will be used to create all new database connections. Usage of this function causes connection parameters specified in the URL argument to be bypassed. diff --git a/doc/build/content/types.txt b/doc/build/content/types.txt index 364599f0b..227f5b187 100644 --- a/doc/build/content/types.txt +++ b/doc/build/content/types.txt @@ -23,7 +23,7 @@ This type is the base type for all string and character types, such as `Unicode` `convert_unicode=True` indicates that incoming strings, if they are Python `unicode` strings, will be encoded into a raw bytestring using the `encoding` attribute of the dialect (defaults to `utf-8`). Similarly, raw bytestrings coming back from the database will be decoded into `unicode` objects on the way back. -`assert_unicode=True` is set to true by default when `convert_unicode=True`, and indicates that incoming bind parameters will be checked that they are in fact `unicode` objects, else an error is raised. (this flag is new as of version 0.4.2) +`assert_unicode` is set to `None` by default. When `True`, it indicates that incoming bind parameters will be checked that they are in fact `unicode` objects, else an error is raised. Setting it to `None` indicates that the dialect-level `convert_unicode` setting should take place, whereas setting it to `False` disables it unconditionally (this flag is new as of version 0.4.2). Both `convert_unicode` and `assert_unicode` may be set at the engine level as flags to `create_engine()`. |
