Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bump version to 3.36.0

  • Loading branch information...
commit ffb714c9eae2ce6ea5473d3602835e6ede48d700 1 parent fb6fbf2
Jeremy Evans authored June 01, 2012
2  CHANGELOG
... ...
@@ -1,4 +1,4 @@
1  
-=== HEAD
  1
+=== 3.36.0 (2012-06-01)
2 2
 
3 3
 * Use Bignum generic type when dumping unsigned integer types that could potentially overflow 32-bit signed integer values (stu314)
4 4
 
245  doc/release_notes/3.36.0.txt
... ...
@@ -0,0 +1,245 @@
  1
+= New Features
  2
+
  3
+* An eager_each plugin has been added, which automatically makes
  4
+  eagerly loaded datasets do eager loading if you call #each (or
  5
+  another Enumerable method) instead of #all.  By default, if you
  6
+  call #each on an eager dataset, it will not do eager loading,
  7
+  and if you call #each on an eager_graph dataset, you will
  8
+  get plain hashes with columns from all joined tables instead of
  9
+  model objects.  With this plugin, #each on both eager and
  10
+  eager_graph datasets will do eager loading.
  11
+
  12
+* The nested attributes plugin now supports composite primary keys
  13
+  in associated records.  Additionally, it now deals better with
  14
+  natural primary keys in associated records.  There is a new
  15
+  :unmatched_pk option that can be set to :create if you want to
  16
+  create new associated records when the input hash contains
  17
+  primary key information that doesn't match one of the existing
  18
+  associated objects.
  19
+
  20
+  The nested attributes plugin now also supports a :transform option.
  21
+  If given, this option is called with the parent object and the
  22
+  input hash given for each associated record passed into the
  23
+  nested atttributes setter.  The callable should return the hash
  24
+  of attributes to use.
  25
+
  26
+* Model#from_json in the json_serializer plugin now takes an options
  27
+  hash and recognizes the :fields option.  If the :fields option is
  28
+  given, it should be an array of field names, and set_fields is
  29
+  called with the array instead of using set.  This allows you to
  30
+  easily filter which fields in the hash are set in the model
  31
+  instance.  The entire options hash is also passed to set_fields
  32
+  if :fields is present, so you can additionally use the :missing =>
  33
+  :raise or :missing => :skip options that set_fields supports.
  34
+
  35
+* The Dataset#to_json method in the json_serializer plugin now
  36
+  respects :root=>:collection and :root=>:instance options.  If
  37
+  :root=>:collection is given, only the collection is wrapped in a
  38
+  hash, and if :root=>:instance is given, only the instances are
  39
+  wrapped in a hash.  For backwards compatibility, both the
  40
+  instances and collection are wrapped in a hash:
  41
+
  42
+    Model.to_json(:root=>true)
  43
+    # {"models":[{"model":{"id":1}}]}
  44
+
  45
+    Model.to_json(:root=>:collection)
  46
+    # {"models":[{"id":1}]}
  47
+
  48
+    Model.to_json(:root=>:instance)
  49
+    # [{"model":{"id":1}}]
  50
+
  51
+  Wrapping both the collection and instance in a root by default
  52
+  is probably an undesired behavior, so the default for :root=>true
  53
+  may change in the next major version of Sequel.  Users who want
  54
+  the current behavior should switch to using :root=>:both.
  55
+
  56
+* The schema_dumper extension now respects an :index_names option
  57
+  when dumping.  This option can be set to false to never dump the
  58
+  index names.  It can also be set to :namespace, in which case if
  59
+  the database does not have a global index namespace, it will
  60
+  automatically prefix the name of the index with the name of the
  61
+  table.
  62
+
  63
+  Database#global_index_namespace? was added to check if the
  64
+  database uses a global index namespace.  If false, index names are
  65
+  probably namespaced per table (MySQL, MSSQL, Oracle).
  66
+
  67
+* :each is now a valid prepared statement type.  This prepared
  68
+  statement type requires a block when you call the statement, and
  69
+  iterates over the records of the statement a row at a time.
  70
+  Previously, there wasn't a way to iterate over the records of a
  71
+  prepared statement a row at a time, since the :select and :all
  72
+  types collect all rows into an array before iterating over them.
  73
+
  74
+* A :connection_handling=>:queue option is now respected for
  75
+  database objects, and changes the threaded connection pools to use
  76
+  a queue instead of a stack as the data structure for storing
  77
+  available connections.  A queue does not perform as well as a
  78
+  stack, but reduces the likelihood of stale connections.
  79
+
  80
+  It is possible that Sequel will change in the future from using a
  81
+  stack by default to using a queue by default, so any users who
  82
+  specifically desire a stack to be used should specify the
  83
+  :connection_handling=>:stack option.
  84
+
  85
+* Sequel::Migrator now supports is_current? class method to check
  86
+  if there are no outstanding migrations to apply.  It also supports
  87
+  a check_current class method, which raises an exception if there
  88
+  are outstanding migrations to apply.
  89
+
  90
+* A pg_json extension has been added, supporting PostgreSQL's 9.2
  91
+  json type, similarly to the pg_array and pg_hstore extensions.
  92
+  Note that with the current PostgreSQL json code, the root object
  93
+  can be a string or number, but ruby's json library requires the
  94
+  root json value to be an object or array.  So you will probably
  95
+  get an exception if you attempt to retrieve a PostgreSQL json
  96
+  value that ruby's JSON library won't parse.
  97
+
  98
+* A pg_inet extension has been added, which automatically typecasts
  99
+  PostgreSQL inet and cidr types to ruby IPAddr objects on retrieval.
  100
+
  101
+* Database#transaction on PostgreSQL now recognizes :read_only and
  102
+  :deferrable options, and can use them to set the READ ONLY and
  103
+  DEFERRABLE transaction flags.  A :synchronous option is also
  104
+  recognized, which can be set to true, false, :local, or
  105
+  :remote_write, and sets the value of synchronous_commit just for
  106
+  that transaction.
  107
+
  108
+* When adding and dropping indexes on PostgreSQL, a :concurrently
  109
+  option can be used to create or drop the index CONCURRENTLY, which
  110
+  doesn't require a full write table lock.
  111
+
  112
+* When dropping indexes on PostgreSQL, :if_exists and :cascade options
  113
+  are now recognized.
  114
+
  115
+* When using alter_table set_column_type on PostgreSQL, the :using
  116
+  option is respected, and can be used to force a specific conversion
  117
+  from the previous value to the new value with the USING syntax.
  118
+
  119
+* On MySQL, you can now set an :sql_mode option when connecting.  This
  120
+  can be a string or symbol or an array of them, and each should match
  121
+  one of MySQL's sql_modes.  MySQL's default SQL mode is fairly loose,
  122
+  and using one of the strict sql modes is recommended, but for
  123
+  backwards compatibility, Sequel will not set a specific SQL mode by
  124
+  default.  However, that may change in the next major version of
  125
+  Sequel, so to be forwards compatible you should set :sql_mode=>nil
  126
+  if you do not desire a strict SQL mode to be set automatically.
  127
+
  128
+* Partial indexes are now supported on Microsoft SQL Server 2008
  129
+  (SQL Server refers to them as filtered indexes).  Attempting to
  130
+  use a partial index on an earlier version of SQL Server will
  131
+  result in the database raising an exception.
  132
+
  133
+* A jdbc/progress adapter has been added, supporting the Progress
  134
+  database via the jdbc adapter.
  135
+
  136
+= Other Improvements
  137
+
  138
+* Dataset#get now works correctly if you pass it a nil or false
  139
+  argument.  Previously, it ignored the argument and used the block
  140
+  instead.  If you want to use the block argument, you should not
  141
+  pass in a regular argument.
  142
+
  143
+* Database#call now passes any blocks given to it to the underlying
  144
+  prepared statement object.  Before, a passed block was ignored.
  145
+
  146
+* Sequel::Model.db is no longer set automatically when creating
  147
+  an anonymous class with an associated database object.  This fixes
  148
+  cases where a library would create namespaced models, and the
  149
+  database used by the library would be set as the default for the
  150
+  user's application code.
  151
+
  152
+* Model *_to_one association setters are now no-ops if you pass a
  153
+  value that is the same as the cached value.  This fixes issues with
  154
+  reciprocal associations getting reordered, and is better
  155
+  for performance.
  156
+
  157
+  For cases where the old behavior is desired, the
  158
+  set_associated_object_if_same? method can be overridden to return
  159
+  true for object.  If you are manually setting objects in the
  160
+  associations cache before calling the setter method, you may want
  161
+  to set that.
  162
+
  163
+* The dirty plugin no longer affects the return value of refresh
  164
+  and lock!.  Internal changes should now help ensure that plugins
  165
+  don't affect the return values of these methods.
  166
+
  167
+* Sequel now supports JRuby 1.7's new exception handling, fixing
  168
+  exception handling when connecting in the jdbc adapter.
  169
+
  170
+* When dumping unsigned integer types in the schema dumper, if the
  171
+  unsigned values could overflow a 32-bit signed integer type,
  172
+  the generic Bignum class is used as the type.  This should fix
  173
+  issues when copying a database containing an unsigned 32-bit
  174
+  integer column with values between 2^31 and 2^32-1.
  175
+
  176
+* In the optimistic_locking plugin, attempting to refresh and
  177
+  save after a failed save now works correctly.  Before, the second
  178
+  save would never modify a row.
  179
+
  180
+* Time types on jdbc/postgres are now typecasted accurately on
  181
+  retrieval, before they could be off by up to a millisecond due to
  182
+  floating point issues.
  183
+
  184
+* Disconnect detection in the mysql2 adapter has been improved.
  185
+
  186
+* The jdbc/mysql, do/mysql, and swift/mysql adapters all now support
  187
+  the :timeout option to set the MySQL wait_timeout.
  188
+
  189
+* Savepoints in prepared transactions are now supported on MySQL
  190
+  5.5.23+, since the bug that caused them to be unsupported starting
  191
+  in 5.5.13 has been fixed.
  192
+
  193
+* Parsing foreign key metadata for tables with an explicit
  194
+  schema now works correctly on PostgreSQL.
  195
+
  196
+* bin/sequel -C now namespaces indexes automatically when copying
  197
+  from a database without a global index namespace to a database
  198
+  with a global index namespace.
  199
+
  200
+* Indexes are now dropped in reverse order that they were added in
  201
+  the schema_dumper.
  202
+
  203
+* The Model typecasting code works around bugs in objects where
  204
+  object.==('') would raise an exception instead of returning false.
  205
+
  206
+* A better error message is used if an invalid JDBC URL is
  207
+  provided and the JDBC driver's new.connect method returns NULL.
  208
+
  209
+* A document describing Sequel's object model has been added,
  210
+  describing the objects Sequel uses to represent SQL concepts.
  211
+
  212
+* Most adapter specific options to Database methods are now mentioned
  213
+  in the main Database method RDoc.
  214
+
  215
+= Backwards Compatibility
  216
+
  217
+* The nested_attributes plugin internals changed significantly.  If
  218
+  you were overriding one of the nested_attributes* private methods
  219
+  and calling super to get the default behavior, you may have to
  220
+  update your code.
  221
+
  222
+* Database#case_sensitive_like has been removed on SQLite.  This
  223
+  method never worked correctly, it always returned false even if
  224
+  the case_sensitive_like PRAGMA was set.  That's because SQLite
  225
+  doesn't offer a getter for this PRAGMA, only a setter.  Note that
  226
+  Database#case_sensitive_like= still exists and works correctly.
  227
+
  228
+* Database#single_value has been removed from the native SQLite
  229
+  adapter.  This method was designed for internal use, and hasn't
  230
+  been used for some time.  Any current users of the method should
  231
+  switch to Dataset#single_value.
  232
+
  233
+* The private Database#defined_columns_for method in the SQLite
  234
+  adapter no longer takes an options hash.
  235
+
  236
+* A couple jdbc/postgres adapter methods are now private.  Previously,
  237
+  the jdbc/postgres adapter overrode some private superclass methods
  238
+  but left the methods public.
  239
+
  240
+* When using the optimistic_locking plugin, refreshing inside a
  241
+  before_update method after calling super will now result in the
  242
+  lock checking being skipped.
  243
+
  244
+* The private Model#_refresh no longer returns self, so external
  245
+  plugins should no longer rely on that behavior.
2  lib/sequel/version.rb
@@ -3,7 +3,7 @@ module Sequel
3 3
   MAJOR = 3
4 4
   # The minor version of Sequel.  Bumped for every non-patch level
5 5
   # release, generally around once a month.
6  
-  MINOR = 35
  6
+  MINOR = 36
7 7
   # The tiny version of Sequel.  Usually 0, only bumped for bugfix
8 8
   # releases that fix regressions from previous versions.
9 9
   TINY  = 0

0 notes on commit ffb714c

Please sign in to comment.
Something went wrong with that request. Please try again.