sequel 4.21.0 → 4.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +32 -0
- data/README.rdoc +3 -4
- data/doc/opening_databases.rdoc +10 -75
- data/doc/release_notes/4.22.0.txt +72 -0
- data/lib/sequel/adapters/ado/access.rb +1 -1
- data/lib/sequel/adapters/cubrid.rb +3 -3
- data/lib/sequel/adapters/db2.rb +1 -0
- data/lib/sequel/adapters/dbi.rb +1 -0
- data/lib/sequel/adapters/fdbsql.rb +3 -2
- data/lib/sequel/adapters/firebird.rb +1 -0
- data/lib/sequel/adapters/ibmdb.rb +1 -21
- data/lib/sequel/adapters/informix.rb +1 -0
- data/lib/sequel/adapters/jdbc.rb +37 -49
- data/lib/sequel/adapters/jdbc/fdbsql.rb +1 -0
- data/lib/sequel/adapters/mysql.rb +5 -3
- data/lib/sequel/adapters/mysql2.rb +5 -2
- data/lib/sequel/adapters/odbc.rb +8 -4
- data/lib/sequel/adapters/openbase.rb +1 -0
- data/lib/sequel/adapters/oracle.rb +3 -46
- data/lib/sequel/adapters/postgres.rb +3 -36
- data/lib/sequel/adapters/shared/access.rb +1 -1
- data/lib/sequel/adapters/shared/fdbsql.rb +3 -3
- data/lib/sequel/adapters/shared/mssql.rb +1 -1
- data/lib/sequel/adapters/shared/mysql_prepared_statements.rb +12 -44
- data/lib/sequel/adapters/shared/oracle.rb +6 -2
- data/lib/sequel/adapters/shared/postgres.rb +6 -6
- data/lib/sequel/adapters/shared/sqlite.rb +1 -1
- data/lib/sequel/adapters/sqlite.rb +3 -46
- data/lib/sequel/adapters/tinytds.rb +12 -28
- data/lib/sequel/adapters/utils/pg_types.rb +1 -1
- data/lib/sequel/connection_pool/sharded_threaded.rb +63 -16
- data/lib/sequel/connection_pool/threaded.rb +72 -18
- data/lib/sequel/core.rb +1 -1
- data/lib/sequel/database/connecting.rb +2 -2
- data/lib/sequel/database/misc.rb +5 -5
- data/lib/sequel/database/query.rb +3 -2
- data/lib/sequel/database/schema_generator.rb +19 -19
- data/lib/sequel/database/schema_methods.rb +2 -2
- data/lib/sequel/database/transactions.rb +3 -3
- data/lib/sequel/dataset/actions.rb +18 -8
- data/lib/sequel/dataset/graph.rb +2 -2
- data/lib/sequel/dataset/prepared_statements.rb +28 -1
- data/lib/sequel/dataset/query.rb +7 -7
- data/lib/sequel/exceptions.rb +27 -24
- data/lib/sequel/extensions/_pretty_table.rb +1 -1
- data/lib/sequel/extensions/constraint_validations.rb +2 -2
- data/lib/sequel/extensions/date_arithmetic.rb +2 -2
- data/lib/sequel/extensions/pg_array.rb +10 -1
- data/lib/sequel/extensions/pg_row.rb +1 -1
- data/lib/sequel/extensions/pg_static_cache_updater.rb +1 -1
- data/lib/sequel/extensions/schema_dumper.rb +8 -8
- data/lib/sequel/extensions/split_array_nil.rb +1 -1
- data/lib/sequel/model.rb +1 -1
- data/lib/sequel/model/associations.rb +18 -11
- data/lib/sequel/model/base.rb +15 -15
- data/lib/sequel/model/exceptions.rb +11 -2
- data/lib/sequel/plugins/accessed_columns.rb +1 -1
- data/lib/sequel/plugins/auto_validations.rb +1 -1
- data/lib/sequel/plugins/boolean_readers.rb +1 -1
- data/lib/sequel/plugins/class_table_inheritance.rb +4 -7
- data/lib/sequel/plugins/composition.rb +1 -1
- data/lib/sequel/plugins/constraint_validations.rb +2 -2
- data/lib/sequel/plugins/csv_serializer.rb +171 -0
- data/lib/sequel/plugins/dirty.rb +2 -2
- data/lib/sequel/plugins/hook_class_methods.rb +1 -1
- data/lib/sequel/plugins/instance_hooks.rb +1 -1
- data/lib/sequel/plugins/many_through_many.rb +1 -1
- data/lib/sequel/plugins/nested_attributes.rb +5 -5
- data/lib/sequel/plugins/pg_array_associations.rb +4 -4
- data/lib/sequel/plugins/prepared_statements.rb +2 -2
- data/lib/sequel/plugins/prepared_statements_safe.rb +1 -1
- data/lib/sequel/plugins/serialization.rb +6 -6
- data/lib/sequel/plugins/serialization_modification_detection.rb +1 -1
- data/lib/sequel/plugins/sharding.rb +3 -1
- data/lib/sequel/plugins/single_table_inheritance.rb +5 -13
- data/lib/sequel/plugins/static_cache.rb +2 -2
- data/lib/sequel/plugins/tactical_eager_loading.rb +1 -1
- data/lib/sequel/plugins/tree.rb +1 -1
- data/lib/sequel/plugins/validation_class_methods.rb +2 -2
- data/lib/sequel/plugins/validation_helpers.rb +4 -4
- data/lib/sequel/plugins/xml_serializer.rb +3 -3
- data/lib/sequel/sql.rb +1 -1
- data/lib/sequel/version.rb +1 -1
- data/spec/adapters/postgres_spec.rb +17 -0
- data/spec/core/connection_pool_spec.rb +1 -1
- data/spec/core/dataset_spec.rb +22 -0
- data/spec/extensions/auto_validations_spec.rb +1 -1
- data/spec/extensions/blacklist_security_spec.rb +2 -2
- data/spec/extensions/csv_serializer_spec.rb +173 -0
- data/spec/extensions/json_serializer_spec.rb +2 -2
- data/spec/extensions/nested_attributes_spec.rb +9 -9
- data/spec/extensions/pg_array_spec.rb +5 -0
- data/spec/extensions/single_table_inheritance_spec.rb +21 -0
- data/spec/extensions/touch_spec.rb +1 -1
- data/spec/extensions/tree_spec.rb +4 -0
- data/spec/extensions/xml_serializer_spec.rb +3 -3
- data/spec/integration/prepared_statement_test.rb +1 -1
- data/spec/integration/schema_test.rb +7 -0
- data/spec/integration/type_test.rb +2 -2
- data/spec/model/associations_spec.rb +108 -14
- data/spec/model/base_spec.rb +8 -8
- data/spec/model/record_spec.rb +7 -7
- metadata +6 -2
data/spec/model/base_spec.rb
CHANGED
|
@@ -530,15 +530,15 @@ describe Sequel::Model, ".strict_param_setting" do
|
|
|
530
530
|
end
|
|
531
531
|
|
|
532
532
|
it "should raise an error if a missing/restricted column/method is accessed" do
|
|
533
|
-
proc{@c.new(:z=>1)}.should raise_error(Sequel::
|
|
534
|
-
proc{@c.create(:z=>1)}.should raise_error(Sequel::
|
|
533
|
+
proc{@c.new(:z=>1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
534
|
+
proc{@c.create(:z=>1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
535
535
|
c = @c.new
|
|
536
|
-
proc{c.set(:z=>1)}.should raise_error(Sequel::
|
|
537
|
-
proc{c.set_all(:use_after_commit_rollback => false)}.should raise_error(Sequel::
|
|
538
|
-
proc{c.set_only({:x=>1}, :y)}.should raise_error(Sequel::
|
|
539
|
-
proc{c.update(:z=>1)}.should raise_error(Sequel::
|
|
540
|
-
proc{c.update_all(:use_after_commit_rollback=>false)}.should raise_error(Sequel::
|
|
541
|
-
proc{c.update_only({:x=>1}, :y)}.should raise_error(Sequel::
|
|
536
|
+
proc{c.set(:z=>1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
537
|
+
proc{c.set_all(:use_after_commit_rollback => false)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
538
|
+
proc{c.set_only({:x=>1}, :y)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
539
|
+
proc{c.update(:z=>1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
540
|
+
proc{c.update_all(:use_after_commit_rollback=>false)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
541
|
+
proc{c.update_only({:x=>1}, :y)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
542
542
|
end
|
|
543
543
|
|
|
544
544
|
it "should be disabled by strict_param_setting = false" do
|
data/spec/model/record_spec.rb
CHANGED
|
@@ -1020,24 +1020,24 @@ describe Sequel::Model, "#set" do
|
|
|
1020
1020
|
|
|
1021
1021
|
it "should raise error if strict_param_setting is true and method does not exist" do
|
|
1022
1022
|
@o1.strict_param_setting = true
|
|
1023
|
-
proc{@o1.set('foo' => 1)}.should raise_error(Sequel::
|
|
1023
|
+
proc{@o1.set('foo' => 1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
1024
1024
|
end
|
|
1025
1025
|
|
|
1026
1026
|
it "should raise error if strict_param_setting is true and column is a primary key" do
|
|
1027
1027
|
@o1.strict_param_setting = true
|
|
1028
|
-
proc{@o1.set('id' => 1)}.should raise_error(Sequel::
|
|
1028
|
+
proc{@o1.set('id' => 1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
1029
1029
|
end
|
|
1030
1030
|
|
|
1031
1031
|
it "should raise error if strict_param_setting is true and column is restricted" do
|
|
1032
1032
|
@o1.strict_param_setting = true
|
|
1033
1033
|
@c.set_allowed_columns
|
|
1034
|
-
proc{@o1.set('x' => 1)}.should raise_error(Sequel::
|
|
1034
|
+
proc{@o1.set('x' => 1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
1035
1035
|
end
|
|
1036
1036
|
|
|
1037
1037
|
it "should not create a symbol if strict_param_setting is true and string is given" do
|
|
1038
1038
|
@o1.strict_param_setting = true
|
|
1039
1039
|
l = Symbol.all_symbols.length
|
|
1040
|
-
proc{@o1.set('sadojafdso' => 1)}.should raise_error(Sequel::
|
|
1040
|
+
proc{@o1.set('sadojafdso' => 1)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
1041
1041
|
Symbol.all_symbols.length.should == l
|
|
1042
1042
|
end
|
|
1043
1043
|
|
|
@@ -1283,12 +1283,12 @@ describe Sequel::Model, "#(set|update)_(all|only)" do
|
|
|
1283
1283
|
it "should raise errors if not all hash fields can be set and strict_param_setting is true" do
|
|
1284
1284
|
@c.strict_param_setting = true
|
|
1285
1285
|
|
|
1286
|
-
proc{@c.new.set_all(:x => 1, :y => 2, :z=>3, :use_after_commit_rollback => false)}.should raise_error(Sequel::
|
|
1286
|
+
proc{@c.new.set_all(:x => 1, :y => 2, :z=>3, :use_after_commit_rollback => false)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
1287
1287
|
(o = @c.new).set_all(:x => 1, :y => 2, :z=>3)
|
|
1288
1288
|
o.values.should == {:x => 1, :y => 2, :z=>3}
|
|
1289
1289
|
|
|
1290
|
-
proc{@c.new.set_only({:x => 1, :y => 2, :z=>3, :id=>4}, :x, :y)}.should raise_error(Sequel::
|
|
1291
|
-
proc{@c.new.set_only({:x => 1, :y => 2, :z=>3}, :x, :y)}.should raise_error(Sequel::
|
|
1290
|
+
proc{@c.new.set_only({:x => 1, :y => 2, :z=>3, :id=>4}, :x, :y)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
1291
|
+
proc{@c.new.set_only({:x => 1, :y => 2, :z=>3}, :x, :y)}.should raise_error(Sequel::MassAssignmentRestriction)
|
|
1292
1292
|
(o = @c.new).set_only({:x => 1, :y => 2}, :x, :y)
|
|
1293
1293
|
o.values.should == {:x => 1, :y => 2}
|
|
1294
1294
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sequel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.22.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeremy Evans
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-05-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -194,6 +194,7 @@ extra_rdoc_files:
|
|
|
194
194
|
- doc/release_notes/4.19.0.txt
|
|
195
195
|
- doc/release_notes/4.20.0.txt
|
|
196
196
|
- doc/release_notes/4.21.0.txt
|
|
197
|
+
- doc/release_notes/4.22.0.txt
|
|
197
198
|
files:
|
|
198
199
|
- CHANGELOG
|
|
199
200
|
- MIT-LICENSE
|
|
@@ -303,6 +304,7 @@ files:
|
|
|
303
304
|
- doc/release_notes/4.2.0.txt
|
|
304
305
|
- doc/release_notes/4.20.0.txt
|
|
305
306
|
- doc/release_notes/4.21.0.txt
|
|
307
|
+
- doc/release_notes/4.22.0.txt
|
|
306
308
|
- doc/release_notes/4.3.0.txt
|
|
307
309
|
- doc/release_notes/4.4.0.txt
|
|
308
310
|
- doc/release_notes/4.5.0.txt
|
|
@@ -505,6 +507,7 @@ files:
|
|
|
505
507
|
- lib/sequel/plugins/column_select.rb
|
|
506
508
|
- lib/sequel/plugins/composition.rb
|
|
507
509
|
- lib/sequel/plugins/constraint_validations.rb
|
|
510
|
+
- lib/sequel/plugins/csv_serializer.rb
|
|
508
511
|
- lib/sequel/plugins/dataset_associations.rb
|
|
509
512
|
- lib/sequel/plugins/defaults_setter.rb
|
|
510
513
|
- lib/sequel/plugins/dirty.rb
|
|
@@ -605,6 +608,7 @@ files:
|
|
|
605
608
|
- spec/extensions/constraint_validations_plugin_spec.rb
|
|
606
609
|
- spec/extensions/constraint_validations_spec.rb
|
|
607
610
|
- spec/extensions/core_refinements_spec.rb
|
|
611
|
+
- spec/extensions/csv_serializer_spec.rb
|
|
608
612
|
- spec/extensions/current_datetime_timestamp_spec.rb
|
|
609
613
|
- spec/extensions/dataset_associations_spec.rb
|
|
610
614
|
- spec/extensions/dataset_source_alias_spec.rb
|