]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support SQLite WITHOUT ROWID tables
authorSean Anderson <seanga2@gmail.com>
Sun, 8 Nov 2020 00:52:04 +0000 (19:52 -0500)
committerGord Thompson <gord@gordthompson.com>
Sun, 8 Nov 2020 13:17:56 +0000 (06:17 -0700)
commit785cece910bb3546e02714b12ad0b75227c81a23
treeb10d1c837a9742cb82e3c12a849adf8f3baf995a
parent8af63c617c0f4e8c90c43738f2425b273177b973
Support SQLite WITHOUT ROWID tables

This adds support for creating tables WITHOUT ROWID in the SQLite
dialect. WITHOUT ROWID tables were introduced in SQLite version 3.8.2
(2013-12-06). They do not use an implicit rowid column as the primary
key. This may result in space and performance savings for tables without
INTEGER primary keys and tables with composite primary keys. For more
information about this feature, see the sqlite documentation [1].

[1] https://www.sqlite.org/withoutrowid.html

Fixes: #5685
### Checklist
This pull request is:

- [x] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

Closes: #5686
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5686
Pull-request-sha: 2b44782d1b3d858e31ce1ff8e08e197af37344d8

Change-Id: Ifcf727b0c07c90e267b79828a8e3fd7a8260a074
(cherry picked from commit 4b39b0f89dfd47dc9f5ba948e564c2afbbd44fef)
doc/build/changelog/unreleased_13/5685.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/sqlite/base.py
test/dialect/test_sqlite.py