aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
Commit message (Collapse)AuthorAgeFilesLines
* Extract a function to determine if the default value is a functionRafael Mendonça França2013-10-141-1/+5
|
* Push default_function to superclass to avoid method checkRafael Mendonça França2013-10-142-14/+17
|
* log the statement name along with the SQLAaron Patterson2013-10-042-6/+7
|
* log every sql statement, even when they errorAaron Patterson2013-10-041-25/+25
|
* prepare the statement inside the begin / rescue blockAaron Patterson2013-10-041-4/+4
|
* wrap logging around the actual query call itself.Aaron Patterson2013-10-042-50/+50
| | | | This is to be consistent with the way the mysql2 adapter times queries
* extract adapter savepoint implementations into `abstract/savepoints.rb`.Yves Senn2013-09-306-46/+27
|
* change the savepoint interface to allow passing the name.Yves Senn2013-09-304-21/+21
|
* Fixed issue #12327Marc Lennox2013-09-271-2/+2
|
* ActiveRecord::ConnectionAdapters::Column.string_to_time method respects ↵kennyj2013-09-251-3/+11
| | | | string with timezone. Closes #12278.
* Merge pull request #11382 from kennyj/fix_10751-2Rafael Mendonça França2013-09-221-3/+6
|\ | | | | | | | | | | | | Dump UUID default functions to schema.rb [2nd version]. Fixes #10751. Conflicts: activerecord/CHANGELOG.md
| * Migration dump UUID default functions to schema.rb. Fixes #10751.kennyj2013-07-101-3/+6
| |
* | Disable prepared statements in the unprepared_statement blockRafael Mendonça França2013-09-121-2/+3
| |
* | Fix inverted conditionalRafael Mendonça França2013-09-111-1/+1
| | | | | | | | Oops, I should had run the tests
* | Remove invalid commentRafael Mendonça França2013-09-111-4/+0
| | | | | | | | This is not valid anymore after 08477a651648ba4417ded128aa37b9ae0dcbc9ce
* | Check if the SQL is not a prepared statementRafael Mendonça França2013-09-118-7/+15
| | | | | | | | | | | | | | | | | | When the adapter is with prepared statement disabled and the binds array is not empty the connection adapter will try to set the binds values and will fail. Now we are checking if the adapter has the prepared statement disabled. Fixes #12023
* | Revert "Do not dup the binds when visiting the AST"Rafael Mendonça França + Kassio Borges2013-08-312-2/+3
| | | | | | | | | | | | This reverts commit 71ff7d9c6592b93e2c810a1f464943dd7bd02c7f. Reason: I need to check with @jeremy if we can do this.
* | Do not dup the binds when visiting the ASTRafael Mendonça França2013-08-312-3/+2
| | | | | | | | | | | | | | The visitor have to consume the bind parameters to make the statements work when the prepared statement option is disabled. Fixes #12023
* | Perf: fields in pg gem causes an allocation, cache itSam2013-08-271-2/+3
| |
* | Merge pull request #11827 from vipulnsward/remove_extra_caseSantiago Pastorino2013-08-261-1/+0
|\ \ | | | | | | Remove extra case.
| * | Remove extra case.Vipul A M2013-08-101-1/+0
| | |
* | | PG adapter deals with negative money values formatted with parenthesis.Yves Senn2013-08-261-0/+5
| | | | | | | | | | | | Closes #11899.
* | | Use infinity constKonstantin Shabanov2013-08-221-2/+2
| | |
* | | Stop interpreting SQL 'string' columns as :string type.Ben Woosley2013-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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." http://www.sqlite.org/datatype3.html
* | | Rescue invalid ip address exceptions on assign.Paul Nikitochkin2013-08-141-1/+5
| | | | | | | | | | | | In order that set attribute should not be bang method
* | | Merge pull request #11838 from vipulnsward/drop_extra_varSteve Klabnik2013-08-121-2/+2
|\ \ \ | | | | | | | | drop extra variable
| * | | drop extra variableVipul A M2013-08-121-2/+2
| |/ /
* / / chmod -xAkira Matsuda2013-08-123-0/+0
|/ /
* | Remove redundant `string_to_binary` from type-castingVipul A M2013-08-095-18/+4
| |
* | Merge pull request #11802 from ko1/fix_field_encoding_for_mysqlAaron Patterson2013-08-073-1/+14
|\ \ | | | | | | Set field encoding to client_encoding for mysql adapter.
| * | Set field encoding to client_encoding for mysql adapter.Koichi Sasada2013-08-083-1/+14
| | |
* | | cast hstore values on write to be consistent with reading from the db.Yves Senn2013-08-082-4/+12
|/ /
* | Merge pull request #11331 from vipulnsward/remove_conditionalAaron Patterson2013-08-071-8/+1
|\ \ | | | | | | Remove conditional, results are always an instance of `ActiveRecord::Result`
| * | Remove conditional, since results are always an instance of ↵Vipul A M2013-07-061-8/+1
| | | | | | | | | | | | `ActiveRecord::Result`
* | | Fix multidimensional PG arrays containing non-string itemsYves Senn2013-08-071-1/+9
| | |
* | | config[:database] should be a stringRafael Mendonça França2013-08-051-3/+3
| | | | | | | | | | | | | | | This change was breaking the Railties tests. See https://travis-ci.org/rails/rails/jobs/9865969
* | | Merge pull request #11762 from peterkovacs/patch-2Carlos Antonio da Silva2013-08-051-1/+1
|\ \ \ | | | | | | | | Free result_metadata directly instead of freeing 2nd, redundant call.
| * | | Free result_metadata directly instead of freeing 2nd, redundant call.Peter Kovacs2013-08-051-1/+1
| | | | | | | | | | | | `result_metadata` returns a new object each time it is called, so calling `result_metadata.free` is essentially a noop. Instead call `free` directly on the metadata when we're done with it.
* | | | Create sqlite3 directory if not presentschneems2013-08-051-3/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the `db/` directory is not present on a remote machine it will blow up in unexpected ways with error messages that do not indicate there is a missing directory: ``` SQLite3::CantOpenException: unable to open database file ``` This PR checks to see if a directory exists for the sqlite3 file and if not creates it for you. This PR is an alternative to #11692 as suggested by @josevalim
* | | Merge pull request #11455 from antonio/fix_enable_extension_not_being_definedRafael Mendonça França2013-08-021-0/+8
|\ \ \ | | | | | | | | Define enable_extension method to prevent undefined method error
| * | | Define enable_extension method to prevent undefined method errorAntonio Santos2013-08-021-0/+8
| | |/ | |/| | | | | | | | | | | | | | | | When mixing postgresql and another adapter like sqlite3 (for dev and test respectively), the task `db:test:prepare` will fail due to the `enable_extension` method not being defined in the abstract adapter. This patch simply adds an empty definition to prevent it.
* | | Removed redundant xml override from pg adapterPaul Nikitochkin2013-08-021-7/+3
| | | | | | | | | | | | Closes: #11706
* | | Refactor `ArrayParser`Vipul A M2013-07-261-15/+22
| | | | | | | | | | | | | | | * Constantize parse token * Remove extra param passed to `parse_data`
* | | Fix indentation.kennyj2013-07-241-8/+8
| | |
* | | Simplify select_one method.kennyj2013-07-241-2/+1
| | | | | | | | | | | | | | | | | | The select_all method always returns ActiveRecord::Result instance, and the ActiveRecord::Result includes Enumerable mixin. If #empty?, #first method returns nil. Thus we can simplify this method.
* | | Uses mysql2 0.3.13 or laterkennyj2013-07-231-1/+1
| | |
* | | Defines the return type of select / select_all method.kennyj2013-07-232-6/+3
| | |
* | | rescue from all exceptions in `ConnectionManagement#call`Vipul A M2013-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #11497 As `ActiveRecord::ConnectionAdapters::ConnectionManagement` middleware does not rescue from Exception (but only from StandardError), the Connection Pool quickly runs out of connections when multiple erroneous Requests come in right after each other. Recueing from all exceptions and not just StandardError, fixes this behaviour.
* | | Revert "Merge pull request #11120 from awilliams/ar_mysql2_boolean_quoting"Yves Senn2013-07-172-6/+6
| | | | | | | | | | | | | | | This reverts commit cb1d07e43926bcec95cb8b4a663ca9889173395a, reversing changes made to 754a373e301d2df0b12a11083405252722bc8366.
* | | Move initializing process for query cache to ↵kennyj2013-07-162-2/+6
| | | | | | | | | | | | ActiveRecord::ConnectionAdapters::QueryCache module.