From aa239e3e5405933af6a29dac3cf587b59a099927 Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Tue, 5 Aug 2008 17:15:33 +0000 Subject: gis: Merged revisions 7981-8001,8003-8011,8013-8033,8035-8036,8038-8039,8041-8063,8065-8076,8078-8139,8141-8154,8156-8214 via svnmerge from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@8215 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/sqlite3/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'django/db/backends/sqlite3/base.py') diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 48d9ad4c4b..71be86f00b 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -84,6 +84,12 @@ class DatabaseOperations(BaseDatabaseOperations): # sql_flush() implementations). Just return SQL at this point return sql + def year_lookup_bounds(self, value): + first = '%s-01-01' + second = '%s-12-31 23:59:59.999999' + return [first % value, second % value] + + class DatabaseWrapper(BaseDatabaseWrapper): features = DatabaseFeatures() ops = DatabaseOperations() @@ -159,7 +165,7 @@ def _sqlite_extract(lookup_type, dt): dt = util.typecast_timestamp(dt) except (ValueError, TypeError): return None - return str(getattr(dt, lookup_type)) + return getattr(dt, lookup_type) def _sqlite_date_trunc(lookup_type, dt): try: -- cgit v1.2.1