aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
Commit message (Collapse)AuthorAgeFilesLines
* Add missing AS requireArthur Neves2014-08-191-0/+1
| | | | `strip_heredoc` method is defined on active_support/core_ext/string
* Merge pull request #16542 from ↵Rafael Mendonça França2014-08-181-1/+1
| | | | | | | | seamusabshere/numerify-pool-checkout-timeout-from-urls-4-1-stable Make sure :checkout_timeout and :dead_connection_timeout are numbers Conflicts: activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
* Add option to stop swallowing errors on callbacks.Arthur Neves2014-08-181-7/+23
| | | | | | | | | | | | | | | Currently, Active Record will rescue any errors raised within after_rollback/after_create callbacks and print them to the logs. Next versions of rails will not rescue those errors anymore, and just bubble them up, as the other callbacks. This adds a opt-in flag to enable that behaviour, of not rescuing the errors. Example: # For not swallow errors in after_commit/after_rollback config.active_record.errors_in_transactional_callbacks = true [fixes #13460]
* Merge pull request #16481 from sgrif/sg-change-default-timestampsDavid Heinemeier Hansson2014-08-173-8/+26
|\ | | | | Change the default `null` value for timestamps
| * Change the default `null` value for timestampsSean Griffin2014-08-123-8/+26
| | | | | | | | | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* | Fix regression on after_commit in nested transactions.Arthur Neves2014-08-151-0/+2
| | | | | | | | | | | | | | | | | | after_commit should not run in nested transactions, however they should run once the outermost transaction gets committed. This patch fixes the problem copying the records from the Savepoint to its parent. So the RealTransaction will have all records that needs to run callbacks on it. [fixes #16425]
* | Use *_transaction methods in TransactionManagerArthur Neves2014-08-151-4/+2
| | | | | | | | | | | | Use `commit_transaction`/`rollback_transaction` on `within_new_transaction` method, so they make sure they `pop` the transaction from the stack before calling the methods `commit`/`rollback`.
* | Spelling errorsjbsmith862014-08-141-1/+1
| |
* | `index_exists?` with `:name` checks specified columns.Yves Senn2014-08-131-7/+8
|/ | | | | | | | | | | | | | | [Yves Senn & Matthew Draper] The column check was embodied in the defaul index name. If the :name option was used, the specified columns were not verified at all. Given: ``` assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma) ``` That index could have been defined on any field, not necessarily on `:foo_id`.
* use the uri parser so that newer version of Ruby workAaron Patterson2014-08-071-1/+1
|
* change to empty? from blank?tsukasaoishi2014-08-081-1/+1
|
* Tables existence check query is executed in large quantitiestsukasaoishi2014-08-071-0/+7
| | | | | | | | | | | | | | When Rails starts, tables existence check query is executed number of models. In case of mysql, SHOW TABLES LIKE 'table1'; SHOW TABLES LIKE 'table2'; SHOW TABLES LIKE 'table3'; ... SHOW TABLES LIKE 'table999'; Add process to get the names of all tables by one query.
* Merge pull request #16364 from arthurnn/make_transaction_one_classJeremy Kemper2014-08-051-70/+54
|\ | | | | Clarify Transaction responsibilities by breaking unneeded inheritance hierarchy.
| * Cleanup Transaction inheritance.Arthur Neves2014-08-051-70/+54
| | | | | | | | | | | | | | | | | | Transaction class doesnt need to encapsulate the transaction state using inheritance. This removes all Transaction subclasses, and let the Transaction object controls different actions based on its own state. Basically the only actions would behave differently are `being`,`commit`,`rollback` as they could act in a savepoint or in a real transaction.
* | Remove unused text? predicate method and delegationCarlos Antonio da Silva2014-08-052-5/+1
|/ | | | | | | | The method has been removed in 09206716f8695f6b8467f15c1befa5a4c3c10978 (PR #16074), but the delegation was apparently missed, and one instance of the method was added back with the addition of OID::Xml in 336be2bdf7dfa1b31879d0ab27e5f3101b351923 (PR #16072), so we can safely rm both.
* Replace ClosedTransaction with NullTransactionArthur Neves2014-07-312-8/+5
|
* Move TransactionManager to bottom of classArthur Neves2014-07-311-67/+67
|
* Merge pull request #16341 from arthurnn/transactions_remove_beginRafael Mendonça França2014-07-311-54/+18
|\ | | | | Transactions refactoring - 2
| * Make ClosedTransaction a null objectArthur Neves2014-07-311-16/+6
| |
| * Remove parent on Transaction objectArthur Neves2014-07-311-16/+9
| |
| * Remove being/number methods from transaction classArthur Neves2014-07-311-27/+8
| |
* | Clarify how the ConnectionHandler worksJack Danger Canty2014-07-311-15/+36
|/ | | | | | | This makes the implicit description of how connection pooling works a little more explicit. It converts the examples of a model hierarchy into actual Ruby code and demonstrates how the key structure of the database.yml relates to the `establish_connection` method.
* Remove @state.parent assignment on commitArthur Neves2014-07-291-2/+1
| | | | | | | | | This piece of code was introduced on 67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling `committed?` in the `transaction_state` before calling the `committed!` method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the `committed?` check was removed and replaced by a `finalized?`, which only checks if the state is not nil. Thus we can remove that line.
* remove blank lines in the start of the ActiveRecord filesPonomarev Nikolay2014-07-291-1/+0
|
* Extract the transaction class to a local variableRafael Mendonça França2014-07-281-6/+2
|
* Merge pull request #16284 from arthurnn/transactionsRafael Mendonça França2014-07-283-62/+81
|\ | | | | | | Transactions refactoring
| * savepoint_name should return nil for non-savepoint transactionsArthur Neves2014-07-282-4/+7
| | | | | | | | Also add test to assets the savepoint name
| * Transactions refactoringArthur Neves2014-07-283-38/+65
| | | | | | | | | | | | | | Add a transaction manager per connection, so it can controls the connection responsibilities. Delegate transaction methods to transaction_manager
| * Remove finishing? method from transaction.Arthur Neves2014-07-242-24/+13
| | | | | | | | | | | | | | | | | | | | The finishing variable on the transaction object was a work-around for the savepoint name, so after a rollback/commit the savepoint could be released with the previous name. related: 9296e6939bcc786149a07dac334267c4035b623a 60c88e64e26682a954f7c8cd6669d409ffffcc8b
* | Merge pull request #16290 from a3gis/masterZachary Scott2014-07-251-1/+1
|\ \ | | | | | | [ci skip] Fix documentation of SQLite3Adapter.columns where SQLite3Column was removed in e781aa31fc52a7c696115302ef4d4e02bfd1533b
| * | Fix documentation of SQlite3Adapter.columnsa3gis2014-07-251-1/+1
| | | | | | | | | As of https://github.com/rails/rails/commit/e781aa31fc52a7c696115302ef4d4e02bfd1533b SQLite3Column has been dropped.
* | | Add support for Postgresql JSONBPhilippe Creux2014-07-244-0/+29
| |/ |/| | | | | [Philippe Creux, Chris Teague]
* | Merge pull request #16280 from a3gis/masterMatthew Draper2014-07-241-2/+2
|\| | | | | Fixes #16265 and correct documentation typo
| * Fix documentation typo in ConnectionSpecification::Resolve.speca3gis2014-07-241-1/+1
| |
| * Fixes #16265a3gis2014-07-241-1/+1
| |
* | pg, `change_column_default, :table, :column, nil` issues `DROP DEFAULT`.Yves Senn2014-07-241-1/+9
|/ | | | | | | | | | | | Closes #16261. [Matthew Draper, Yves Senn] Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`. However, PostgreSQL will cast the default to the columns type, which leaves us with a default like "default NULL::character varying". /cc @matthewd
* Merge pull request #16231 from Envek/type_in_referencesYves Senn2014-07-222-4/+25
|\ | | | | | | | | | | * Allow to specify a type for foreign key column in migrations * unified the docs * some cleanup in CHANGELOG
| * Allow to specify a type for foreign key column in migrationsAndrey Novikov2014-07-222-2/+10
|/ | | | [Andrey Novikov & Łukasz Sarnacki]
* Merge pull request #15944 from seuros/uuidRafael Mendonça França2014-07-161-1/+10
|\ | | | | | | | | | | | | Treat invalid uuid as nil Conflicts: activerecord/CHANGELOG.md
| * Treat invalid uuid as nilAbdelkader Boudih2014-07-141-1/+10
| |
* | Predicate methods don't need to return `true` / `false`Rafael Mendonça França2014-07-151-1/+1
| |
* | Fix version detection for RENAME INDEX support. Fixes #15931.Jeff Browning2014-07-153-6/+18
|/
* Merge pull request #16136 from sgrif/sg-pg-bit-stringMatthew Draper2014-07-122-13/+33
|\ | | | | Don't rely on the column SQL type for bit string quoting
| * Don't rely on the column SQL type for bit string quotingSean Griffin2014-07-112-13/+33
| |
* | Merge pull request #16055 from sgrif/sg-refactor-sqlite3-stringsMatthew Draper2014-07-121-14/+22
|\ \ | |/ |/| Use a type object for type casting behavior on SQLite3
| * Use a type object for type casting behavior on SQLite3Sean Griffin2014-07-111-14/+22
| |
* | Merge pull request #16071 from sgrif/sg-pg-type-castRafael Mendonça França2014-07-081-15/+0
|\ \ | | | | | | Remove PG's definition of `type_cast`
| * | Remove PG's definition of `type_cast`Sean Griffin2014-07-061-15/+0
| | | | | | | | | | | | | | | All cases except for `nil` in an array have been removed. `nil` in an array is handled by the Array type object.
* | | Merge pull request #16072 from sgrif/sg-xml-quotingRafael Mendonça França2014-07-084-4/+42
|\ \ \ | | | | | | | | Don't rely on the sql type to quote XML columns in PG
| * | | Don't rely on the sql type to quote XML columns in PGSean Griffin2014-07-064-4/+42
| |/ /