| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Fixes #18787.
|
|
|
|
|
|
|
|
| |
`bound_attributes` is now used universally across the board, removing
the need for the conversion layer. These changes are mostly mechanical,
with the exception of the log subscriber. Additional, we had to
implement `hash` on the attribute objects, so they could be used as a
key for query caching.
|
|
|
|
|
|
|
| |
I'm planning on deprecating the column argument to mirror the
deprecation in [arel].
[arel]: https://github.com/rails/arel/commit/6160bfbda1d1781c3b08a33ec4955f170e95be11
|
|
|
|
|
|
|
|
| |
Previosly count and other AR calculations would convert
column_name_for_operation to sql on a default Arel::Table.engine
(AR::Base) connection. That could lead to trouble if current
model has a connection to a different adapter or Base connection
is inaccessible.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
fix for messages in invalid encoding from db-drivers
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
activerecord/test/cases/connection_adapters/abstract_adapter_test.rb
|
| | |
|
|\ \
| | |
| | |
| | | |
Clear query cache on rollback
|
| | | |
|
| | |
| | |
| | |
| | | |
/cc @sgrif
|
|/ /
| |
| |
| | |
Move microseconds formatting to `AbstractAdapter`.
|
| |
| |
| |
| | |
We can't change the signature without a deprecation cycle.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the following changes:
* warn if `:null` is not passed to `add_timestamps`
* `timestamps` method docs link to `add_timestamps` docs
* explain where additional options go
* adjust examples to include `null: false` (to prevent deprecation warnings)
|
| |
| |
| |
| | |
Oh hey, we got to remove some code because of that!
|
| |
| |
| |
| |
| |
| | |
Arel handles this for us automatically. Updated tests, as BindParam is
no longer a subclass of SqlLiteral. We should remove the second argument
to substitute_at entirely, as it's no longer used
|
| | |
|
| |
| |
| |
| |
| | |
MySQL reports the column name as `"MAX(developer_id)"`. PG will report
it as `"max"`
|
| |
| |
| |
| |
| |
| | |
We end up re-ordering them either way when we construct the Arel AST (in order
to deal with rewhere, etc), so we shouldn't bother giving it a number in the
first place beforehand.
|
| |
| |
| |
| |
| |
| |
| | |
`AbstractAdapter#supports_views?` defaults to `false` so we have to turn it on
in adapter subclasses. Currently the flag only controls test execution.
/cc @yahonda
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also add test to assets the savepoint name
|
| |
| |
| |
| |
| |
| |
| | |
Add a transaction manager per connection, so it can controls the
connection responsibilities.
Delegate transaction methods to transaction_manager
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Follow up to #15438 and #15502.
/cc @sgrif
|
| |
| |
| |
| |
| |
| | |
- 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.
|
| | |
|
| |
| |
| |
| |
| | |
`ActiveRecord::ConnectionAdapters::Type::Value` =>
`ActiveRecord::Type::Value`
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
Columns and injected types no longer have any conditionals based on the
format of SQL type strings! Hooray!
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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`.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
this lets arel know how to correctly quote the value
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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]
...
|
| | |
| | |
| | |
| | |
| | | |
This method is not being called anywhere in our code and a GitHub search
show it is not being used in any project.
|
| | |
| | |
| | |
| | |
| | | |
These comments will likely be outdated with time and doesn't include
any information that can't be found in the adapters
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is important, because adding an index on a temporary table after
it has been created would commit the transaction
Conflicts:
activerecord/CHANGELOG.md
|