aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | Transactions refactoringArthur Neves2014-07-281-0/+1
| | | | | | | | | | | | | | 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-241-1/+3
| | | | | | | | | | | | | | | | | | | | 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
* | Always pass a column with a type object to quoteSean Griffin2014-06-281-2/+2
| | | | | | | | | | | | | | | | The only case where we got a column that was not `nil`, but did not respond to `cast_type` was when type casting the default value during schema creation. We can look up the cast type, and add that object to the column definition. Will allow us to consistently rely on the type objects for type casting in all directions.
* | fk: `add_foreign_key` and `remove_foreign_key` for PostgreSQL adapter.Yves Senn2014-06-261-0/+5
| |
* | have an actual `NullColumn` object and update docs accordingly.Yves Senn2014-06-041-1/+4
| | | | | | | | | | | | Follow up to #15438 and #15502. /cc @sgrif
* | Ensure we always use instances of the adapter specific column classSean Griffin2014-05-281-0/+4
| | | | | | | | | | | | - Create a consistent API across adapters for building new columns - Use it for custom properties so we don't get `UndefinedMethodError`s in stuff I'm implementing elsewhere.
* | Keep closer to other methods that touch @transactionArthur Neves2014-05-281-4/+0
| |
* | Move types to the top level `ActiveRecord` namespaceSean Griffin2014-05-271-1/+1
| | | | | | | | | | `ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`
* | Deprecate decimal columns being automatically treated as integersSean Griffin2014-05-271-0/+1
| | | | | | | | | | | | With ActiveRecord::Properties, we now have a reasonable path for users to continue to keep this behavior if they want it. This is an edge case that has added a lot of complexity to the code base.
* | Remove special case in schema dumper for decimal without scaleSean Griffin2014-05-231-1/+1
| |
* | Push limit to type objectsSean Griffin2014-05-221-15/+28
| | | | | | | | | | Columns and injected types no longer have any conditionals based on the format of SQL type strings! Hooray!
* | Push precision to type objectsSean Griffin2014-05-221-2/+7
| |
* | Push scale to type objectsSean Griffin2014-05-221-2/+11
| | | | | | | | | | | | Ideally types will be usable without having to specify a sql type string, so we should keep the information related to parsing them on the adapter or another object.
* | Remove :timestamp column typeSean Griffin2014-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The `:timestamp` type for columns is unused. All database adapters treat them as the same database type. All code in `ActiveRecord` which changes its behavior based on the column's type acts the same in both cases. However, when the type is passed to code that checks for the `:datetime` type, but not `:timestamp` (such as XML serialization), the result is unexpected behavior. Existing schema definitions will continue to work, and the `timestamp` type is transparently aliased to `datetime`.
* | Delegate `Column#type` to the injected type objectSean Griffin2014-05-191-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The decision to wrap type registrations in a proc was made for two reasons. 1. Some cases need to make an additional decision based on the type (e.g. a `Decimal` with a 0 scale) 2. Aliased types are automatically updated if they type they point to is updated later. If a user or another adapter decides to change the object used for `decimal` columns, `numeric`, and `number` will automatically point to the new type, without having to track what types are aliased explicitly. Everything else here should be pretty straightforward. PostgreSQL ranges had to change slightly, since the `simplified_type` method is gone.
* | Add a type object to Column constructorSean Griffin2014-05-171-0/+5
| | | | | | | | | | | | Part of #15134. In order to perform typecasting polymorphically, we need to add another argument to the constructor. The order was chosen to match the `oid_type` on `PostgreSQLColumn`.
* | Use the reader attribute rather than the instance var when possibleCarlos Antonio da Silva2014-05-041-2/+2
| |
* | Simplify unless conditional with ORCarlos Antonio da Silva2014-05-041-4/+2
| |
* | Convert column name to string only onceCarlos Antonio da Silva2014-05-041-1/+2
| |
* | refactor, move `column_for` to `AbstractAdapter` for better reuse.Yves Senn2014-05-041-0/+7
| |
* | push the collectors up to the abstract adapterAaron Patterson2014-04-091-0/+22
| |
* | add a bind collector, remove the bind visitorAaron Patterson2014-04-091-6/+1
| |
* | remove the bind substitution visitor. to_sql should never return bind valuesAaron Patterson2014-04-091-4/+0
| |
* | wrap the literal value before handing it to arelAaron Patterson2014-04-071-3/+4
| | | | | | | | this lets arel know how to correctly quote the value
* | Merge branch 'master' into adequaterecordAaron Patterson2014-04-071-23/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (122 commits) Rails.application should be set inside before_configuration hook remove check for present? from delete_all Remove useless begin..end Build the reverse_order on its proper method. Use connection-specific bytea escaping Ignore order when doing count. make enums distinct per class Remove unused `subclass_controller_with_flash_type_bar` var from flash test. fix CollectionProxy delete_all documentation Added OS X specific commands to installation guide [ci skip] Recommended using homebrew for installing MySQL and PostgreSQL Fix setup of adding _flash_types test. Use SVG version of travis build status badge [skip ci] W3C CSP document moved to gihub.io URL [ci skip] sprockets-rails was released Fix the test defining the models in the right place Add CHANGELOG entry for #11650 [ci skip] Declare the assets dependency Use sass-rails 4.0.3 Make possible to use sprockets-rails 2.1 add missing parentheses to validates_with documentation [skip ci] ...
| * | Remove unused methodRafael Mendonça França2014-03-261-5/+0
| | | | | | | | | | | | | | | This method is not being called anywhere in our code and a GitHub search show it is not being used in any project.
| * | Remove unneeded comments about feature support on the adaptersRafael Mendonça França2014-03-261-20/+9
| | | | | | | | | | | | | | | These comments will likely be outdated with time and doesn't include any information that can't be found in the adapters
| * | create indexes inline in CREATE TABLE for MySQLCody Cutrer2014-03-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | This is important, because adding an index on a temporary table after it has been created would commit the transaction Conflicts: activerecord/CHANGELOG.md
* | | Merge branch 'master' into adequaterecordAaron Patterson2014-03-251-14/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (96 commits) clarify CHANGELOG [ci skip]. Fix Generation of proper migration when ActiveRecord::Base.pluralize_table_names = false. update comments to reflect that options support is not available synchronize changelogs and 4.1 release notes. [ci skip] do not rely on method_missing hitting arel use ARel factory methods for building AST nodes Fix date_select option overwriting html classes - Rename `increment_or_decrement` to an apt `set_cache_value` since it actually doesn't increment/decrement in localstore. Check if any sqlite files are not included in the gitignore Remove sqlite3 lines from .gitignore if the application is not using sqlite3. Adding active_model in Rails::Info Clean up tables after each test. Swapped parameters of assert_equal in assert_select Update test helper to use latest Digestor API Digestor should just rely on the finder to know about the format and the variant -- trying to pass it back in makes a mess of things (oh, and doesnt work) Log the full path, including variant, that the digestor is trying to find Fix for digestor to consider variants for partials -- this still needs more testing!! fix log_tags request object grammar Extract with_example_table into helper method. test for structure:dump without schema information table. refs eafec46 ... Conflicts: activerecord/test/cases/relation/where_chain_test.rb
| * | Reap connections based on owning-thread deathMatthew Draper2014-03-181-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. not a general timeout. Now, if a thread checks out a connection then dies, we can immediately recover that connection and re-use it. This should alleviate the pool exhaustion discussed in #12867. More importantly, it entirely avoids the potential issues of the reaper attempting to check whether connections are still active: as long as the owning thread is alive, the connection is its business alone. As a no-op reap is now trivial (only entails checking a thread status per connection), we can also perform one in-line any time we decide to sleep for a connection.
* | | Merge branch 'master' into adequaterecordAaron Patterson2014-03-131-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (108 commits) make tests pass on Ruby 2.2 Use Sqlite3 adapter in examples use the body proxy to freeze headers just ask the response for the commit status, we do not need to ask the jar only write the jar if the response isn't committed Fix a grammatical error in the i18n guide [ci skip] use method_defined? to check whether or not a method is defined Enhance docs for update_attribute [ci-skip] Change usec to 0 on tests that compare seconds Unit test for mysql quote time usec Changelog entry for mysql56 microseconds Test microsecond on mysql 5.6 MySQL 5.6 and later supports microsecond precision in datetime. [ci skip] Add documentation for original_fullpath. Remove mocking on save, when not necessary comment why we are modifying global state. [ci skip] `change_table` supports `citext`. Follow up to #12523. Removed unnecessary command "application" register OID for PostgreSQL citex datatype [Troy Kruthoff & Lachlan Sylvester] Fixes STI when 2+ levels deep. ...
| * | Merge pull request #13040 from kamipo/case_sensitive_comparisonRafael Mendonça França2014-03-121-0/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Only use BINARY for mysql case sensitive uniqueness check when column has a case insensitive collation. Conflicts: activerecord/CHANGELOG.md
| | * | Only use BINARY for mysql case sensitive uniqueness check when column has a ↵Ryuta Kamizono2013-11-261-0/+5
| | |/ | | | | | | | | | case insensitive collation.
* | | cache queries in the Model.find(id) pathAaron Patterson2014-02-181-0/+2
| | |
* | | Merge branch 'master' into adequaterecordAaron Patterson2014-02-171-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (311 commits) Add a missing changelog entry for #13981 and #14035 Revert "Fixed plugin_generator test" implements new option :month_format_string for date select helpers [Closes #13618] add factory methods for empty alias trackers guarantee a list in the alias tracker so we can remove a conditional stop exposing table_joins make most parameters to the AliasTracker required make a singleton for AssociationScope pass the association and connection to the scope method pass the tracker down the stack and construct it in the scope method clean up add_constraints signature remove the reflection delegate remove klass delegator remove railties changes. fixes #14054 remove chain delegate remove scope_chain delegate Add verb to sanitization note fix path shown in mailer's templates updated Travis build status image url fix guide active_support_core_extensions. add Note to String#indent [ci skip] ... Conflicts: activerecord/lib/active_record/associations/join_dependency.rb activerecord/test/cases/associations/association_scope_test.rb
| * | Reaper has access to threadsafe active? callKevin Casey2014-02-081-0/+6
| | |
| * | fix exception translationAaron Patterson2014-01-171-2/+3
| | |
| * | translate exceptions on prepared statement failureAaron Patterson2014-01-171-5/+8
| |/
* | fix exception translationAaron Patterson2014-01-141-2/+3
| |
* | translate exceptions on prepared statement failureAaron Patterson2014-01-141-5/+8
| |
* | replace bind values on calls to to_sqlAaron Patterson2014-01-131-0/+4
|/
* Merge pull request #12832 from vipulnsward/move_schema_creationYves Senn2013-11-141-78/+1
|\ | | | | Move `SchemaCreation` to its own file instead of `AbstractAdapter`.
| * Move `SchemaCreation` to its own file instead of `AbstractAdapter`.Vipul A M2013-11-121-78/+1
| |
* | autoload ChangeColumnDefinition (Fixes #12835)Anton Kalyaev2013-11-111-0/+1
|/
* add autoload :TransactionState to fix Marshal.load issuesJason Ayre2013-11-071-0/+1
|
* log the statement name along with the SQLAaron Patterson2013-10-041-5/+6
|
* extract adapter savepoint implementations into `abstract/savepoints.rb`.Yves Senn2013-09-301-0/+1
|
* change the savepoint interface to allow passing the name.Yves Senn2013-09-301-3/+3
|
* 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