Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | Use the right type_map | Rafael Mendonça França | 2013-12-05 | 2 | -5/+3 | |
| | | | ||||||
* | | | make the type_map per connection. fixes #13182 | Aaron Patterson | 2013-12-04 | 2 | -12/+17 | |
| | | | ||||||
* | | | `connection.type_to_sql` returns a `String` for unmapped types. | Yves Senn | 2013-12-03 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #13146. This fixes an error when using: ``` change_colum :table, :column, :bigint, array: true ``` | |||||
* | | | Currently, we clear query_cache in cache block finish, even if we may ↵ | Vipul A M | 2013-12-03 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | already have cache true. This commit takes into account the last cache_enabled value, before clearing query_cache. | |||||
* | | | Merge pull request #13111 from akshay-vishnoi/typo | Carlos Antonio da Silva | 2013-11-30 | 1 | -1/+1 | |
|\ \ \ | | | | | | | | | Typo fixes [ci skip] | |||||
| * | | | Typo fixes [ci skip] | Akshay Vishnoi | 2013-11-30 | 1 | -1/+1 | |
| | | | | ||||||
* | | | | Remove unused variable | Rafael Mendonça França | 2013-11-29 | 1 | -1/+1 | |
|/ / / | | | | | | | | | | | | | This method is not using the block variable directly since it is calling yield | |||||
* | | | Merge pull request #13099 from kamipo/remove_case_sensitive_equality_operator | Carlos Antonio da Silva | 2013-11-29 | 1 | -4/+0 | |
|\ \ \ | | | | | | | | | Remove `DatabaseStatements#case_sensitive_equality_operator`. It has been deprecated already. | |||||
| * | | | Remove `DatabaseStatements#case_sensitive_equality_operator`. It has been ↵ | Ryuta Kamizono | 2013-11-29 | 1 | -4/+0 | |
| | | | | | | | | | | | | | | | | deprecated already. | |||||
* | | | | Merge pull request #13100 from akshay-vishnoi/f-refactor | Carlos Antonio da Silva | 2013-11-29 | 1 | -3/+8 | |
|\ \ \ \ | |/ / / |/| | | | #type_cast - improve performance & readability | |||||
| * | | | #type_cast - improve performance & readability | Akshay Vishnoi | 2013-11-29 | 1 | -3/+8 | |
| | |/ | |/| | ||||||
* | | | fix mysql version check in rename_index | Cody Cutrer | 2013-11-28 | 1 | -1/+1 | |
| | | | | | | | | | | | | also clarify native rename_index support is >= 5.7, not > 5.7 | |||||
* | | | implement rename_index natively for MySQL > 5.7 | Cody Cutrer | 2013-11-28 | 1 | -0/+8 | |
| | | | ||||||
* | | | `rename_index`: add the new index before removing the old one. | Yves Senn | 2013-11-26 | 1 | -2/+2 | |
|/ / | | | | | | | | | | | | | | | | | | | | | This prevents the following error when a MySQL index on a foreign key column is renamed: ``` ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_engines_on_car_id': needed in a foreign key constraint: DROP INDEX `index_engines_on_car_id` ON `engines` ``` refs: #13038. | |||||
* | | Drop unused param `should_be_quoted` to `PostgreSQLColumn#array_to_string` | Vipul A M | 2013-11-17 | 1 | -1/+1 | |
| | | ||||||
* | | Merge pull request #12779 from ↵ | Aaron Patterson | 2013-11-15 | 2 | -10/+0 | |
|\ \ | | | | | | | | | | | | | dougbarth/dont_swallow_exceptions_during_transactional_statements_in_mysql Don't swallow exceptions in transctional statements | |||||
| * | | Don't swallow exceptions in transctional statements | Doug Barth | 2013-11-05 | 2 | -10/+0 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MySQL connection adapater swallows all StandardError exceptions, which includes Mysql::Error and Mysql2::Error. The comment in the exception clause claims errors thrown here indicate that transactions aren't supported by the server but that isn't necessarily true. It's possible the MySQL server has gone away and swallowing a failed commit may let the application return a successful response when the data has not been saved. Also, replication libraries like Galera require that the application handle exceptions thrown at BEGIN/COMMIT. I'm unable to determine what version of MySQL threw an exception for transactional statements. I tried as far back as 3.23.49 with InnoDB disabled but BEGIN & COMMIT statements do not throw an error. If there's a real case for this logic to continue, we could instead push this behavior into a configuration setting. The exception swallowing has been there since the beginning: db045dbbf60b53dbe013ef25554fd013baf88134 | |||||
* | | | Merge pull request #12832 from vipulnsward/move_schema_creation | Yves Senn | 2013-11-14 | 2 | -78/+84 | |
|\ \ \ | | | | | | | | | Move `SchemaCreation` to its own file instead of `AbstractAdapter`. | |||||
| * | | | Move `SchemaCreation` to its own file instead of `AbstractAdapter`. | Vipul A M | 2013-11-12 | 2 | -78/+84 | |
| | | | | ||||||
* | | | | Remove the unused, undocumented SQLite3Adapter#supports_count_distinct? | Ben Woosley | 2013-11-12 | 1 | -5/+0 | |
| | | | | | | | | | | | | | | | | This has returned true since 3cc9b5f1, and is not used internally. | |||||
* | | | | Drop a sqlite_version check because we only support SQLite 3.6.16 or newer. | Ben Woosley | 2013-11-12 | 2 | -7/+1 | |
| | | | | | | | | | | | | Drop some comments that document the implementation rather than the interface. | |||||
* | | | | Unifies mysql and mysql2 casting of booleans. | Yves Senn | 2013-11-11 | 2 | -6/+6 | |
| | | | | ||||||
* | | | | autoload ChangeColumnDefinition (Fixes #12835) | Anton Kalyaev | 2013-11-11 | 1 | -0/+1 | |
| | | | | ||||||
* | | | | Change array check for better aesthetics / reading the code | Carlos Antonio da Silva | 2013-11-09 | 1 | -1/+1 | |
| | | | | ||||||
* | | | | Document the bind return | Rafael Mendonça França | 2013-11-09 | 1 | -0/+3 | |
| | | | | ||||||
* | | | | Avoid shot circuit return. | Rafael Mendonça França | 2013-11-09 | 1 | -8/+20 | |
| | | | | | | | | | | | | | | | | This will make the conditional and to code clear | |||||
* | | | | Don't use Active Support where we don't need to | Rafael Mendonça França | 2013-11-09 | 3 | -3/+3 | |
| | | | | ||||||
* | | | | log bind variables after they were type casted. | Yves Senn | 2013-11-09 | 3 | -10/+16 | |
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The log output used to be confusing in situation where type casting has "unexpected" effects. For example when finding records with a `String`. BEFORE: irb(main):002:0> Event.find("im-no-integer") D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", "im-no-integer"]] AFTER: irb(main):002:0> Event.find("im-no-integer") D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", 0]] | |||||
* / / | add autoload :TransactionState to fix Marshal.load issues | Jason Ayre | 2013-11-07 | 1 | -0/+1 | |
|/ / | ||||||
* | | ask the fixture set for the sql statements | Aaron Patterson | 2013-11-04 | 1 | -1/+5 | |
| | | ||||||
* | | fix code typo in `MysqlAdapter` .Closes #12647. | Yves Senn | 2013-10-30 | 1 | -1/+1 | |
| | | ||||||
* | | Merge pull request #10664 from aderyabin/docpatch | Yves Senn | 2013-10-29 | 1 | -1/+1 | |
|\ \ | | | | | | | Fix doc in Postgres database creation [ci skip] | |||||
| * | | Fix doc in Postgres database creation | Andrey Deryabin | 2013-06-25 | 1 | -1/+1 | |
| | | | ||||||
* | | | Remove confusing generated-code commentary | Jeremy Kemper | 2013-10-28 | 1 | -4/+4 | |
| | | | ||||||
* | | | Add a note about ensuring the version is right for the adapter (since you ↵ | David Heinemeier Hansson | 2013-10-27 | 1 | -1/+1 | |
| | | | | | | | | | | | | might well have specified the right gem, but locked it to too low of a version) | |||||
* | | | cast json values on write to be consistent with reading from the db. | Severin Schoepke | 2013-10-25 | 1 | -0/+4 | |
| | | | | | | | | | | | | See also commit 5ac2341fab689344991b2a4817bd2bc8b3edac9d | |||||
* | | | `ActiveRecord::Store` works together with PG `hstore` columns. | Yves Senn | 2013-10-25 | 2 | -0/+12 | |
| | | | | | | | | | | | | | | | | | | This is necessary because as of 5ac2341 `hstore` columns are always stored as `Hash` with `String` keys. `ActiveRecord::Store` expected the attribute to be an instance of `HashWithIndifferentAccess`, which led to the bug. | |||||
* | | | Escape the parentheses in the default function regexp | Rafael Mendonça França | 2013-10-21 | 1 | -1/+1 | |
| |/ |/| | | | | | | | | | | | This is causing every default value in PostreSQL database to being handled as default function. Fixes #12581 | |||||
* | | Remove `default_primary_key_type` and extract contains of ↵ | Vipul A M | 2013-10-14 | 1 | -18/+16 | |
| | | | | | | | | `native_database_types` to a constant since they aren't conditional now in SQLite3Adapter. Makes it more like other adapters. | |||||
* | | Merge pull request #11833 from vipulnsward/remove_autoincrement | Rafael Mendonça França | 2013-10-14 | 1 | -10/+1 | |
|\ \ | | | | | | | Remove sqlite specific`supports_autoincrement?` which defaults to true | |||||
| * | | Remove sqlite specific`supports_autoincrement?` which always defaults to true | Vipul A M | 2013-08-10 | 1 | -10/+1 | |
| | | | ||||||
* | | | Extract a function to determine if the default value is a function | Rafael Mendonça França | 2013-10-14 | 1 | -1/+5 | |
| | | | ||||||
* | | | Push default_function to superclass to avoid method check | Rafael Mendonça França | 2013-10-14 | 2 | -14/+17 | |
| | | | ||||||
* | | | log the statement name along with the SQL | Aaron Patterson | 2013-10-04 | 2 | -6/+7 | |
| | | | ||||||
* | | | log every sql statement, even when they error | Aaron Patterson | 2013-10-04 | 1 | -25/+25 | |
| | | | ||||||
* | | | prepare the statement inside the begin / rescue block | Aaron Patterson | 2013-10-04 | 1 | -4/+4 | |
| | | | ||||||
* | | | wrap logging around the actual query call itself. | Aaron Patterson | 2013-10-04 | 2 | -50/+50 | |
| | | | | | | | | | | | | This is to be consistent with the way the mysql2 adapter times queries | |||||
* | | | extract adapter savepoint implementations into `abstract/savepoints.rb`. | Yves Senn | 2013-09-30 | 6 | -46/+27 | |
| | | | ||||||
* | | | change the savepoint interface to allow passing the name. | Yves Senn | 2013-09-30 | 4 | -21/+21 | |
| | | | ||||||
* | | | Fixed issue #12327 | Marc Lennox | 2013-09-27 | 1 | -2/+2 | |
| | | |