this is the 0.3 syntax, and now it works.
class MyType(TypeDecorator):
impl = Numeric
def convert_bind_param(self, value, engine):
return decimal.Decimal(str(value))
def convert_result_value(self, value, engine):
return decimal.Decimal(str(value))
Thank you very much, Michael. :-)
j
jo wrote:
Michael Bayer wrote:
jose soares wrote:
Michael Bayer wrote:
jose soares wrote:
Hi all,
I'm using Oracle and PostgreSQL with SQLAlchemy and I have some
troubles
to make the code compatible with both of them.
Numeric sa type returns a differe
jose soares wrote:
> Michael Bayer wrote:
>> jose soares wrote:
>>
>>> Hi all,
>>>
>>> I'm using Oracle and PostgreSQL with SQLAlchemy and I have some
>>> troubles
>>> to make the code compatible with both of them.
>>> Numeric sa type returns a different type with oracle and pg.
>>>
>>> For exampl
Michael Bayer wrote:
jose soares wrote:
Hi all,
I'm using Oracle and PostgreSQL with SQLAlchemy and I have some troubles
to make the code compatible with both of them.
Numeric sa type returns a different type with oracle and pg.
For example, in the following table I'm using the Column 'imp
jose soares wrote:
> Hi all,
>
> I'm using Oracle and PostgreSQL with SQLAlchemy and I have some troubles
> to make the code compatible with both of them.
> Numeric sa type returns a different type with oracle and pg.
>
> For example, in the following table I'm using the Column 'importo' with
> ty
Hi all,
I'm using Oracle and PostgreSQL with SQLAlchemy and I have some troubles
to make the code compatible with both of them.
Numeric sa type returns a different type with oracle and pg.
For example, in the following table I'm using the Column 'importo' with
type Numeric as:
tbl['presta