Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Merge pull request #16057 from akshay-vishnoi/doc_change | Zachary Scott | 2014-07-06 | 2 | -3/+3 | |
|\ \ | | | | | | | [ci skip] /sqlite/i --> SQLite | |||||
| * | | [ci skip] /sqlite/i --> SQLite | Akshay Vishnoi | 2014-07-06 | 2 | -3/+3 | |
| | | | ||||||
* | | | Merge pull request #16065 from matthewd/mysql-explicit-non-strict | Matthew Draper | 2014-07-06 | 1 | -2/+2 | |
|\ \ \ | | | | | | | | | If our connection is explicitly non-strict, tell MySQL | |||||
| * | | | If our connection is explicitly non-strict, tell MySQL | Matthew Draper | 2014-07-06 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We default to making the connection strict, but have historically relied on the MySQL default when we want it to be non-strict. On some (recent?) versions of MySQL, new connections default to being strict, so if we've been told 'strict:false', we're obliged to pass that on. This fixes a test failure that we've seen turn up on relatively-new development machines, so we do already have a test covering it. | |||||
* | | | | Use the type object for quoting PG Ranges | Sean Griffin | 2014-07-05 | 4 | -48/+34 | |
| | | | | ||||||
* | | | | Revert "Use a type object for type casting behavior on SQLite3" | Matthew Draper | 2014-07-05 | 1 | -37/+13 | |
|/ / / | ||||||
* | | | Merge pull request #16003 from sgrif/sg-refactor-sqlite3-strings | Matthew Draper | 2014-07-05 | 1 | -13/+37 | |
|\ \ \ | | | | | | | | | Use a type object for type casting behavior on SQLite3 | |||||
| * | | | Use a type object for type casting behavior on SQLite3 | Sean Griffin | 2014-07-01 | 1 | -13/+37 | |
| | |/ | |/| | | | | | | | | | | Note: I'm not sure we actually need to be logging when this happens. This code would be a fair bit cleaner if we didn't need to log it. | |||||
* | | | Merge pull request #16037 from sgrif/sg-money-quoting | Rafael Mendonça França | 2014-07-04 | 1 | -7/+0 | |
|\ \ \ | |_|/ |/| | | Remove unneccessary special case for money in quoting | |||||
| * | | Remove unneccessary special case for money in quoting | Sean Griffin | 2014-07-03 | 1 | -7/+0 | |
| | | | ||||||
* | | | Merge pull request #16036 from sgrif/sg-datetime-infinity | Rafael Mendonça França | 2014-07-03 | 2 | -3/+2 | |
|\ \ \ | | | | | | | | | Do not rely on the column type when quoting infinity | |||||
| * | | | Do not rely on the column type when quoting infinity | Sean Griffin | 2014-07-03 | 2 | -3/+2 | |
| |/ / | ||||||
* / / | Use the type object for type casting HStore columns | Sean Griffin | 2014-07-03 | 3 | -55/+34 | |
|/ / | ||||||
* | | Quote range strings when quoting PG ranges | Sean Griffin | 2014-07-02 | 1 | -1/+1 | |
| | | | | | | | | | | The test case for CVE-2014-3483 doesn't actually send the generated SQL to the database. The generated SQL is actually invalid for real inputs. | |||||
* | | Fix SQL injection when querying against ranges and bitstrings | Rafael Mendonça França | 2014-07-02 | 2 | -4/+5 | |
|/ | | | | Fix CVE-2014-3483 and protect against CVE-2014-3482. | |||||
* | Merge pull request #15977 from sgrif/sg-remove-array-hack | Godfrey Chan | 2014-06-29 | 1 | -24/+0 | |
|\ | | | | | Remove array workaround in PG quoting | |||||
| * | Remove array workaround in PG quoting | Sean Griffin | 2014-06-29 | 1 | -24/+0 | |
| | | | | | | | | | | We no longer need to do fancy legwork to make sure arrays use a type object, now that schema methods use a real type object. | |||||
* | | Remove unused `array_member` from PG quoting for HStore columns | Sean Griffin | 2014-06-29 | 2 | -12/+9 | |
|/ | | | | | Hstore no longer needs additional quoting to be used in an array, the array type handles it sufficiently. | |||||
* | Use the type object when sending point columns to the DB | Sean Griffin | 2014-06-29 | 3 | -19/+9 | |
| | ||||||
* | Use the type object for sending JSON to the database | Sean Griffin | 2014-06-29 | 3 | -22/+10 | |
| | ||||||
* | Always pass a column with a type object to quote | Sean Griffin | 2014-06-28 | 6 | -15/+23 | |
| | | | | | | | | 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. | |||||
* | rename sequence only if it exists | Abdelkader Boudih | 2014-06-27 | 1 | -3/+3 | |
| | ||||||
* | Change method visibility | Rafael Mendonça França | 2014-06-26 | 1 | -2/+2 | |
| | ||||||
* | Add nodoc to internal class [ci skip] | Rafael Mendonça França | 2014-06-26 | 1 | -1/+1 | |
| | ||||||
* | fk: add docs | Yves Senn | 2014-06-26 | 1 | -0/+58 | |
| | ||||||
* | fk: review corrections: indent, visibility, syntax, wording. | Yves Senn | 2014-06-26 | 4 | -49/+50 | |
| | ||||||
* | fk: use random digest names | Yves Senn | 2014-06-26 | 3 | -10/+23 | |
| | | | | | | The name of the foreign key is not relevant from a users perspective. Using random names resolves the urge to rename the foreign key when the respective table or column is renamed. | |||||
* | fk: raise for invalid :on_update / :on_delete values | Yves Senn | 2014-06-26 | 1 | -3/+8 | |
| | ||||||
* | fk: `add/remove_foreign_key` are noop for adapters that don't support fk | Yves Senn | 2014-06-26 | 1 | -0/+4 | |
| | ||||||
* | fk: raise when identifiers are longer than `allowed_index_name_length`. | Yves Senn | 2014-06-26 | 1 | -1/+5 | |
| | ||||||
* | fk: support for on_update | Yves Senn | 2014-06-26 | 5 | -16/+32 | |
| | ||||||
* | fk: rename `dependent` to `on_delete` | Yves Senn | 2014-06-26 | 5 | -13/+12 | |
| | ||||||
* | fk: infere column name from table names. | Yves Senn | 2014-06-26 | 1 | -4/+14 | |
| | | | | This allows to create and remove foreign keys without specifying a column. | |||||
* | fk: support dependent option (:delete, :nullify and :restrict). | Yves Senn | 2014-06-26 | 5 | -4/+39 | |
| | ||||||
* | fk: `:primary_key` option for non-standard pk's. | Yves Senn | 2014-06-26 | 1 | -1/+3 | |
| | ||||||
* | fk: generalize using `AlterTable` and `SchemaCreation`. | Yves Senn | 2014-06-26 | 5 | -47/+60 | |
| | ||||||
* | fk: `foreign_keys`, `add_foreign_key` and `remove_foreign_key` for MySQL | Yves Senn | 2014-06-26 | 5 | -21/+65 | |
| | ||||||
* | fk: add `foreign_keys` for PostgreSQL adapter. | Yves Senn | 2014-06-26 | 2 | -0/+38 | |
| | ||||||
* | fk: `add_foreign_key` and `remove_foreign_key` for PostgreSQL adapter. | Yves Senn | 2014-06-26 | 3 | -0/+36 | |
| | ||||||
* | Move writing unknown column exception to null attribute | Sean Griffin | 2014-06-26 | 1 | -1/+1 | |
| | | | | | | Making this change revealed several subtle bugs related to models with no primary key, and anonymous classes. These have been fixed as well, with regression tests added. | |||||
* | Merge pull request #15847 from sgrif/sg-encapsulate-result-types | Rafael Mendonça França | 2014-06-26 | 1 | -3/+2 | |
|\ | | | | | Encapsulate knowledge of type objects on `ActiveRecord::Result` | |||||
| * | Encapsulate knowledge of type objects on `ActiveRecord::Result` | Sean Griffin | 2014-06-22 | 1 | -3/+2 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to reduce the number of places that care about the details of how type casting occurs. We remove the type casting of the primary key in `JoinDependecy`, rather than encapsulating it. It was originally added for consistency with https://github.com/rails/rails/commit/40898c8c19fa04442fc5f8fb5daf3a8bdb9a1e03#diff-06059df8d3dee3101718fb2c01151ad0R211, but that conditional was later removed in https://github.com/rails/rails/commit/d7ddaa530fd1b94e22d745cbaf2e8a5a34ee9734. What is important is that the same row twice will have the same value for the primary key, which it will. | |||||
* | | add missing `:nodoc:` for recent refactorings. [ci skip] | Yves Senn | 2014-06-24 | 24 | -25/+25 | |
| | | | | | | | | | | | | | | | | | | | | Adding `# :nodoc:` to the parent `class` / `module` is not going to ignore nested classes or modules. There is a modifier `# :nodoc: all` but sadly the containing class or module will continue to be in the docs. /cc @sgrif | |||||
* | | Merge pull request #15881 from mmozuras/remove_unused_params | Rafael Mendonça França | 2014-06-23 | 1 | -3/+3 | |
|\ \ | | | | | | | Remove unused params | |||||
| * | | Remove unused param 'conn' from ConnectionPool#release | Mindaugas Mozūras | 2014-06-23 | 1 | -3/+3 | |
| |/ | ||||||
* / | Add a deprecation cycle for `NullColumn` from `column_for_attribute` | Sean Griffin | 2014-06-23 | 1 | -6/+0 | |
|/ | | | | | | This is public API, and `simple_form` depends on the `nil` return value. We need to go through a deprecation cycle to return a null object. If people want hash access, they can access the hash. | |||||
* | Merge pull request #15802 from sgrif/sg-column-quoting | Rafael Mendonça França | 2014-06-19 | 2 | -6/+6 | |
|\ | | | | | Don't use column object for type casting in `quoting` | |||||
| * | Don't use column object for type casting in `quoting` | Sean Griffin | 2014-06-18 | 2 | -6/+6 | |
| | | | | | | | | | | | | | | | | | | We're never going to be able to use the attribute object here, however, so let's just accept the ugly demeter violation here for now. Remove test cases which were either redundant with other tests in the file, or were actually testing the type objects (which are tested elsewhere) | |||||
* | | this method is no longer being used | Josh Sharpe | 2014-06-19 | 1 | -4/+0 | |
|/ | ||||||
* | Merge pull request #15782 from sgrif/sg-column-defaults | Matthew Draper | 2014-06-18 | 3 | -15/+19 | |
|\ | | | | | Don't type cast the default on the column |