Browse files

Stop interpreting SQL 'string' columns as :string type.

SQL doesn't have a string type, and interpreting 'string' as text is
contrary to at least SQLite3's behavior:

"Note that a declared type of 'STRING' has an affinity of NUMERIC, not TEXT."
  • Loading branch information...
Empact committed Jul 20, 2013
1 parent 28189f2 commit f87d8c7146d6601c57db1f9f4ec1d04fdd0a3f4a
@@ -272,7 +272,7 @@ def simplified_type(field_type)
when /blob/i, /binary/i
- when /char/i, /string/i
+ when /char/i
when /boolean/i
@@ -47,7 +47,7 @@ def test_quote_float_infinity
def test_quote_cast_numeric
fixnum = 666
- c =, nil, 'string')
+ c =, nil, 'varchar')
assert_equal "'666'", @conn.quote(fixnum, c)
c =, nil, 'text')
assert_equal "'666'", @conn.quote(fixnum, c)

0 comments on commit f87d8c7

Please sign in to comment.