- 17 11月, 2014 1 次提交
-
-
由 Sam 提交于
-
- 14 11月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
also increase the version of pg required so that people will get the GVL friendly version
-
- 05 11月, 2014 1 次提交
-
-
由 Ted O'Meara 提交于
-
- 02 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
MySQL reports the column name as `"MAX(developer_id)"`. PG will report it as `"max"`
-
- 30 10月, 2014 2 次提交
-
-
由 claudiob 提交于
-
由 Aaron Patterson 提交于
-
- 21 10月, 2014 1 次提交
-
-
由 claudiob 提交于
The `select` method has the same definition in almost all database adapters, so it can be moved from the database-specific adapters (PostgreSQl, MySQL, SQLite) to the abstract `database_statement`: ```ruby def select(sql, name = nil, binds = []) exec_query(sql, name, binds) end ``` --- More details about this commit: the only two DB-specific adapters that have a different definition of `select` are MySQLAdapter and MySQL2Adapter. In MySQLAdapter, `select` invokes `exec_query(sql, name, binds)`, so calling `super` achieves the same goal with less repetition. In MySQL2Adapter, `select` invokes `exec_query(sql, name)`, that is, it does not pass the `binds` parameter like other methods do. However, [MySQL2Adapter's `exec_query`](https://github.com/rails/rails/blob/74a527cc63ef56f3d0a42cf638299958dc7cb08c/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L228L231) works exactly the same whether this parameters is passed or not, so the output does not change: ```ruby def exec_query(sql, name = 'SQL', binds = []) result = execute(sql, name) ActiveRecord::Result.new(result.fields, result.to_a) end ```
-
- 16 10月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
In the DSL you can now do: create_table(:foos) do |t| t.bigint :hi end
-
- 23 9月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
it doesn't work on SQLite3 since it doesn't support truncate, but that's OK. If you call truncate on the connection, you're now bound to that database (same as if you use hstore or any other db specific feature).
-
- 09 9月, 2014 1 次提交
-
-
由 Yves Senn 提交于
`AbstractAdapter#supports_views?` defaults to `false` so we have to turn it on in adapter subclasses. Currently the flag only controls test execution. /cc @yahonda
-
- 05 9月, 2014 1 次提交
-
-
由 Abdelkader Boudih 提交于
-
- 25 7月, 2014 1 次提交
-
-
由 Philippe Creux 提交于
[Philippe Creux, Chris Teague]
-
- 07 7月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 03 7月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
Fix CVE-2014-3483 and protect against CVE-2014-3482.
-
- 29 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
The only case where we got a column that was not `nil`, but did not respond to `cast_type` was when type casting the default value during schema creation. We can look up the cast type, and add that object to the column definition. Will allow us to consistently rely on the type objects for type casting in all directions.
-
- 27 6月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 22 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Attempting to reduce the number of places that care about the details of how type casting occurs. We remove the type casting of the primary key in `JoinDependecy`, rather than encapsulating it. It was originally added for consistency with https://github.com/rails/rails/commit/40898c8c19fa04442fc5f8fb5daf3a8bdb9a1e03#diff-06059df8d3dee3101718fb2c01151ad0R211, but that conditional was later removed in https://github.com/rails/rails/commit/d7ddaa530fd1b94e22d745cbaf2e8a5a34ee9734. What is important is that the same row twice will have the same value for the primary key, which it will.
-
- 19 6月, 2014 1 次提交
-
-
由 Josh Sharpe 提交于
-
- 10 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
In some cases there is a difference between the two, we should always be doing one or the other. For convenience, `type_cast` is still a private method on type, so new types that do not need different behavior don't need to implement two methods, but it has been moved to private so it cannot be used accidentally.
-
- 06 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Whiny nils is no longer a thing, so we no longer need this optimization
-
- 04 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
For any type that is represented as a string and then type cast, we do not need separate regular expressions for the various types. No function will match this regex. User defined types *should* match this, so that the type object can decide what to do with the value.
-
- 03 6月, 2014 4 次提交
-
-
由 Yves Senn 提交于
-
由 Sean Griffin 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
- 30 5月, 2014 1 次提交
-
-
由 Yves Senn 提交于
This is an intermediate solution. It is related to the refactoring @sgrif is making and will change in the future.
-
- 27 5月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
With ActiveRecord::Properties, we now have a reasonable path for users to continue to keep this behavior if they want it. This is an edge case that has added a lot of complexity to the code base.
-
- 26 5月, 2014 2 次提交
- 24 5月, 2014 3 次提交
-
-
由 Yves Senn 提交于
This mirrors the layout of abstract adapter and puts the definitions inside the `PostgreSQL` namespace (no longer under the adapter namespace). /cc @kares
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
- 23 5月, 2014 6 次提交
-
-
由 Sean Griffin 提交于
Columns and injected types no longer have any conditionals based on the format of SQL type strings! Hooray!
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
Ideally types will be usable without having to specify a sql type string, so we should keep the information related to parsing them on the adapter or another object.
-
-
由 Sean Griffin 提交于
We're going to want all of the benefits of the type map object for registrations, including block registration and real aliasing. Moves type name registrations to the adapter, and aliases the OIDs to the named types
-
由 Sean Griffin 提交于
Determining things like precision and scale in postgresql will require the given blocks to take additional arguments besides the OID. - Adds the ability to handle additional arguments to `TypeMap` - Passes the column type to blocks when looking up PG types
-
- 21 5月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 20 5月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Using general types where possible. Several more can go away once infinity gets figured out.
-