MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / to_decimal_processor_factory

Function to_decimal_processor_factory

lib/sqlalchemy/engine/processors.py:56–62  ·  view source on GitHub ↗
(target_class, scale)

Source from the content-addressed store, hash-verified

54 )
55
56 def to_decimal_processor_factory(target_class, scale):
57 # Note that the scale argument is not taken into account for integer
58 # values in the C implementation while it is in the Python one.
59 # For example, the Python implementation might return
60 # Decimal('5.00000') whereas the C implementation will
61 # return Decimal('5'). These are equivalent of course.
62 return DecimalResultProcessor(target_class, "%%.%df" % scale).process

Callers 1

goMethod · 0.90

Calls

no outgoing calls

Tested by 1

goMethod · 0.72