| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
`supports_primary_key?` was added to determine if `primary_key` is
implemented in the adapter in f060221. But we already use `primary_key`
without `supports_primary_key?` (207f266, 5f3cf42) and using
`supports_primary_key?` has been removed in #1318. This means that
`supports_primary_key?` is no longer used in the internal and Active
Record doesn't work without `primary_key` is implemented (all adapters
must implement `primary_key`).
Closes #27977
|
|
|
|
|
|
|
|
| |
Follow up to #26266.
The default type of `primary_key` and `references` were changed to
`bigint` since #26266. But legacy migration and sqlite3 adapter should
keep its previous behavior.
|
|
|
|
| |
https://www.sqlite.org/foreignkeys.html
|
|
|
|
|
|
| |
Raise `ActiveRecord::InvalidForeignKey` when a record cannot be inserted
or updated because it references a non-existent record for SQLite3
adapter.
|
|
|
|
|
| |
Passing `name` to `tables` is already deprecated at #21601.
Passing `name` to `indexes` is also unused.
|
| |
|
| |
|
|
|
|
|
|
| |
Some methods were added to public API in
5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of
the public API.
|
| |
|
|
|
|
|
| |
Raise `ActiveRecord::NotNullViolation` when a record cannot be inserted
or updated because it would violate a not null constraint.
|
| |
|
|
|
|
|
|
| |
Using `:auto_increment` option for abstracting the DB-specific auto
incremental types. It is worth to ease to implement the compatibility
layer.
|
|
|
|
|
|
|
|
| |
Follow up to #27008.
`table_structure` is an internal method so it is better to hide it in
the doc. And alias `table_structure` to `column_definitions` to remove
the duplicated `columns` method in the sqlite3 adapter.
|
|
|
|
| |
that accepts results of SHOW FIELDS
|
| |
|
|
|
|
| |
007e50d8e5a900547471b6c4ec79d9d217682c5d
|
|
|
|
|
| |
A query may wait on a database-level lock, which could lead to a
deadlock between threads.
|
|
|
|
| |
If does not quote table name properly, invalid SQL is generated.
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|\
| |
| | |
Extract `type_casted_binds` method
|
| |
| |
| |
| |
| | |
Because `type_cast` against `binds` always requires
`attr.value_for_database` and this pattern appears frequently.
|
|/
|
|
|
| |
Where appropriatei, prefer the more concise Regexp#match?,
String#include?, String#start_with?, or String#end_with?
|
|
|
|
| |
Address to https://github.com/rails/rails/commit/5a302bf553af0e6fedfc63299fc5cd6e79599ef3#commitcomment-18288388.
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
| |
in the case of sqlite.
Others adapters need to perform a check for validity.
Add coverage for mysql2 db type validation
|
|
|
|
|
|
|
|
| |
- Rename max to statement_limit
- Remove magic number 1000 from everywhere
- Defined StatementPool::DEFAULT_STATEMENT_LIMIT and started using it everywhere
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
|
|
|
|
| |
Adapters override `#supports_savepoints?` to return `true` if they
support transaction savepoints. Defaults to `false`.
|
| |
|
|
|
|
|
|
|
|
|
| |
78 changed INSERT INTO versions to run in 1 single query.
This breaks for sqlite versions < 3.7.11, which is especially the case on Ubuntu 12.04 LTS, that has SQLite version 3.7.9 as default.
So we check for support for multi insert, before performing single query inserts, else fallback to older version of running multiple queries.
[Vipul A M & Yasuo Honda]
|
|
|
|
| |
`Arel::Visitors::VISITORS` was removed at https://github.com/rails/arel/pull/412.
|
|\
| |
| |
| | |
Extract `arel_visitor` and move up to the abstract adapter
|
| | |
|
|/
|
|
| |
methods to `Quoting` module
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
working
Currently the results of `column.serial?` is not correct. For
`column.serial?` correctly working, initialize `column.table_name`
immediately.
|
| |
|
| |
|
|
|
|
| |
Simply `{update|delete}_sql` aliases to `{update|delete}`.
|
|
|
|
|
| |
`sql += " WHERE 1=1"` was introduced in 69cb942.
But it is not needed. ref https://www.sqlite.org/lang_delete.html
|
|
|
|
| |
`connection.insert_sql` is almost the same as `connection.insert`.
|
|
|
|
|
|
| |
Originally `connection#create` had aliased to `connection#insert` in PG
adapter. But it was broken by #7447. Re-alias `create` to `insert` for
fixing it.
|
| |
|
|
|
|
| |
`pool` in args is unused anymore. And `config` is used in all adapters.
|
|
|
|
|
|
|
|
|
|
| |
Reported on #21509, how views is treated by `#tables` are differ
by each adapters. To fix this different behavior, after Rails 5.0
is released, deprecate `#tables`.
And `#table_exists?` would check both tables and views.
To make their behavior consistent with `#tables`, after Rails 5.0
is released, deprecate `#table_exists?`.
|