| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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`.
|
|
|
|
| |
double limits
|
|\
| |
| |
| | |
[postgres] remove (outer) sub-class declarations with nested modules/classes
|
| |
| |
| |
| | |
redundant
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* by default composite types are mapped as `OID::Identity` and issue a warning
* the user is advised to register his own `OID::Type` to make use of composite types
Registering a new `OID::Type` does currently not allow to specify the type casting
behavior when writing to the database. In order for it to work we need to use the
values within `@attributes`. They are already being type casted and are ready to be
written to the DB.
See https://github.com/rails/rails/blob/57643c961feb24b662620d330e71103a830003e8/activerecord/lib/active_record/attribute_methods.rb#L460-L462
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #10802.
|
|
|
|
| |
Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`.
|
|
|
|
|
| |
This test was inspired by #14866. That PR would break this
functionality and we should make sure we notice that in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This resulted in some unrelated errors on Traivs:
1) Error:
PostgresqlUUIDTest#test_treat_blank_uuid_as_nil:
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "thingy" of relation "uuid_data_type" does not exist
LINE 1: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNIN...
^
: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNING "id"
/cc @zuhao
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Symbolize variables of mysql/mysql2 connection configuration
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| | |
For mysql2/mysql adapters, `sql_mode` variable name set in `database.yml`
as string, was ignored and `sql_mode` was set to use strict mode.
Fixes #14895
|
|\ \
| |/
|/|
| |
| |
| |
| | |
SQLite3: Always close statements.
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| |
| |
| | |
SQLite3 adapter must make sure to close statements after queries.
Fixes: #13631
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master: (74 commits)
[ci skip] builtin -> built-in
Fix code indentation and improve formatting
Grammar fix in Getting Started Guide
Make URL escaping more consistent
Optimize URI escaping
Always escape string passed to url helper.
Remove statement assuming coffee shop/public space wifi is inherently insecure
Don't rely on Arel master in bug report template [ci skip]
wrap methods in backticks [ci skip]
"subhash" --> "sub-hash"
multibyte_conformance.rb --> multibyte_conformance_test.rb
Fix inconsistent behavior from String#first/#last
`@destroyed` should always be set to `false` when an object is duped.
remove warning `warning: ambiguous first argument; put parentheses or even spaces`
:uglify -> :uglifier
Regression test for irregular inflection on has_many
Singularize association names before camelization
Fix spelling and proper nouns
Optimize select_value, select_values, select_rows and dry up checking whether to exec with cache for Postgresql adapter
Include default rails protect_from_forgery with: :exception
...
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
|
| | |
| | |
| | |
| | | |
uuid_generate function was not being quoted.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master: (70 commits)
[ci skip] Added link to ruby-lang.org installation.
Use the index on hidden field
`collection_check_boxes` respects `:index` option for the hidden filed name.
docs, double meaning of `serialize` argument. Closes #14284.
Just call read_attribute, no need to use `send`.
- Fix lingering reference to `:text` instead of the newer `:plain` - Section references `form_tag` instead of the `form_for` used in the example
again, read_attribute is public, so just call it
read_attribute is public, so we should just call it
Disable assest cache store in docs [ci skip]
Make counter cache decrementation on destroy idempotent
Write the failing test case for concurrent counter cache
[ci skip] Use plain underscore instead of "\_".
Update documentation to use Rails.application instead
Add a changelog entry for #14546 [ci skip]
Move tests for deep_dup and duplicable to object directory
Missing 'are' in note - [ci skip]
CollectionHelpers now accepts a readonly option
Fix a few typos [ci skip]
Bundle tzinfo-data on :x64_mingw (64-bit Ruby on Windows).
don't bother with an offset if the offset is zero
...
|
| | |
| | |
| | |
| | | |
[Yves Senn & Matthew Draper]
|
| | |
| | |
| | |
| | | |
[Yves Senn & Matthew Draper]
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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]
...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In our normal usage, it's rare for this to make a difference... but is
more technically correct.
As well as a spec that proves this is a good idea, let's also add a more
sane-looking one that just covers basic to_sql functionality. There
aren't many places where we actually use escape_bytea, but that's one
that won't be going away.
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
PostgreSQL, remove varchar limit.
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
& Yves Senn]
There is no reason for the PG adapter to have a default limit of 255 on :string
columns. See this snippet from the PG docs:
Tip: There is no performance difference among these three types, apart
from increased storage space when using the blank-padded type, and a
few extra CPU cycles to check the length when storing into a
length-constrained column. While character(n) has performance
advantages in some other database systems, there is no such advantage
in PostgreSQL; in fact character(n) is usually the slowest of the
three because of its additional storage costs. In most situations text
or character varying should be used instead.
|
| |/ /
| | |
| | |
| | | |
This will allow us to run the tests in random order.
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Revise 'sqlite3:' URL handling for smoother upgrades
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll
change to the absolute-path interpretation in 4.2.
The current "correct" spellings for in-memory, relative, and absolute
URLs, respectively, are:
sqlite3::memory:
sqlite3:relative/path
sqlite3:/full/path
Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce.
Uncovered by @guilleiguaran while investigating #14495, though that
sounds like a different issue.
|
| |\ \ \
| | | | |
| | | | | |
Add ConnectionHelper to refactor tests.
|
| | |/ / |
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | | |
Expand the query used in #table_exists? to include materialized views in the
kinds of relations it searches.
|
| | |
| | |
| | |
| | |
| | | |
Also do not use transactional fixtures. We drop the type and the
table after every run, so there is nothing for the transaction to clean up.
|
| | |
| | |
| | |
| | | |
Creating and dropping similar tables within the same connection causes postgresql to look up old values in the cache of tables which have already been dropped.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch registers custom domains in our OID-type_map.
They will behave exactly as the type specified by `pg_type.typbasetype`.
/cc @matthewd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I ran the whole test suite and compared the old to the new types.
Following is the list of types that did change with this patch:
```
DIFFERENT TYPE FOR mood: NEW: enum, BEFORE:
DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float
```
The `floatrange` is a custom type. The old type `float` was simply a coincidence
form the name `floatrange` and our type-guessing.
|
| | |
| | |
| | |
| | | |
fixes #10613
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Follow-Up to https://github.com/rails/rails/pull/14400
This ensures that all tables are removed after each test and thereby
allowing us to run the tests in a random order.
|
| | |
| | |
| | |
| | | |
See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications.rb#L131
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This will keep the test suite passing with older PG installations.
|
| | | |
|