aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix behavior of handling BC era dates.edogawaconan2014-06-051-2/+3
| | | | BC era year is (astronomical year + 1) and starts from 1 BC.
* Refactor quoting of binary data to not be based on the column typeSean Griffin2014-06-031-10/+21
|
* pg, inline casting methods into `OID::Type` objects.Yves Senn2014-06-021-11/+0
| | | | | | | | This inlines casting for the most obvious types. The rest will follow eventually. I need to put some tests in place, to make sure that the inlining is not causing regressions. /cc @sgrif
* pg, `PostgreSQL::Name` to hold schema qualified names.Yves Senn2014-05-301-6/+1
|
* pg, re-introduce `PostgreSQL::Utils` to unify schema/table extraction.Yves Senn2014-05-191-6/+4
| | | | Partial revert of c0bfc3f412834ffe8327a15ae3a46602cc28e425
* introduce AR::ConnectionAdapters::PostgreSQL for sharing modules (with AR-JDBC)kares2014-05-141-1/+1
| | | ... 'shared' OID, ArrayParser and Cast helpers, also re-arranged Column's dependencies
* pg, `change_column_default` accepts `[]`. Closes #11586.Yves Senn2014-05-121-2/+2
|
* Changed change_column in PG schema_statements.rb to make sure that the ↵Eric Chahin2014-04-151-0/+9
| | | | uuid_generate function was not being quoted.
* Use connection-specific bytea escapingMatthew Draper2014-04-081-2/+2
| | | | | | | | | | 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.
* Resolve encoding issues with arrays of hstore (bug 11135).Josh Goodall2014-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We didn't have enough encoding for the wire protocol to store an array of hstore types. So, further encode any hstore that is an array member. Whilst we're here, ensure it's an HashWithIndifferentAccess being returned, to be consistent with other serialized forms, and add testing for arrays of hstore. So now the following migration: enable_extension "hstore" create_table :servers do |t| t.string :name t.hstore :interfaces, array: true end produces a model that can used like this, to store an array of hashes: server = Server.create(name: "server01", interfaces: [ { name: "bge0", ipv4: "192.0.2.2", state: "up" }, { name: "de0", state: "disabled", by: "misha" }, { name: "fe0", state: "up" }, ]) More at http://inopinatus.org/2013/07/12/using-arrays-of-hstore-with-rails-4/
* Change array check for better aesthetics / reading the codeCarlos Antonio da Silva2013-11-091-1/+1
|
* Document the bind returnRafael Mendonça França2013-11-091-0/+3
|
* Avoid shot circuit return.Rafael Mendonça França2013-11-091-8/+20
| | | | This will make the conditional and to code clear
* Support array as root element in JSONAlexey Noskov2013-05-141-0/+2
|
* Fix loading of fixtures when the column type is a postgres array of strings.Chris Constantine2013-04-181-1/+1
| | | | - A string in an array of strings that has a quote char (') needs to have that quote char escaped if the array is getting wrapped in quote chars.
* Fix typoRafael Mendonça França2013-03-251-1/+1
|
* The sql_type method called here is fromRafael Mendonça França2013-03-251-6/+5
| | | | | | | ActiveRecord::ConnectionAdapters::Column See https://github.com/rails/rails/blob/28b8ca766e3e7c6c43d3ae900c99f8377153c62/activerecord/lib/active_record/connection_adapters/column.rb#L16
* Move away from column.sql_type in untested code tooMartin Schürrer2013-03-251-5/+6
|
* Make Postgres point type correspond to ruby array with two floats insideMartin Schürrer2013-03-251-5/+13
|
* stop depending on sql_type in pgAaron Patterson2013-03-221-6/+8
|
* Cast number to string in PostgresŁukasz Strzałkowski2013-03-121-3/+6
| | | | fixes #9170
* Fix cases where delete_records on a has_many association caused errorsDerek Kraan2013-01-271-0/+4
| | | | | | | | | | | | | because of an ambiguous column name. This happened if the association model had a default scope that referenced a third table, and the third table also referenced the original table (with an identical foreign_key). Mysql requires that ambiguous columns are deambiguated by using the full table.column syntax. Postgresql and Sqlite use a different syntax for updates altogether (and don't tolerate table.name syntax), so the fix requires always including the full table.column and discarding it later for Sqlite and Postgresql.
* Add postgresql range types supportbUg2013-01-231-10/+9
|
* AR supporting new intrange data type on PostgreSQL >= 9.2Alexey2012-12-161-0/+10
|
* Fix postgresql adapter to handle bc timestamps correctlyBogdan Gusiev2012-11-211-3/+7
|
* Fix typo in inet and cidr savingMiguel Herranz2012-10-141-1/+1
|
* Moves column dump specific code to a module included in AbstractAdapterDan McClain2012-09-141-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having column related schema dumper code in the AbstractAdapter. The code remains the same, but by placing it in the AbstractAdapter, we can then overwrite it with Adapter specific methods that will help with Adapter specific data types. The goal of moving this code here is to create a new migration key for PostgreSQL's array type. Since any datatype can be an array, the goal is to have ':array => true' as a migration option, turning the datatype into an array. I've implemented this in postgres_ext, the syntax is shown here: https://github.com/dockyard/postgres_ext#arrays Adds array migration support Adds array_test.rb outlining the test cases for array data type Adds pg_array_parser to Gemfile for testing Adds pg_array_parser to postgresql_adapter (unused in this commit) Adds schema dump support for arrays Adds postgres array type casting support Updates changelog, adds note for inet and cidr support, which I forgot to add before Removing debugger, Adds pg_array_parser to JRuby platform Removes pg_array_parser requirement, creates ArrayParser module used by PostgreSQLAdapter
* indent fix [ci skip]Vijay Dev2012-09-091-1/+1
|
* ActiveRecord support to PostgreSQL 9.2 JSON typeDickson S. Guedes2012-09-051-2/+6
| | | | | | | | | This implements the support to encode/decode JSON data to/from database and creating columns of type JSON using a native type [1] supported by PostgreSQL from version 9.2. [1] http://www.postgresql.org/docs/9.2/static/datatype-json.html
* Modularize postgresql adapterKonstantin Shabanov2012-09-051-0/+120