summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/processors.py
Commit message (Collapse)AuthorAgeFilesLines
* Support python3.6Mike Bayer2017-01-131-3/+3
| | | | | | | | | | | Corrects some warnings and adds tox config. Adds DeprecationWarning to the error category. Large sweep for string literals w/ backslashes as this is common in docstrings Co-authored-by: Andrii Soldatenko Fixes: #3886 Change-Id: Ia7c838dfbbe70b262622ed0803d581edc736e085 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/337
* update for 2017 copyrightMike Bayer2017-01-041-1/+1
| | | | Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
* Make boolean processors consistent between Py/C; coerce to 1/0Mike Bayer2016-06-231-2/+2
| | | | | | | | | | | | | The processing performed by the :class:`.Boolean` datatype for backends that only feature integer types has been made consistent between the pure Python and C-extension versions, in that the C-extension version will accept any integer value from the database as a boolean, not just zero and one; additionally, non-boolean integer values being sent to the database are coerced to exactly zero or one, instead of being passed as the original integer value. Change-Id: I01e647547fd7047bd549dd70e1fa202c51e8328b Fixes: #3730
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* PEP8 style fixesBrian Jarrett2014-07-131-10/+12
|
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - rework Oracle to no longer do its own unicode conversion; this has been ↵Mike Bayer2014-01-171-1/+22
| | | | | | | | | | | observed to be very slow. this now has the effect of producing "conditional" unicode conversion for the Oracle backend, as it still returns NVARCHAR etc. as unicode [ticket:2911] - add new "conditional" functionality to unicode processors; the C-level function now uses PyUnicode_Check() as a fast alternative to the isinstance() check in Python
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - The precision used when coercing a returned floating point value toMike Bayer2013-11-221-2/+2
| | | | | | | | | | Python ``Decimal`` via string is now configurable. The flag ``decimal_return_scale`` is now supported by all :class:`.Numeric` and :class:`.Float` types, which will ensure this many digits are taken from the native floating point value when it is converted to string. If not present, the type will make use of the value of ``.scale``, if the type supports this setting and it is non-None. Otherwise the original default length of 10 is used. [ticket:2867]
* - the raw 2to3 runMike Bayer2013-04-271-3/+3
| | | | - went through examples/ and cleaned out excess list() calls
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* just a pep8 pass of lib/sqlalchemy/Diana Clarke2012-11-191-1/+4
|
* - add new C extension "utils", so far includes distill_paramsMike Bayer2012-08-071-2/+3
| | | | | - repair test_processors which wasn't hitting the python functions - add another suite to test_processors that does distill_params
* -whitespace bonanza, contdMike Bayer2012-07-281-4/+4
|
* Improve SQLite DATETIME storage format handling [ticket:2363]Nathan Wright2012-03-121-1/+7
| | | | | | | | | | | | | | This breaks backwards compatibility with old SQLite DATETIME, DATE, and TIME storage_format strings. Formatting now occurs with named instead of positional parameters. The regexp argument can still use positional arguments, but named groupings are also supported. This means that you can omit fields and change the order of date fields as desired. SQLite's DATETIME and TIME also gained a truncate_microseconds argument. This is shorthand for modifying the format string. Fortunately the str_to_datetime and str_to_time processors written in C already support omitting microseconds, so we don't have to resort to python processing for this case.
* - [bug] Improved error messages when a non-stringMike Bayer2012-01-221-25/+34
| | | | | | | | | or invalid string is passed to any of the date/time processors used by SQLite, including C and Python versions. [ticket:2382] - changed the import model of processors.py so that we can get at the pure python versions and C versions simultaneously in tests.
* - Ensured that the same ValueError is raised forMike Bayer2011-08-041-1/+4
| | | | | | illegal date/time/datetime string parsed from the database regardless of whether C extensions are in use or not.
* - whitespace removal bonanzaMike Bayer2011-01-021-1/+1
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-1/+2
| | | | | a consistent tag - AUTHORS file
* - Added a bind processor for booleans which coercesMike Bayer2010-11-151-0/+6
| | | | | to int, for DBAPIs such as pymssql that naively call str() on values.
* - more 78 charsMike Bayer2010-07-101-1/+2
| | | | | - BIGINT doc - clean up docs in schema.py
* support scale argument for the C implementation of the decimal processorGaëtan de Menten2010-02-281-23/+18
|
* - the "scale" argument of the Numeric() type is honored whenMike Bayer2010-02-261-10/+22
| | | | | | coercing a returned floating point value into a string on its way to Decimal - this allows accuracy to function on SQLite, MySQL. [ticket:1717]
* rename "error" kwarg to "errors" to be consistent with builtin unicodeGaëtan de Menten2010-02-231-6/+6
| | | | conversion functions.
* - Added "unicode_errors" parameter to String, Unicode, etc.Mike Bayer2010-02-231-4/+8
| | | | | | | | | | | | | | Behaves like the 'errors' keyword argument to the standard library's string.decode() functions. This flag requires that `convert_unicode` is set to `"force"` - otherwise, SQLAlchemy is not guaranteed to handle the task of unicode conversion. Note that this flag adds significant performance overhead to row-fetching operations for backends that already return unicode objects natively (which most DBAPIs do). This flag should only be used as an absolute last resort for reading strings from a column with varied or corrupted encodings, which only applies to databases that accept invalid encodings in the first place (i.e. MySQL. *not* PG, Sqlite, etc.)
* - Added an optional C extension to speed up the sql layer byGaëtan de Menten2010-02-131-0/+90
reimplementing the highest impact functions. The actual speedups will depend heavily on your DBAPI and the mix of datatypes used in your tables, and can vary from a 50% improvement to more than 200%. It also provides a modest (~20%) indirect improvement to ORM speed for large queries. Note that it is *not* built/installed by default. See README for installation instructions. - The most common result processors conversion function were moved to the new "processors" module. Dialect authors are encouraged to use those functions whenever they correspond to their needs instead of implementing custom ones.