Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | SQLite: Foreign Key Support | Ryuta Kamizono | 2017-01-17 | 1 | -0/+25 |
| | | | | https://www.sqlite.org/foreignkeys.html | ||||
* | Translate Foreign Key violation to the specific exception for SQLite3 adapter | Ryuta Kamizono | 2017-01-16 | 1 | -0/+21 |
| | | | | | | Raise `ActiveRecord::InvalidForeignKey` when a record cannot be inserted or updated because it references a non-existent record for SQLite3 adapter. | ||||
* | Deprecate passing `name` to `indexes` like `tables` | Ryuta Kamizono | 2017-01-04 | 1 | -0/+6 |
| | | | | | Passing `name` to `tables` is already deprecated at #21601. Passing `name` to `indexes` is also unused. | ||||
* | `#tables` and `#table_exists?` and returns only tables and not views | Rafael Mendonça França | 2016-12-29 | 1 | -20/+13 |
| | |||||
* | Remove deprecated `name` argument from `#tables` | Rafael Mendonça França | 2016-12-29 | 1 | -7/+1 |
| | |||||
* | Fix Rubocop violations and fix documentation visibility | Rafael Mendonça França | 2016-12-28 | 1 | -2/+2 |
| | | | | | | Some methods were added to public API in 5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of the public API. | ||||
* | Privatize unneededly protected methods in Active Record | Akira Matsuda | 2016-12-24 | 1 | -10/+9 |
| | |||||
* | Translate NOT NULL violation to the specific exception | Ryuta Kamizono | 2016-12-06 | 1 | -0/+2 |
| | | | | | Raise `ActiveRecord::NotNullViolation` when a record cannot be inserted or updated because it would violate a not null constraint. | ||||
* | Change MySQL and Postgresql to use Bigint primary keys | Jon McCartie | 2016-12-05 | 1 | -0/+2 |
| | |||||
* | Make `:auto_increment` to internal primary key option | Ryuta Kamizono | 2016-12-06 | 1 | -0/+9 |
| | | | | | | Using `:auto_increment` option for abstracting the DB-specific auto incremental types. It is worth to ease to implement the compatibility layer. | ||||
* | Add `:nodoc` to `table_structure` | Ryuta Kamizono | 2016-11-12 | 1 | -9/+2 |
| | | | | | | | | Follow up to #27008. `table_structure` is an internal method so it is better to hide it in the doc. And alias `table_structure` to `column_definitions` to remove the duplicated `columns` method in the sqlite3 adapter. | ||||
* | Refactor column initialization into `new_column_from_field` | Kir Shatrov | 2016-11-11 | 1 | -12/+16 |
| | | | | that accepts results of SHOW FIELDS | ||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -6/+6 |
| | |||||
* | Fix the variable scoping issue I introduced in ↵ | Matthew Draper | 2016-10-28 | 1 | -2/+2 |
| | | | | 007e50d8e5a900547471b6c4ec79d9d217682c5d | ||||
* | Permit loads while queries are running | Matthew Draper | 2016-10-27 | 1 | -19/+25 |
| | | | | | A query may wait on a database-level lock, which could lead to a deadlock between threads. | ||||
* | Quote table name properly | Ryuta Kamizono | 2016-10-14 | 1 | -4/+6 |
| | | | | If does not quote table name properly, invalid SQL is generated. | ||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -5/+5 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -3/+3 |
| | |||||
* | modernizes hash syntax in activerecord | Xavier Noria | 2016-08-06 | 1 | -6/+6 |
| | |||||
* | applies new string literal convention in activerecord/lib | Xavier Noria | 2016-08-06 | 1 | -40/+40 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Merge pull request #25523 from kamipo/extract_quoted_binds_type_casted_binds | Sean Griffin | 2016-07-26 | 1 | -3/+3 |
|\ | | | | | Extract `type_casted_binds` method | ||||
| * | Extract `type_casted_binds` method | Ryuta Kamizono | 2016-07-26 | 1 | -3/+3 |
| | | | | | | | | | | Because `type_cast` against `binds` always requires `attr.value_for_database` and this pattern appears frequently. | ||||
* | | systematic revision of =~ usage in AR | Xavier Noria | 2016-07-23 | 1 | -1/+1 |
|/ | | | | | Where appropriatei, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with? | ||||
* | Pass `type_casted_binds` to log subscriber for logging bind values properly | Ryuta Kamizono | 2016-07-19 | 1 | -1/+1 |
| | | | | Address to https://github.com/rails/rails/commit/5a302bf553af0e6fedfc63299fc5cd6e79599ef3#commitcomment-18288388. | ||||
* | rails -> Rails [ci skip] | Santosh Wadghule | 2016-07-12 | 1 | -1/+1 |
| | |||||
* | Fix some typos in comments. | Joe Rafaniello | 2016-05-04 | 1 | -1/+1 |
| | | | | [ci skip] | ||||
* | Dont simply assume a type is a valid database type. This is only always true ↵ | Vipul A M | 2016-04-25 | 1 | -0/+4 |
| | | | | | | | in the case of sqlite. Others adapters need to perform a check for validity. Add coverage for mysql2 db type validation | ||||
* | Follow up of #23461 | Vipul A M | 2016-04-24 | 1 | -1/+1 |
| | | | | | | | | - Rename max to statement_limit - Remove magic number 1000 from everywhere - Defined StatementPool::DEFAULT_STATEMENT_LIMIT and started using it everywhere Signed-off-by: Jeremy Daer <jeremydaer@gmail.com> | ||||
* | Include the Savepoints module in all adapters. | Vipul A M | 2016-04-24 | 1 | -1/+0 |
| | | | | | Adapters override `#supports_savepoints?` to return `true` if they support transaction savepoints. Defaults to `false`. | ||||
* | Move `select_rows` implementation to super class | Ryuta Kamizono | 2016-04-24 | 1 | -4/+0 |
| | |||||
* | https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a ↵ | Vipul A M | 2016-04-23 | 1 | -0/+4 |
| | | | | | | | | | 78 changed INSERT INTO versions to run in 1 single query. This breaks for sqlite versions < 3.7.11, which is especially the case on Ubuntu 12.04 LTS, that has SQLite version 3.7.9 as default. So we check for support for multi insert, before performing single query inserts, else fallback to older version of running multiple queries. [Vipul A M & Yasuo Honda] | ||||
* | Define `arel_visitor` method on all adapters | Ryuta Kamizono | 2016-04-20 | 1 | -0/+4 |
| | | | | `Arel::Visitors::VISITORS` was removed at https://github.com/rails/arel/pull/412. | ||||
* | Merge pull request #23515 from kamipo/extract_arel_visitor | Jeremy Daer | 2016-04-19 | 1 | -9/+0 |
|\ | | | | | | | Extract `arel_visitor` and move up to the abstract adapter | ||||
| * | Extract `arel_visitor` and move up to the abstract adapter | Ryuta Kamizono | 2016-04-04 | 1 | -9/+0 |
| | | |||||
* | | Move `quoted_date`, `quote_string` and `quote_table_name_for_assignment` ↵ | Ryuta Kamizono | 2016-04-05 | 1 | -10/+0 |
|/ | | | | methods to `Quoting` module | ||||
* | Move `@quoted_{column|table}_names` cache up to the abstract adapter | Ryuta Kamizono | 2016-03-31 | 1 | -5/+0 |
| | |||||
* | Make to private the visibility of `_quote` and `_type_cast` | Ryuta Kamizono | 2016-03-30 | 1 | -24/+3 |
| | |||||
* | Passing `table_name` to `Column#initialize` to avoid `instance_variable_set` | Ryuta Kamizono | 2016-03-08 | 1 | -3/+1 |
| | |||||
* | Initialize `column.table_name` immediately for `column.serial?` correctly ↵ | Ryuta Kamizono | 2016-03-08 | 1 | -2/+5 |
| | | | | | | | | working Currently the results of `column.serial?` is not correct. For `column.serial?` correctly working, initialize `column.table_name` immediately. | ||||
* | SQLite 2 support has been dropped [ci skip] | Ryuta Kamizono | 2016-02-04 | 1 | -1/+0 |
| | |||||
* | Extract `ExplainPrettyPrinter` to appropriate files | Ryuta Kamizono | 2016-02-01 | 1 | -15/+2 |
| | |||||
* | `{update|delete}_sql` are almost the same as `{update|delete}` | Ryuta Kamizono | 2016-01-08 | 1 | -5/+0 |
| | | | | Simply `{update|delete}_sql` aliases to `{update|delete}`. | ||||
* | Remove `delete_sql` in sqlite3 adapter | Ryuta Kamizono | 2016-01-07 | 1 | -5/+0 |
| | | | | | `sql += " WHERE 1=1"` was introduced in 69cb942. But it is not needed. ref https://www.sqlite.org/lang_delete.html | ||||
* | Refactor `connection.insert_sql` | Ryuta Kamizono | 2016-01-07 | 1 | -5/+0 |
| | | | | `connection.insert_sql` is almost the same as `connection.insert`. | ||||
* | Fix `connection#create` in PG adapter | Ryuta Kamizono | 2016-01-05 | 1 | -1/+0 |
| | | | | | | Originally `connection#create` had aliased to `connection#insert` in PG adapter. But it was broken by #7447. Re-alias `create` to `insert` for fixing it. | ||||
* | Support supports_datetime_with_precision? for sqlite3 | Yasuo Honda | 2015-11-30 | 1 | -0/+4 |
| | |||||
* | Refactor `AbstractAdapter#initialize` | Ryuta Kamizono | 2015-11-30 | 1 | -2/+1 |
| | | | | `pool` in args is unused anymore. And `config` is used in all adapters. | ||||
* | Deprecate `#table_exists?`, `#tables` and passing arguments to `#talbes` | yui-knk | 2015-11-09 | 1 | -2/+26 |
| | | | | | | | | | | Reported on #21509, how views is treated by `#tables` are differ by each adapters. To fix this different behavior, after Rails 5.0 is released, deprecate `#tables`. And `#table_exists?` would check both tables and views. To make their behavior consistent with `#tables`, after Rails 5.0 is released, deprecate `#table_exists?`. | ||||
* | Deprecate exception#original_exception in favor of exception#cause | Yuki Nishijima | 2015-11-03 | 1 | -2/+2 |
| | |||||
* | Remove `#tables` extra args again | Ryuta Kamizono | 2015-10-22 | 1 | -12/+8 |
| | | | | | | This issue was resolved by #21687 already. But re-add args by #18856. `#tables` extra args was only using by `#table_exists?`. This is for internal API. This commit will remove these extra args again. |