summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-07-02 18:10:08 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-07-02 18:10:08 -0400
commit1fb6c4a33d67229847aafd45c783094152553936 (patch)
tree7fc15c8c1b364ea18acbbea6b7c511aa6c1ef72b
parent0e219f2eff8954e20d8e3cdae59431da2676b6f4 (diff)
downloadsqlalchemy-1fb6c4a33d67229847aafd45c783094152553936.tar.gz
Added :class:`.BIGINT` to the list of type names that can be
reflected by the SQLite dialect; courtesy Russell Stuart. [ticket:2764]
-rw-r--r--doc/build/changelog/changelog_08.rst7
-rw-r--r--doc/build/changelog/changelog_09.rst8
-rw-r--r--lib/sqlalchemy/dialects/sqlite/base.py6
-rw-r--r--test/dialect/test_sqlite.py4
4 files changed, 22 insertions, 3 deletions
diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst
index d25cb8d67..f4dd923d6 100644
--- a/doc/build/changelog/changelog_08.rst
+++ b/doc/build/changelog/changelog_08.rst
@@ -7,6 +7,13 @@
:version: 0.8.2
.. change::
+ :tags: bug, sqlite
+ :tickets: 2764
+
+ Added :class:`.BIGINT` to the list of type names that can be
+ reflected by the SQLite dialect; courtesy Russell Stuart.
+
+ .. change::
:tags: feature, orm, declarative
:tickets: 2761
diff --git a/doc/build/changelog/changelog_09.rst b/doc/build/changelog/changelog_09.rst
index d86510e73..ba39a9175 100644
--- a/doc/build/changelog/changelog_09.rst
+++ b/doc/build/changelog/changelog_09.rst
@@ -7,6 +7,14 @@
:version: 0.9.0
.. change::
+ :tags: bug, sqlite
+ :tickets: 2764
+
+ Added :class:`.BIGINT` to the list of type names that can be
+ reflected by the SQLite dialect; courtesy Russell Stuart.
+ Also in 0.8.2.
+
+ .. change::
:tags: feature, orm, declarative
:tickets: 2761
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py
index 787fdec17..a9a81394f 100644
--- a/lib/sqlalchemy/dialects/sqlite/base.py
+++ b/lib/sqlalchemy/dialects/sqlite/base.py
@@ -137,8 +137,9 @@ from sqlalchemy import util
from sqlalchemy.sql import compiler
from sqlalchemy import processors
-from sqlalchemy.types import BLOB, BOOLEAN, CHAR, DATE, DATETIME, DECIMAL,\
- FLOAT, REAL, INTEGER, NUMERIC, SMALLINT, TEXT, TIME, TIMESTAMP, VARCHAR
+from sqlalchemy.types import BIGINT, BLOB, BOOLEAN, CHAR,\
+ DECIMAL, FLOAT, REAL, INTEGER, NUMERIC, SMALLINT, TEXT,\
+ TIMESTAMP, VARCHAR
class _DateTimeMixin(object):
@@ -384,6 +385,7 @@ colspecs = {
}
ischema_names = {
+ 'BIGINT': sqltypes.BIGINT,
'BLOB': sqltypes.BLOB,
'BOOL': sqltypes.BOOLEAN,
'BOOLEAN': sqltypes.BOOLEAN,
diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py
index 4ede13ff6..d75211a71 100644
--- a/test/dialect/test_sqlite.py
+++ b/test/dialect/test_sqlite.py
@@ -9,7 +9,7 @@ from sqlalchemy import Table, String, select, Text, CHAR, bindparam, Column,\
Unicode, Date, MetaData, UnicodeText, Time, Integer, TIMESTAMP, \
Boolean, func, NUMERIC, DateTime, extract, ForeignKey, text, Numeric,\
DefaultClause, and_, DECIMAL, TypeDecorator, create_engine, Float, \
- INTEGER, UniqueConstraint, DATETIME, DATE, TIME, BOOLEAN
+ INTEGER, UniqueConstraint, DATETIME, DATE, TIME, BOOLEAN, BIGINT
from sqlalchemy.util import u, ue
from sqlalchemy import exc, sql, schema, pool, types as sqltypes, util
from sqlalchemy.dialects.sqlite import base as sqlite, \
@@ -137,6 +137,8 @@ class TestTypes(fixtures.TestBase, AssertsExecutionResults):
(Numeric(10, 2), NUMERIC(10, 2)),
(DECIMAL, DECIMAL()),
(DECIMAL(10, 2), DECIMAL(10, 2)),
+ (INTEGER, INTEGER()),
+ (BIGINT, BIGINT()),
(Float, Float()),
(NUMERIC(), ),
(TIMESTAMP, TIMESTAMP()),