- 07 5月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 04 5月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
These are used in tests from anywhere.
-
- 28 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`valid_type?` is used in schema dumper to determine if a type is supported. So if `valid_type?(:foobar)` is true, it means that schema dumper is allowed to create `t.foobar`. But it doesn't work. I think that `valid_type?` should accept only supported types. https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/schema_dumper.rb#L135-L142 ```ruby columns.each do |column| raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" unless @connection.valid_type?(column.type) next if column.name == pk type, colspec = @connection.column_spec(column) tbl.print " t.#{type} #{column.name.inspect}" tbl.print ", #{format_colspec(colspec)}" if colspec.present? tbl.puts end ```
-
- 14 2月, 2017 1 次提交
-
-
由 Jordan Lewis 提交于
primary_keys(table) needs to query various metadata tables in Postgres to determine the primary key for the table. Previously, it did so using a complex common table expression against pg_constraint and pg_attribute. This patch simplifies the query by using information_schema tables. This simplifies the logic, making the query far easier to understand, and additionally avoids an expensive unnest, window function query, and common table expression.
-
- 25 12月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Fixes #26635, #26641.
-
- 18 8月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Because `sql_for_insert` is only called in `use_insert_returning?` is true since #26002.
-
- 07 8月, 2016 3 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 25 4月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :users do |t| t.string :name t.index 'lower(name) varchar_pattern_ops' end Fixes #19090. Fixes #21765. Fixes #21819. Fixes #24359. Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-
- 02 3月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Originally, `{insert|update|delete}_sql` is protected methods. We can use the `{insert|update|delete}` public methods instead.
-
- 29 2月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Some tests does not work for unprepared statements. Add `if ActiveRecord::Base.connection.prepared_statements` and fix a regex for fix tests failure with `prepared_statements: false`.
-
- 01 2月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Akira Matsuda 提交于
-
- 15 1月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 14 1月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Arel handles substitution for bind parameters by now.
-
- 21 9月, 2015 1 次提交
-
-
由 George Deglin 提交于
The returning_disabled configuration option is required to make postgresql partitioning triggers work. This commit fixes a bug where an invalid query would be made in cases where returning_disabled was true and objects were created with no attributes defined.
-
- 11 6月, 2015 1 次提交
-
-
由 Yves Senn 提交于
-
- 25 3月, 2015 1 次提交
-
-
由 Lars Kanis 提交于
The type map was introduced in aafee233, but wasn't properly filled. This mainly adjusts many locations, that expected strings instead of integers or boolean. add_pg_decoders is moved after setup of the StatementPool, because execute_and_clear could potentially make use of it.
-
- 18 2月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Lowercase raw SQL has been replaced by 07b659ca already. This commit replaces everything else of raw SQL.
-
- 03 2月, 2015 1 次提交
-
-
由 Vipul A M 提交于
-
- 28 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
`bound_attributes` is now used universally across the board, removing the need for the conversion layer. These changes are mostly mechanical, with the exception of the log subscriber. Additional, we had to implement `hash` on the attribute objects, so they could be used as a key for query caching.
-
- 31 12月, 2014 1 次提交
-
-
由 Arthur Neves 提交于
When table has a composite primary key, the `primary_key` method for sqlite3 and postgresql was only returning the first field of the key. Ensures that it will return nil instead, as AR dont support composite pks.
-
- 18 11月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
Oh hey, we got to remove some code because of that!
-
由 Sean Griffin 提交于
Arel handles this for us automatically. Updated tests, as BindParam is no longer a subclass of SqlLiteral. We should remove the second argument to substitute_at entirely, as it's no longer used
-
- 25 8月, 2014 1 次提交
-
-
由 Yves Senn 提交于
This is a reacon to https://github.com/rails/rails/commit/d6c1205584b1ba597db4071b168681678b1e9875#commitcomment-7502487 This backwards incompatibility was introduced with d6c12055 to fix #7516. However both `connection.default_sequence_name` and `model.sequence_name` are public API. The PostgreSQL adapter should honor the interface and return strings. /cc @matthewd @chancancode
-
- 24 8月, 2014 1 次提交
-
-
由 Agis- 提交于
Fixes #16623 introduced by https://github.com/rails/rails/commit/3d5a2019bcccc6fb01bee4811ca669f4383edb51
-
- 30 5月, 2014 2 次提交
- 08 5月, 2014 1 次提交
-
-
由 Yves Senn 提交于
This test was inspired by #14866. That PR would break this functionality and we should make sure we notice that in the future.
-
- 11 4月, 2014 2 次提交
- 21 3月, 2014 1 次提交
-
-
由 Guo Xiang Tan 提交于
This setups the helper method which other tests can benefit from.
-
- 20 3月, 2014 1 次提交
-
-
由 Josh Williams 提交于
The pk_an_sequence_for query previously joined against pg_class's oid for rows in pg_depend, but pg_depend's objid may point to other system tables, such as pg_attrdef. If a row in one of those other tables coincidentally has the same oid as an (unrelated) sequence, that sequence name may be returned instead of the real one. This ensures that only the pg_depend entries pointing to pg_class are considered.
-
- 13 2月, 2014 1 次提交
-
-
由 Yves Senn 提交于
remove created state after test execution, not before the next test. This prevents the leak of the `ex` table outside of a single test.
-
- 29 12月, 2013 1 次提交
-
-
由 Kuldeep Aggarwal 提交于
-
- 23 12月, 2013 1 次提交
-
-
由 schneems 提交于
Currently if you attempt to use a database that does not exist you get an error: ``` PG::ConnectionBad FATAL: database "db_error" does not exist ``` The solution is easy, create and migrate your database however new developers may not know these commands by memory. Instead of requiring the developer to search for a solution, tell them how to fix the problem in the error message: ``` ActiveRecord::NoDatabase: FATAL: database "db_error" does not exist Run `$ bin/rake db:create db:migrate` to create your database ``` Active Record should not know about `rake db:migrate` so this additional information needs to come from the railtie. Potential alternative implementation suggestions are welcome.
-
- 19 12月, 2013 1 次提交
-
-
由 Kuldeep Aggarwal 提交于
Previously, executing an insert SQL in PostgreSQL with a command like this: insert into articles( number) values( 5152 ) would not work because the adapter was unable to extract the correct articles table name.
-
- 15 8月, 2013 1 次提交
-
-
由 Nikolay Kondratyev 提交于
-
- 03 7月, 2013 1 次提交
-
-
由 Francesco Rodriguez 提交于
-