From: Jason Kirtland Date: Wed, 27 Aug 2008 19:10:03 +0000 (+0000) Subject: Type processors get a dialect, not an engine... X-Git-Tag: rel_0_5rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b4b2454af987666827f12339fbe78009cc14ee8;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Type processors get a dialect, not an engine... --- diff --git a/doc/build/content/types.txt b/doc/build/content/types.txt index f504f297a1..2fdf424eae 100644 --- a/doc/build/content/types.txt +++ b/doc/build/content/types.txt @@ -119,10 +119,10 @@ User-defined types can be created which can augment the bind parameter and resul impl = types.Unicode - def process_bind_param(self, value, engine): + def process_bind_param(self, value, dialect): return "PREFIX:" + value - def process_result_value(self, value, engine): + def process_result_value(self, value, dialect): return value[7:] def copy(self): @@ -144,10 +144,10 @@ To build a type object from scratch, which will not have a corresponding databas def get_col_spec(self): return "MYTYPE(%s)" % self.precision - def convert_bind_param(self, value, engine): + def convert_bind_param(self, value, dialect): return value - def convert_result_value(self, value, engine): + def convert_result_value(self, value, dialect): return value Once you make your type, it's immediately useable: