diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-03-30 17:27:53 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-03-30 17:27:53 -0400 |
| commit | dd20f56bc9a32f0c3afc545ed519dce8b028792c (patch) | |
| tree | 698d70dc7613979599910edb0b2815d98acbea6f /doc | |
| parent | 4df1e07bb9c43ed8d1927a90c75f3142beaa403a (diff) | |
| download | sqlalchemy-dd20f56bc9a32f0c3afc545ed519dce8b028792c.tar.gz | |
- make sure negative row indexes are based on the size of the
number of columns we're actually reporting on
- add more tests for negative row index
- changelog/migration
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/build/changelog/changelog_11.rst | 12 | ||||
| -rw-r--r-- | doc/build/changelog/migration_11.rst | 15 |
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/build/changelog/changelog_11.rst b/doc/build/changelog/changelog_11.rst index 2a0e609b6..18d6d1f74 100644 --- a/doc/build/changelog/changelog_11.rst +++ b/doc/build/changelog/changelog_11.rst @@ -22,6 +22,18 @@ :version: 1.1.0b1 .. change:: + :tags: feature, sql + :pullreq: github:231 + + Negative integer indexes are now accommodated by rows + returned from a :class:`.ResultProxy`. Pull request courtesy + Emanuele Gaifas. + + .. seealso:: + + :ref:`change_gh_231` + + .. change:: :tags: feature, sqlite :tickets: 3629 diff --git a/doc/build/changelog/migration_11.rst b/doc/build/changelog/migration_11.rst index 64ed2d9e2..6f0da3780 100644 --- a/doc/build/changelog/migration_11.rst +++ b/doc/build/changelog/migration_11.rst @@ -1179,6 +1179,21 @@ string values:: :ticket:`3292` +.. _change_gh_231: + +Negative integer indexes accommodated by Core result rows +--------------------------------------------------------- + +The :class:`.RowProxy` object now accomodates single negative integer indexes +like a regular Python sequence, both in the pure Python and C-extension +version. Previously, negative values would only work in slices:: + + >>> from sqlalchemy import create_engine + >>> e = create_engine("sqlite://") + >>> row = e.execute("select 1, 2, 3").first() + >>> row[-1], row[-2], row[1], row[-2:2] + 3 2 2 (2,) + .. _change_3095: The ``Enum`` type now does in-Python validation of values |
