]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fixed custom TypeEngine example
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 27 Sep 2008 21:15:51 +0000 (21:15 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 27 Sep 2008 21:15:51 +0000 (21:15 +0000)
doc/build/content/types.txt

index 764f4e5378bd9c591bc62ea3d524a57ba3ef812f..64aafe8cd9933a33c37cde5aa44f9b22269a2e8c 100644 (file)
@@ -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: