| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | | |
| | | |
| | | |
| | | | |
chopraanmol1/support_for_has_many_and_has_one_for_where_relation
Fixed query building when relation is passed for has one or has many association in where
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
has many association wrong set of primary key and foreign key are selected.
Changed code to use 'join' primary key and foreign key over 'association' primary key and foreign key.
|
|\ \ \ \
| | | | |
| | | | | |
Use copy to preserve file permissions
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Return Not found Ids in ActiveRecord::NotFound
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This builds on top of 15e2da656f41af0124f7577858536f3b65462ad5.
now it also returns exact Ids which were not found which will be debugging simple.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
More robust PostgreSQL database duplication check
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes #29045.
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
refs: https://github.com/rails/rails/pull/30161
```
$ echo "+@size+" | rdoc --pipe
<p>+@size+</p>
$ echo "<tt>@size</tt>" | rdoc --pipe
<p><code>@size</code></p>
```
[ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Otherwise `ConnectionPool#reap` may run before `@connections` has
initialized.
https://travis-ci.org/rails/rails/jobs/263037427#L888-L890
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add missed `require`
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | | |
`ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration`
depends on `Concurrent::Map`.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
yukideluxe/add-missing-bit-reload-associations-docs
add missing collection.reload documentation [ci skip]
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This module has behavior that is not present in `ActiveModel::Dirty`,
which is intended to be public API.
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
add reload_association to documentation
|
| |/ / / / |
|
|/ / / / |
|
|\ \ \ \
| |_|_|/
|/| | | |
Do not let use `serialize` on native JSON/array column
|
| |/ / |
|
| |/
|/|
| |
| |
| | |
Statement caches are used as a concurrent map. It will more clarify to
using `Concurrent::Map`.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Actually `StatementCache#execute` is always passed the same klass that
the owner klass of the connection when the statement cache is created.
So passing `klass` to `StatementCache.new` will make more DRY.
|
|\ \
| | |
| | | |
Handling add/remove to/from migration edge cases
|
| | |
| | |
| | |
| | | |
Making sure the table name is parsed correctly when an add/remove column migration have 'from'/'to' in the table name.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
kamipo/relation_merger_should_not_fill_empty_values
`Relation::Merger` should not fill `values` with empty values
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently `Relation#merge` will almost fill `values` with empty values
(e.g. `other.order_values` is always true, it should be
`other.order_values.any?`). This means that `Relation#merge` always
changes `values` even if actually `values` is nothing changed. This
behavior will makes `Relation#empty_scope?` fragile. So `Relation#merge`
should avoid unnecessary changes.
|
|\ \ \ \
| | | | |
| | | | | |
Fix `find_by` with range conditions
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`StatementCache` doesn't support range conditions. So we need to through
the args to `FinderMethods#find_by` if range value is passed.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Sync transaction state when accessing primary key
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If a record is modified inside a transaction, it must check the outcome
of that transaction before accessing any state which would no longer be
valid if it was rolled back.
For example, consider a new record that was saved inside a transaction
which was later rolled back: it should be restored to its previous state
so that saving it again inserts a new row into the database instead of
trying to update a row that no longer exists.
The `id` and `id=` methods defined on the PrimaryKey module implement
this correctly, but when a model uses a custom primary key, the reader
and writer methods for that attribute must check the transaction state
too. The `read_attribute` and `write_attribute` methods also need to
check the transaction state when accessing the primary key.
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
Avoid duplicate clauses when using #or
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Condenses the clauses that are common to both sides of the OR and put them outside, before the OR
This fix the current behavior where the number of conditions is exponential based on the number of times #or is used.
|
| |_|_|_|/
|/| | | |
| | | | |
| | | | |
| | | | | |
It seems that it accepts only HTTPS connections.
Ref: https://github.com/postgres/postgres/commit/7f77cbd996855a06fb742ea11adbe55c42b48fe2
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Building `where_clause` in `UniquenessValidator` is no longer needed
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Building `where_clause` manually was introduced at #26073 to include
both `comparison` and `binds` in `where_clause`. Since 213796f,
`comparison` includes `binds`, so it is enough to use `where` simply.
|
| | | | |
| | | | |
| | | | |
| | | | | |
For less duplicated code.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were expecting those classes to be loaded when an association is
defined but they are not.
If you add a debugger on the first line of any of those classes and try
to define the corresponding association you will see that the classes
are not loaded.
Fixes #26273
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Anywhere that we're doing `self.class.unscoped.where(primary_key => id)`
is somewhere that someone may want to extend. Even if this method isn't
public API yet, this will make it easier for us to eventually expose an
API around this. Plus, duplicated code makes me sad.
|
|\ \ \ \
| | | | |
| | | | | |
Remove single element array preprocess
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since 213796f, array predicate handler supports making binds, so the
preprocess is no longer needed.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The limit option is ignored by PostgreSQL and may be ignored by 3rd
party backends. Make this clear in the docs. Fixes #29922.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Note that the two relations must still have the same `includes` values
(which is the only time `references` actually does anything). It makes
sense for us to allow this, as `references` is called implicitly when
passing a hash to `where`.
Fixes #29411
|
|\ \ \ \
| | | | |
| | | | | |
Remove useless `JoinInformation`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since 213796f removed `binds`, `JoinInformation` only contain `joins`.
So it is enough to return `joins` simply.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove unused `queries_predicates`
|