| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | | | | |
|
| | | | | | | | | | |
|
|/ / / / / / / / / |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Some slight documentation edits and fixes. Also, run remove unnecessary
`RuntimeError`.
r? @arthurnn
|
| |_|_|_|/ / / /
|/| | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Refactor connection handler
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
[skip ci]
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
ConnectionHandler will not have any knowlodge of AR models now, it will
only know about the specs.
Like that we can decouple the two, and allow the same model to use more
than one connection.
Historically, folks used to create abstract AR classes on the fly in
order to have multiple connections for the same model, and override the
connection methods.
With this, now we can override the `specificiation_id` method in the
model, to return a key, that will be used to find the connection_pool
from the handler.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix failures due to transactions
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
test_migrate_clears_schema_cache_afterward test.
Disable transactions for this test.
Fixes #24391
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
In 5.0 we use bind parameters for limit and offset, while in 4.2 we used
the values directly. The code as it was written assumed that limit and
offset worked as `LIMIT ? OFFSET ?`. Both Oracle and SQL Server have a
different syntax, where the offset is stated before the limit. We
delegate this behavior to the connection adapter so that these adapters
are able to determine how the bind parameters are flattened based on
what order their specification has the various clauses appear.
Fixes #24775
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Change to use a more realistic example [ci skip]
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
destroy_all is preferred way to destroy related records.
This example just wants to demonstrate callback behaviour.
[ci skip]
|
|\ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
delegate encode_with instead of to_yaml, which is deprecated
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
After fb898e9, the `before_destroy` had some code that used
SQL interpolation left over. Don't think we should promote
that even if the values aren't directly from user input.
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
do not pass conditions to `#destroy_all` [ci skip]
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Passing conditions to `#destroy_all` was deprecated in c82c5f8.
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | | |
[ci skip]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fix failing tests
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix small typo in Active Record Migrations documentation
|
| | | | | | | | | |
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Follow up to 98264a1343fad6bb6637893a37fd571916b4158c
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Unlike `one?` and `none?`, `empty?` has interactions with methods
outside of enumerable. It also doesn't fit in the same vein.
`Topic.any?` makes sense. `Topic.empty?` does not, as `Topic` is not a
container.
Fixes #24808
Close #24812
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`schema_creation` is not public API.
https://github.com/rails/rails/blob/v5.0.0.beta4/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L121
https://github.com/rails/rails/blob/v5.0.0.beta4/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L78
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fix counter_cache double increment bug
Close #24183
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Rails should not be explicity mentioned within Active Record, since
railties and the Rails ecosystem is not required for use.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Refactor of #22911.
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Follow up of 1683410.
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
| |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`ActiveRecord::Migration` needn't know about migration version
compatibility lookup. Delegate it to the Compatibility module.
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Conflicts:
guides/source/configuring.md
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
[ci skip]
|
| | | | | | | | | |
|
| |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Currently, loading the schema (schema_load)
accesses the locking column (locking_column)
which defaults the value (reset_locking_column)
which invalidates the schema (reload_schema_from_cache)
which forces another schema load.
Good news:
The second schema_load does accesses locking_column,
but locking_column is set, so it does not reset_locking_column
and it does not trigger an infinite loop.
The solution is not invalidate the cache while default locking_column
|
| |_|_|_|_|/ /
|/| | | | | | |
|