activerecord-postgres-array
activerecord-postgres-array copied to clipboard
Postgres array support for Active Record
``` >> Request => Request(id: integer, inserts: integer_array, updates: integer_array) >> r = Request.new => # >> # These array columns have an empty array set as default! >> r.inserts...
Added support for parsing multi-dimensional array strings - Used the Sequel::Postgres::PGArray::Parser class from https://github.com/jeremyevans/sequel/blob/master/lib/sequel/extensions/pg_array.rb (MIT licensed code) - The saner method to parse multi-dimensional array-strings is to NOT use regexps...
For an empty array, the default ends up looking like `:default => '{}'` in schema.rb, however, this doesn't get single-quoted when turned into a `CREATE TABLE` statement, causing `rake db:schema:load`...
Previously, NULL values in the DB arrays were correctly converted to nil in String#from_postgres_array, however this would result either in an error (with e.g. floats) or an incorrect value (with...
I noticed an issue where the schema dump contained the string version of the column default (ie "{foo,bar}"), causing errors when the schema was loaded. I did some digging and...
Upgrading to v0.0.10 breaks my current application. ``` bash PG::InvalidTextRepresentation: ERROR: array value must start with "{" or dimension information ``` I receive this error if the array is empty,...
I've been using this gem for over a year, and I just ran bundle update and for some reason now it keeps raising `unit_amenities must be an Array or have...
undefined method `type_to_sql' for nil:NilClass/home/eug/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-postgres-array-0.0.10/lib/activerecord-postgres-array/activerecord.rb:80:in`block (2 levels) in class:TableDefinition'
(a) I've created a table with a `decimal_array` (which maps to PG's `numeric[]`). However, rake is not refusing to dump it in `schema.rb` with the following error: ``` Unknown type...
I know supporting arel-type query constructs is mentioned in your future enhancements, but would it be possible to give me some pointers on how to get the following working WITHOUT...