aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant `string_to_binary` from type-castingVipul A M2013-08-091-1/+0
|
* Revert "Merge pull request #9207 from dylanahsmith/mysql-quote-numeric"Steve Klabnik2013-02-271-8/+2
| | | | | This reverts commit 408227d9c5ed7de26310d72a1a99c1ee02311c63, reversing changes made to dca0b57d03deffc933763482e615c3cf0b9a1d97.
* active_record: Quote numeric values compared to string columns.Dylan Smith2013-02-071-2/+8
|
* Fix typo: adaptors => adapters [ci skip]Carlos Antonio da Silva2013-01-271-1/+1
|
* Fix cases where delete_records on a has_many association caused errorsDerek Kraan2013-01-271-0/+12
| | | | | | | | | | | | | because of an ambiguous column name. This happened if the association model had a default scope that referenced a third table, and the third table also referenced the original table (with an identical foreign_key). Mysql requires that ambiguous columns are deambiguated by using the full table.column syntax. Postgresql and Sqlite use a different syntax for updates altogether (and don't tolerate table.name syntax), so the fix requires always including the full table.column and discarding it later for Sqlite and Postgresql.
* fix quoting for ActiveSupport::Duration instancesFrancesco Rodriguez2012-07-041-1/+1
| | | | | | | | | | | | | | | | This patch fixes quoting for ActiveSupport::Duration instances: # before >> ActiveRecord::Base.connection.quote 30.minutes => "'--- 1800\n...\n'" # after >> ActiveRecord::Base.connection.quote 30.minutes => "1800" Also, adds a test for type casting ActiveSupport::Duration instances. Related to #1119.
* Fixed bug in Quoting that caused classes to be quoted incorrectlyRyan Oblak2012-03-091-0/+1
|
* Only show the type if column is presentRafael Mendonça França2012-01-231-1/+2
|
* Don't type-cast unknown types to YAML.Stephen Celis2012-01-201-1/+1
|
* Make the logic easier to readJon Leighton2011-09-061-4/+7
|
* inserting big decimals as strings works consistently among dbs, so use ↵Aaron Patterson2011-04-141-1/+1
| | | | string form
* adding a type cast method for prepared statementsAaron Patterson2011-04-141-0/+36
|
* do not depend on to_yaml being called, but rather depend on YAML being dumpedAaron Patterson2011-04-131-1/+1
|
* Make serialized fixtures work againPratik Naik2010-12-291-1/+2
|
* dry up column type testingAaron Patterson2010-10-121-5/+5
|
* all columns respond to string_to_binary, so no need to check respond_to?Aaron Patterson2010-10-121-2/+2
|
* drying up true and false casesAaron Patterson2010-10-121-3/+7
|
* reducing comparisons in when statementsAaron Patterson2010-10-121-6/+6
|
* removing intermediate variablesAaron Patterson2010-10-121-2/+1
|
* reduce the number of times we test for the column variableAaron Patterson2010-10-121-2/+5
|
* refactoring date / time / datetime when statementAaron Patterson2010-10-121-11/+8
|
* fixing case / when indentationAaron Patterson2010-10-121-20/+20
|
* query value is converted to_s instead of to_yamlRainerBlessing2010-08-031-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Remove quoted_string_prefix entirely since PostgreSQL was the only database ↵Jeremy Kemper2010-04-241-7/+3
| | | | adapter relying on it.
* quoted_date converts time-like objects to ↵Geoff Buesing2009-08-031-1/+6
| | | | ActiveRecord::Base.default_timezone before serialization. This allows you to use Time.now in find conditions and have it correctly be serialized as the current time in UTC when default_timezone == :utc [#2946 state:resolved]
* Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+2
|
* Quote table names. Defaults to column quoting. Closes #4593.Jeremy Kemper2007-10-161-4/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve performance and functionality of the postgresql adapter. Closes ↵Michael Koziarski2007-08-161-3/+7
| | | | | | #8049 [roderickvd] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use Date#to_s(:db) for quoted dates. Closes #7411.Jeremy Kemper2007-01-281-6/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* be like a duck. Let's not rely on explicit classes, so we can pass proxy ↵Jamis Buck2007-01-151-3/+8
| | | | | | objects around and have them interpreted correctly by ActiveRecord's serialization routines git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5953 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote ActiveSupport::Multibyte::Chars. Closes #6653.Jeremy Kemper2006-11-201-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Patch sql injection vulnerability when using integer or float columns.Jamis Buck2006-07-271-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4704@asus: jeremy | 2006-06-27 12:00:19 -0700Jeremy Kemper2006-07-081-7/+9
| | | | | | | | | | | | | | | decimal r4705@asus: jeremy | 2006-06-27 12:20:47 -0700 current_adapter? checks whether any of its arguments is the name of the current adapter class r4834@asus: jeremy | 2006-07-08 13:08:24 -0700 Room to float. r4835@asus: jeremy | 2006-07-08 13:09:18 -0700 Give lock test a few chances. r4836@asus: jeremy | 2006-07-08 13:12:05 -0700 Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Records and arrays of records are bound as quoted ids.Jeremy Kemper2006-06-011-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4391 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed db_schema_import when binary types are present (closes #3101) [DHH]David Heinemeier Hansson2006-03-251-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add option (true by default) to generate reader methods for each attribute ↵Marcel Molina2005-10-071-3/+3
| | | | | | of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote booleans according the rules defined by the adapterMichael Koziarski2005-10-061-3/+7
| | | | | | | | | | * SQLite schema has been updated * Postgresql schema needs to be fixed too Simplify AR::Base#toggle to store the boolean, not the quoted value * expand the tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add extensive documentation to the ActiveRecord::AbstractAdapter. #2250Marcel Molina2005-09-271-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored the AbstractAdapter to be a lot less scary. Cleaned up the docs ↵David Heinemeier Hansson2005-09-251-0/+42
and style for the OSS adapters git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de