| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When Rails starts, tables existence check query is executed
number of models.
In case of mysql,
SHOW TABLES LIKE 'table1';
SHOW TABLES LIKE 'table2';
SHOW TABLES LIKE 'table3';
...
SHOW TABLES LIKE 'table999';
Add process to get the names of all tables by one query.
|
|\
| |
| | |
Clarify Transaction responsibilities by breaking unneeded inheritance hierarchy.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Transaction class doesnt need to encapsulate the transaction state using
inheritance.
This removes all Transaction subclasses, and let the Transaction object
controls different actions based on its own state. Basically the only
actions would behave differently are `being`,`commit`,`rollback` as they
could act in a savepoint or in a real transaction.
|
|/
|
|
|
|
|
|
| |
The method has been removed in 09206716f8695f6b8467f15c1befa5a4c3c10978
(PR #16074), but the delegation was apparently missed, and one instance
of the method was added back with the addition of OID::Xml in
336be2bdf7dfa1b31879d0ab27e5f3101b351923 (PR #16072), so we can safely
rm both.
|
| |
|
| |
|
|\
| |
| | |
Transactions refactoring - 2
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
This makes the implicit description of how connection pooling works a
little more explicit. It converts the examples of a model hierarchy into
actual Ruby code and demonstrates how the key structure of the
database.yml relates to the `establish_connection` method.
|
|
|
|
|
|
|
|
|
| |
This piece of code was introduced on
67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling
`committed?` in the `transaction_state` before calling the `committed!`
method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the
`committed?` check was removed and replaced by a `finalized?`, which
only checks if the state is not nil. Thus we can remove that line.
|
| |
|
| |
|
|\
| |
| |
| | |
Transactions refactoring
|
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
[ci skip] Fix documentation of SQLite3Adapter.columns where SQLite3Column was removed in e781aa31fc52a7c696115302ef4d4e02bfd1533b
|
| | |
| | |
| | | |
As of https://github.com/rails/rails/commit/e781aa31fc52a7c696115302ef4d4e02bfd1533b SQLite3Column has been dropped.
|
| |/
|/|
| |
| | |
[Philippe Creux, Chris Teague]
|
|\|
| |
| | |
Fixes #16265 and correct documentation typo
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Closes #16261.
[Matthew Draper, Yves Senn]
Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`.
However, PostgreSQL will cast the default to the columns type,
which leaves us with a default like "default NULL::character varying".
/cc @matthewd
|
|\
| |
| |
| |
| |
| | |
* Allow to specify a type for foreign key column in migrations
* unified the docs
* some cleanup in CHANGELOG
|
|/
|
|
| |
[Andrey Novikov & Łukasz Sarnacki]
|
|\
| |
| |
| |
| |
| |
| | |
Treat invalid uuid as nil
Conflicts:
activerecord/CHANGELOG.md
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Don't rely on the column SQL type for bit string quoting
|
| | |
|
|\ \
| |/
|/| |
Use a type object for type casting behavior on SQLite3
|
| | |
|
|\ \
| | |
| | | |
Remove PG's definition of `type_cast`
|
| | |
| | |
| | |
| | |
| | | |
All cases except for `nil` in an array have been removed. `nil` in an
array is handled by the Array type object.
|
|\ \ \
| | | |
| | | | |
Don't rely on the sql type to quote XML columns in PG
|
| |/ / |
|
|/ /
| |
| |
| |
| |
| |
| | |
This was only used for uniqueness validations. The first usage was in
conjunction with `limit`. Types which cast to string, but are not
considered text cannot have a limit. The second case was only with an
explicit `:case_sensitive => true` option given by the user.
|
| |
| |
| |
| | |
adapter, fixed from #16057 [ci skip]
|
|\ \
| | |
| | | |
[ci skip] /sqlite/i --> SQLite
|
| | | |
|
|\ \ \
| | | |
| | | | |
If our connection is explicitly non-strict, tell MySQL
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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 a type object for type casting behavior on SQLite3
|