| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |/
| |/|
| | |
| | |
| | | |
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.
|
|\ \ \
| |_|/
|/| | |
Remove unneccessary special case for money in quoting
|
| | | |
|
|\ \ \
| | | |
| | | | |
Do not rely on the column type when quoting infinity
|
| |/ / |
|
|/ / |
|
| |
| |
| |
| |
| | |
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 CVE-2014-3483 and protect against CVE-2014-3482.
|
|\
| |
| | |
Remove array workaround in PG quoting
|
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
Hstore no longer needs additional quoting to be used in an array, the
array type handles it sufficiently.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This allows to create and remove foreign keys without specifying a column.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Encapsulate knowledge of type objects on `ActiveRecord::Result`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
Remove unused params
|
| |/ |
|
|/
|
|
|
|
| |
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.
|
|\
| |
| | |
Don't use column object for type casting in `quoting`
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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)
|
|/ |
|
|\
| |
| | |
Don't type cast the default on the column
|
| |
| |
| |
| |
| |
| |
| | |
If we want to have type decorators mess with the attribute, but not the
column, we need to stop type casting on the column. Where possible, we
changed the tests to test the value of `column_defaults`, which is
public API. `Column#default` is not.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Also takes a step towards supporting types which use a character other
than ',' for the delimiter (`box` is the only built in type for which
this is the case)
|
|\ \
| |/
|/| |
Move pg array database type casting to the Array type
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The case where we have a column object, but don't have a type cast
method involves type casting the default value when changing the schema.
We get one of the column definition structs instead. That is a case that
I'm trying to remove overall, but in the short term, we can achieve the
same behavior without needing to pass the adapter to the array type by
creating a fake type that proxies to the adapter.
|
|/
|
|
|
|
|
|
|
| |
HStore columns come back from the database separated by a comma and a
space, not just a comma. We need to mirror that behavior since we
compare the two values.
Also adds a regression test against JSON to ensure we don't have the
same bug there.
|