From: Mike Bayer Date: Sat, 27 Sep 2008 21:15:51 +0000 (+0000) Subject: fixed custom TypeEngine example X-Git-Tag: rel_0_5rc2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17309da8e611e016eaca30bc00376fe57b6d94c7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fixed custom TypeEngine example --- diff --git a/doc/build/content/types.txt b/doc/build/content/types.txt index 764f4e5378..64aafe8cd9 100644 --- a/doc/build/content/types.txt +++ b/doc/build/content/types.txt @@ -146,13 +146,13 @@ To build a type object from scratch, which will not have a corresponding databas def process(value): return value return process + def result_processor(self, dialect): def process(value): return value return process - def convert_result_value(self, value, dialect): - return value +The `bind_processor` and `result_processor` methods return a callable which will be used to process data at the bind parameter and result row level. If either processing is not necessary, the method can return `None` (this reduces the workload as well). Once you make your type, it's immediately useable: