Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix literalization of Date, Time, and DateTime values on Microsoft Ac…

…cess
  • Loading branch information...
commit f36da00ff6d4f25fba4c680d7bf4a3f827ca9951 1 parent 1aaf41c
Jeremy Evans jeremyevans authored

Showing 2 changed files with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. +2 0  CHANGELOG
  2. +11 0 lib/sequel/adapters/shared/access.rb
2  CHANGELOG
... ... @@ -1,5 +1,7 @@
1 1 === HEAD
2 2
  3 +* Fix literalization of Date, Time, and DateTime values on Microsoft Access (jeremyevans)
  4 +
3 5 * Fix handling of nil values with the pure-Java version of nokogiri in the xml_serializer plugin (jeremyevans)
4 6
5 7 * Make identity_map plugin work with standard eager loading of many_to_many and many_through_many associations (jeremyevans)
11 lib/sequel/adapters/shared/access.rb
@@ -43,6 +43,17 @@ def supports_intersect_except?
43 43
44 44 private
45 45
  46 + # Access uses # to quote dates
  47 + def literal_date(d)
  48 + d.strftime('#%Y-%m-%d#')
  49 + end
  50 +
  51 + # Access uses # to quote datetimes
  52 + def literal_datetime(t)
  53 + t.strftime('#%Y-%m-%d %H:%M:%S#')
  54 + end
  55 + alias literal_time literal_datetime
  56 +
46 57 # Access uses TOP for limits
47 58 def select_limit_sql(sql)
48 59 sql << " TOP #{@opts[:limit]}" if @opts[:limit]

0 comments on commit f36da00

Please sign in to comment.
Something went wrong with that request. Please try again.