sequel 4.30.0 → 4.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +18 -0
- data/MIT-LICENSE +1 -1
- data/bin/sequel +1 -0
- data/doc/opening_databases.rdoc +6 -0
- data/doc/release_notes/4.31.0.txt +57 -0
- data/lib/sequel.rb +2 -0
- data/lib/sequel/adapters/ado.rb +2 -0
- data/lib/sequel/adapters/ado/access.rb +2 -0
- data/lib/sequel/adapters/ado/mssql.rb +2 -0
- data/lib/sequel/adapters/amalgalite.rb +2 -0
- data/lib/sequel/adapters/cubrid.rb +2 -0
- data/lib/sequel/adapters/do.rb +2 -0
- data/lib/sequel/adapters/do/mysql.rb +2 -0
- data/lib/sequel/adapters/do/postgres.rb +2 -0
- data/lib/sequel/adapters/do/sqlite3.rb +2 -0
- data/lib/sequel/adapters/ibmdb.rb +3 -1
- data/lib/sequel/adapters/jdbc.rb +2 -0
- data/lib/sequel/adapters/jdbc/as400.rb +2 -0
- data/lib/sequel/adapters/jdbc/cubrid.rb +2 -0
- data/lib/sequel/adapters/jdbc/db2.rb +2 -0
- data/lib/sequel/adapters/jdbc/derby.rb +2 -0
- data/lib/sequel/adapters/jdbc/firebirdsql.rb +2 -0
- data/lib/sequel/adapters/jdbc/h2.rb +2 -0
- data/lib/sequel/adapters/jdbc/hsqldb.rb +2 -0
- data/lib/sequel/adapters/jdbc/informix-sqli.rb +2 -0
- data/lib/sequel/adapters/jdbc/jdbcprogress.rb +2 -0
- data/lib/sequel/adapters/jdbc/jtds.rb +2 -0
- data/lib/sequel/adapters/jdbc/mssql.rb +2 -0
- data/lib/sequel/adapters/jdbc/mysql.rb +2 -0
- data/lib/sequel/adapters/jdbc/oracle.rb +2 -0
- data/lib/sequel/adapters/jdbc/postgresql.rb +24 -1
- data/lib/sequel/adapters/jdbc/sqlanywhere.rb +2 -0
- data/lib/sequel/adapters/jdbc/sqlite.rb +2 -0
- data/lib/sequel/adapters/jdbc/sqlserver.rb +2 -0
- data/lib/sequel/adapters/jdbc/transactions.rb +2 -0
- data/lib/sequel/adapters/mock.rb +2 -0
- data/lib/sequel/adapters/mysql.rb +2 -0
- data/lib/sequel/adapters/mysql2.rb +2 -0
- data/lib/sequel/adapters/odbc.rb +2 -0
- data/lib/sequel/adapters/odbc/db2.rb +2 -0
- data/lib/sequel/adapters/odbc/mssql.rb +2 -0
- data/lib/sequel/adapters/odbc/progress.rb +2 -0
- data/lib/sequel/adapters/oracle.rb +4 -2
- data/lib/sequel/adapters/postgres.rb +5 -3
- data/lib/sequel/adapters/postgresql.rb +2 -0
- data/lib/sequel/adapters/shared/access.rb +2 -0
- data/lib/sequel/adapters/shared/cubrid.rb +2 -0
- data/lib/sequel/adapters/shared/db2.rb +2 -0
- data/lib/sequel/adapters/shared/firebird.rb +2 -0
- data/lib/sequel/adapters/shared/informix.rb +2 -0
- data/lib/sequel/adapters/shared/mssql.rb +2 -0
- data/lib/sequel/adapters/shared/mysql.rb +5 -1
- data/lib/sequel/adapters/shared/mysql_prepared_statements.rb +2 -0
- data/lib/sequel/adapters/shared/oracle.rb +5 -3
- data/lib/sequel/adapters/shared/postgres.rb +19 -12
- data/lib/sequel/adapters/shared/progress.rb +2 -0
- data/lib/sequel/adapters/shared/sqlanywhere.rb +3 -1
- data/lib/sequel/adapters/shared/sqlite.rb +2 -0
- data/lib/sequel/adapters/sqlanywhere.rb +2 -0
- data/lib/sequel/adapters/sqlite.rb +4 -1
- data/lib/sequel/adapters/swift.rb +2 -0
- data/lib/sequel/adapters/swift/mysql.rb +2 -0
- data/lib/sequel/adapters/swift/postgres.rb +2 -0
- data/lib/sequel/adapters/swift/sqlite.rb +2 -0
- data/lib/sequel/adapters/tinytds.rb +2 -0
- data/lib/sequel/adapters/utils/emulate_offset_with_reverse_and_count.rb +5 -3
- data/lib/sequel/adapters/utils/emulate_offset_with_row_number.rb +5 -3
- data/lib/sequel/adapters/utils/pg_types.rb +2 -0
- data/lib/sequel/adapters/utils/replace.rb +2 -0
- data/lib/sequel/adapters/utils/split_alter_table.rb +2 -0
- data/lib/sequel/adapters/utils/stored_procedures.rb +2 -0
- data/lib/sequel/ast_transformer.rb +2 -0
- data/lib/sequel/connection_pool.rb +2 -0
- data/lib/sequel/connection_pool/sharded_single.rb +2 -0
- data/lib/sequel/connection_pool/sharded_threaded.rb +2 -0
- data/lib/sequel/connection_pool/single.rb +2 -0
- data/lib/sequel/connection_pool/threaded.rb +2 -0
- data/lib/sequel/core.rb +2 -0
- data/lib/sequel/database.rb +2 -0
- data/lib/sequel/database/connecting.rb +2 -0
- data/lib/sequel/database/dataset.rb +2 -0
- data/lib/sequel/database/dataset_defaults.rb +2 -0
- data/lib/sequel/database/features.rb +2 -0
- data/lib/sequel/database/logging.rb +2 -0
- data/lib/sequel/database/misc.rb +2 -0
- data/lib/sequel/database/query.rb +2 -0
- data/lib/sequel/database/schema_generator.rb +2 -0
- data/lib/sequel/database/schema_methods.rb +11 -4
- data/lib/sequel/database/transactions.rb +2 -0
- data/lib/sequel/dataset.rb +2 -0
- data/lib/sequel/dataset/actions.rb +2 -0
- data/lib/sequel/dataset/features.rb +2 -0
- data/lib/sequel/dataset/graph.rb +2 -0
- data/lib/sequel/dataset/misc.rb +2 -0
- data/lib/sequel/dataset/mutation.rb +2 -0
- data/lib/sequel/dataset/placeholder_literalizer.rb +3 -1
- data/lib/sequel/dataset/prepared_statements.rb +2 -0
- data/lib/sequel/dataset/query.rb +2 -0
- data/lib/sequel/dataset/sql.rb +7 -5
- data/lib/sequel/deprecated.rb +2 -0
- data/lib/sequel/exceptions.rb +2 -0
- data/lib/sequel/extensions/_pretty_table.rb +5 -3
- data/lib/sequel/extensions/arbitrary_servers.rb +2 -0
- data/lib/sequel/extensions/blank.rb +2 -0
- data/lib/sequel/extensions/columns_introspection.rb +2 -0
- data/lib/sequel/extensions/connection_validator.rb +2 -0
- data/lib/sequel/extensions/constraint_validations.rb +2 -0
- data/lib/sequel/extensions/core_extensions.rb +2 -0
- data/lib/sequel/extensions/core_refinements.rb +2 -0
- data/lib/sequel/extensions/current_datetime_timestamp.rb +2 -0
- data/lib/sequel/extensions/dataset_source_alias.rb +2 -0
- data/lib/sequel/extensions/date_arithmetic.rb +3 -1
- data/lib/sequel/extensions/empty_array_consider_nulls.rb +2 -0
- data/lib/sequel/extensions/empty_array_ignore_nulls.rb +2 -0
- data/lib/sequel/extensions/error_sql.rb +2 -0
- data/lib/sequel/extensions/eval_inspect.rb +2 -0
- data/lib/sequel/extensions/filter_having.rb +2 -0
- data/lib/sequel/extensions/from_block.rb +2 -0
- data/lib/sequel/extensions/graph_each.rb +2 -0
- data/lib/sequel/extensions/hash_aliases.rb +2 -0
- data/lib/sequel/extensions/inflector.rb +2 -0
- data/lib/sequel/extensions/looser_typecasting.rb +2 -0
- data/lib/sequel/extensions/meta_def.rb +2 -0
- data/lib/sequel/extensions/migration.rb +14 -4
- data/lib/sequel/extensions/mssql_emulate_lateral_with_apply.rb +2 -0
- data/lib/sequel/extensions/named_timezones.rb +2 -0
- data/lib/sequel/extensions/null_dataset.rb +2 -0
- data/lib/sequel/extensions/pagination.rb +2 -0
- data/lib/sequel/extensions/pg_array.rb +16 -36
- data/lib/sequel/extensions/pg_array_ops.rb +2 -0
- data/lib/sequel/extensions/pg_enum.rb +4 -1
- data/lib/sequel/extensions/pg_hstore.rb +3 -1
- data/lib/sequel/extensions/pg_hstore_ops.rb +2 -0
- data/lib/sequel/extensions/pg_inet.rb +2 -0
- data/lib/sequel/extensions/pg_inet_ops.rb +2 -0
- data/lib/sequel/extensions/pg_interval.rb +3 -1
- data/lib/sequel/extensions/pg_json.rb +2 -0
- data/lib/sequel/extensions/pg_json_ops.rb +2 -0
- data/lib/sequel/extensions/pg_loose_count.rb +2 -0
- data/lib/sequel/extensions/pg_range.rb +2 -0
- data/lib/sequel/extensions/pg_range_ops.rb +2 -0
- data/lib/sequel/extensions/pg_row.rb +2 -0
- data/lib/sequel/extensions/pg_row_ops.rb +2 -0
- data/lib/sequel/extensions/pg_static_cache_updater.rb +2 -0
- data/lib/sequel/extensions/pretty_table.rb +2 -0
- data/lib/sequel/extensions/query.rb +2 -0
- data/lib/sequel/extensions/query_literals.rb +2 -0
- data/lib/sequel/extensions/round_timestamps.rb +2 -0
- data/lib/sequel/extensions/ruby18_symbol_extensions.rb +2 -0
- data/lib/sequel/extensions/schema_caching.rb +2 -0
- data/lib/sequel/extensions/schema_dumper.rb +4 -1
- data/lib/sequel/extensions/select_remove.rb +2 -0
- data/lib/sequel/extensions/sequel_3_dataset_methods.rb +3 -1
- data/lib/sequel/extensions/server_block.rb +2 -0
- data/lib/sequel/extensions/set_overrides.rb +2 -0
- data/lib/sequel/extensions/split_array_nil.rb +2 -0
- data/lib/sequel/extensions/sql_expr.rb +2 -0
- data/lib/sequel/extensions/string_date_time.rb +2 -0
- data/lib/sequel/extensions/thread_local_timezones.rb +2 -0
- data/lib/sequel/extensions/to_dot.rb +3 -1
- data/lib/sequel/model.rb +2 -0
- data/lib/sequel/model/associations.rb +3 -1
- data/lib/sequel/model/base.rb +5 -1
- data/lib/sequel/model/dataset_module.rb +2 -0
- data/lib/sequel/model/default_inflections.rb +2 -0
- data/lib/sequel/model/errors.rb +2 -0
- data/lib/sequel/model/exceptions.rb +2 -0
- data/lib/sequel/model/inflections.rb +2 -0
- data/lib/sequel/model/plugins.rb +2 -0
- data/lib/sequel/no_core_ext.rb +2 -0
- data/lib/sequel/plugins/accessed_columns.rb +2 -0
- data/lib/sequel/plugins/active_model.rb +2 -0
- data/lib/sequel/plugins/after_initialize.rb +2 -0
- data/lib/sequel/plugins/association_autoreloading.rb +2 -0
- data/lib/sequel/plugins/association_dependencies.rb +2 -0
- data/lib/sequel/plugins/association_pks.rb +20 -24
- data/lib/sequel/plugins/association_proxies.rb +2 -0
- data/lib/sequel/plugins/auto_validations.rb +2 -0
- data/lib/sequel/plugins/before_after_save.rb +2 -0
- data/lib/sequel/plugins/blacklist_security.rb +2 -0
- data/lib/sequel/plugins/boolean_readers.rb +2 -0
- data/lib/sequel/plugins/boolean_subsets.rb +2 -0
- data/lib/sequel/plugins/caching.rb +2 -0
- data/lib/sequel/plugins/class_table_inheritance.rb +2 -0
- data/lib/sequel/plugins/column_conflicts.rb +2 -0
- data/lib/sequel/plugins/column_select.rb +2 -0
- data/lib/sequel/plugins/composition.rb +2 -0
- data/lib/sequel/plugins/constraint_validations.rb +2 -0
- data/lib/sequel/plugins/csv_serializer.rb +2 -0
- data/lib/sequel/plugins/dataset_associations.rb +2 -0
- data/lib/sequel/plugins/defaults_setter.rb +2 -0
- data/lib/sequel/plugins/delay_add_association.rb +2 -0
- data/lib/sequel/plugins/dirty.rb +2 -0
- data/lib/sequel/plugins/eager_each.rb +2 -0
- data/lib/sequel/plugins/error_splitter.rb +2 -0
- data/lib/sequel/plugins/force_encoding.rb +2 -0
- data/lib/sequel/plugins/hook_class_methods.rb +2 -0
- data/lib/sequel/plugins/identifier_columns.rb +2 -0
- data/lib/sequel/plugins/input_transformer.rb +2 -0
- data/lib/sequel/plugins/insert_returning_select.rb +2 -0
- data/lib/sequel/plugins/instance_filters.rb +2 -0
- data/lib/sequel/plugins/instance_hooks.rb +2 -0
- data/lib/sequel/plugins/inverted_subsets.rb +2 -0
- data/lib/sequel/plugins/json_serializer.rb +2 -0
- data/lib/sequel/plugins/lazy_attributes.rb +2 -0
- data/lib/sequel/plugins/list.rb +2 -0
- data/lib/sequel/plugins/many_through_many.rb +2 -0
- data/lib/sequel/plugins/many_to_one_pk_lookup.rb +2 -0
- data/lib/sequel/plugins/modification_detection.rb +2 -0
- data/lib/sequel/plugins/mssql_optimistic_locking.rb +2 -0
- data/lib/sequel/plugins/nested_attributes.rb +2 -0
- data/lib/sequel/plugins/optimistic_locking.rb +2 -0
- data/lib/sequel/plugins/pg_array_associations.rb +2 -0
- data/lib/sequel/plugins/pg_row.rb +2 -0
- data/lib/sequel/plugins/pg_typecast_on_load.rb +2 -0
- data/lib/sequel/plugins/prepared_statements.rb +2 -0
- data/lib/sequel/plugins/prepared_statements_associations.rb +2 -0
- data/lib/sequel/plugins/prepared_statements_safe.rb +2 -0
- data/lib/sequel/plugins/prepared_statements_with_pk.rb +2 -0
- data/lib/sequel/plugins/rcte_tree.rb +2 -0
- data/lib/sequel/plugins/schema.rb +2 -0
- data/lib/sequel/plugins/scissors.rb +2 -0
- data/lib/sequel/plugins/serialization.rb +2 -0
- data/lib/sequel/plugins/serialization_modification_detection.rb +2 -0
- data/lib/sequel/plugins/sharding.rb +2 -0
- data/lib/sequel/plugins/single_table_inheritance.rb +2 -0
- data/lib/sequel/plugins/singular_table_names.rb +2 -0
- data/lib/sequel/plugins/skip_create_refresh.rb +2 -0
- data/lib/sequel/plugins/split_values.rb +2 -0
- data/lib/sequel/plugins/static_cache.rb +2 -0
- data/lib/sequel/plugins/string_stripper.rb +2 -0
- data/lib/sequel/plugins/subclasses.rb +2 -0
- data/lib/sequel/plugins/subset_conditions.rb +2 -0
- data/lib/sequel/plugins/table_select.rb +2 -0
- data/lib/sequel/plugins/tactical_eager_loading.rb +2 -0
- data/lib/sequel/plugins/timestamps.rb +2 -0
- data/lib/sequel/plugins/touch.rb +2 -0
- data/lib/sequel/plugins/tree.rb +2 -0
- data/lib/sequel/plugins/typecast_on_load.rb +2 -0
- data/lib/sequel/plugins/unlimited_update.rb +2 -0
- data/lib/sequel/plugins/update_or_create.rb +2 -0
- data/lib/sequel/plugins/update_primary_key.rb +2 -0
- data/lib/sequel/plugins/update_refresh.rb +2 -0
- data/lib/sequel/plugins/uuid.rb +2 -0
- data/lib/sequel/plugins/validate_associated.rb +2 -0
- data/lib/sequel/plugins/validation_class_methods.rb +2 -0
- data/lib/sequel/plugins/validation_helpers.rb +3 -1
- data/lib/sequel/plugins/xml_serializer.rb +2 -0
- data/lib/sequel/sql.rb +3 -1
- data/lib/sequel/timezones.rb +2 -0
- data/lib/sequel/version.rb +3 -1
- data/spec/adapters/mysql_spec.rb +4 -0
- data/spec/adapters/postgres_spec.rb +35 -11
- data/spec/core/connection_pool_spec.rb +1 -1
- data/spec/extensions/association_pks_spec.rb +4 -2
- data/spec/extensions/caching_spec.rb +1 -1
- data/spec/extensions/csv_serializer_spec.rb +7 -0
- data/spec/extensions/date_arithmetic_spec.rb +1 -1
- data/spec/extensions/dirty_spec.rb +6 -6
- data/spec/extensions/force_encoding_spec.rb +12 -12
- data/spec/extensions/input_transformer_spec.rb +1 -1
- data/spec/extensions/migration_spec.rb +16 -0
- data/spec/extensions/modification_detection_spec.rb +2 -2
- data/spec/extensions/nested_attributes_spec.rb +1 -1
- data/spec/extensions/optimistic_locking_spec.rb +1 -1
- data/spec/extensions/pg_array_spec.rb +3 -8
- data/spec/files/double_migration/001_create_sessions.rb +9 -0
- data/spec/files/double_migration/002_create_nodes.rb +19 -0
- data/spec/files/double_migration/003_3_create_users.rb +4 -0
- data/spec/files/empty_migration/001_create_sessions.rb +9 -0
- data/spec/files/empty_migration/002_create_nodes.rb +0 -0
- data/spec/files/empty_migration/003_3_create_users.rb +4 -0
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7388e21a31fdf29fda8d3687cdf96011514b32f3
|
4
|
+
data.tar.gz: ea540316de1e370e88ad2c15bc2b53860f34f353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a674f18f2fe56030b484cddbd66e10fa221256609a6314d3f95f606dcd3092d39b96b41368eff9943f95094c7ef8702e1094fcf4d059a7fd3fee2cda8e1eb0de
|
7
|
+
data.tar.gz: 2ba7e438b33bf0601ac63eceaaf1858a91437bf4c35f4c95bd16c9a04e7fe990f975ed395b49d1ec4a42b56fe8a90506e74964421027aa3973105cccc3aa32e6
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
=== 4.31.0 (2016-02-01)
|
2
|
+
|
3
|
+
* Convert types in association_pks setters before saving them, instead of just before running queries (jeremyevans)
|
4
|
+
|
5
|
+
* Use getField and getOID instead of field and oid in the jdbc/postgresql adapter to work around JRuby 9.0.5.0 regression (jeremyevans) (#1137)
|
6
|
+
|
7
|
+
* Support using PostgreSQL-specific types in bound variables in the jdbc/postgresql adapter (jeremyevans)
|
8
|
+
|
9
|
+
* Add support for running with --enable-frozen-string-literal on ruby 2.3 (jeremyevans)
|
10
|
+
|
11
|
+
* Make Database#disconnect in the oracle adapter work correctly on newer versions of oci8 (jeremyevans)
|
12
|
+
|
13
|
+
* Support parsing PostgreSQL arrays with explicit bounds (jeremyevans) (#1131)
|
14
|
+
|
15
|
+
* Raise an error if attempting to use a migration file not containing a single migration (jeremyevans) (#1127)
|
16
|
+
|
17
|
+
* Automatically set referenced key for self referential foriegn key constraint for simple non-autoincrementing primary key on MySQL (jeremyevans) (#1126)
|
18
|
+
|
1
19
|
=== 4.30.0 (2016-01-04)
|
2
20
|
|
3
21
|
* Add Dataset#insert_conflict and #insert_ignore on SQLite for handling uniqueness violations (Sharpie) (#1121)
|
data/MIT-LICENSE
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Copyright (c) 2007-2008 Sharon Rosner
|
2
|
-
Copyright (c) 2008-
|
2
|
+
Copyright (c) 2008-2016 Jeremy Evans
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
of this software and associated documentation files (the "Software"), to
|
data/bin/sequel
CHANGED
data/doc/opening_databases.rdoc
CHANGED
@@ -240,6 +240,12 @@ The following additional options are supported:
|
|
240
240
|
return a connection.
|
241
241
|
:login_timeout :: Set the login timeout on the JDBC connection (in seconds).
|
242
242
|
|
243
|
+
There are a few issues with specific jdbc drivers:
|
244
|
+
|
245
|
+
jdbc-h2 :: jdbc-h2 versions greater than 1.3.175 have issues with ORDER BY not working correctly in some cases.
|
246
|
+
jdbc-postgres :: jdbc-postgres 9.4.1204 has issues using PostgreSQL-specific types in bound variables.
|
247
|
+
Use jdbc-postgres 9.4.1200 or below.
|
248
|
+
|
243
249
|
=== mysql
|
244
250
|
|
245
251
|
Requires: mysqlplus (or mysql if mysqlplus is not available)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
= Improvements
|
2
|
+
|
3
|
+
* Sequel now works with ruby 2.3's --enable-frozen-string-literal,
|
4
|
+
and all of the library files are set to use frozen string
|
5
|
+
literals by default.
|
6
|
+
|
7
|
+
A couple adapters and extensions depend on libraries that have
|
8
|
+
issues with frozen string literals. Pull requests have been sent
|
9
|
+
to each of those dependencies.
|
10
|
+
|
11
|
+
* The migrators will now raise an exception if a migration file
|
12
|
+
contains no migrations or more than one migration.
|
13
|
+
|
14
|
+
* The jdbc/postgresql adapter now supports using PostgreSQL specific
|
15
|
+
types in bound variables. Note that the current version of
|
16
|
+
jdbc-postgres (9.4.1204) has regressions that affect this, users
|
17
|
+
who need this support should stick with jdbc-postgres 9.4.1200 or
|
18
|
+
below.
|
19
|
+
|
20
|
+
* The jdbc/postgresql adapter now works around a regression in Java
|
21
|
+
method lookup in JRuby 9.0.5.0
|
22
|
+
|
23
|
+
* The setter methods added by the association_pks plugin now do type
|
24
|
+
casting immediately, instead of right before the data will be used.
|
25
|
+
This makes them more similar to column setter methods, and ensures
|
26
|
+
that future calls to the getters that use cached values will
|
27
|
+
return correctly typecast data.
|
28
|
+
|
29
|
+
* The PostgreSQL array parser in the pg_array extension now handles
|
30
|
+
arrays with explicit bounds. The explicit bounds are ignored, so
|
31
|
+
such values do not round trip, and there is currently no support for
|
32
|
+
creating arrays with explicit bounds.
|
33
|
+
|
34
|
+
* Creating a table with a simple non-incrementing primary key and a
|
35
|
+
self-referential foreign key now works correctly on MySQL:
|
36
|
+
|
37
|
+
DB.create_table!(:table) do
|
38
|
+
Integer :id, :primary_key=>true
|
39
|
+
foreign_key :fk, :table
|
40
|
+
end
|
41
|
+
|
42
|
+
* Database#disconnect in the oracle adapter now works correctly on
|
43
|
+
more recent versions of oci8 where #logoff can raise OCIException
|
44
|
+
instead of OCIInvalidHandle.
|
45
|
+
|
46
|
+
= Backwards Compatibility
|
47
|
+
|
48
|
+
* The pg_array extension no longer defines
|
49
|
+
Sequel::Postgres::PGArray::JSONCreator. This should only affect
|
50
|
+
backwards compatibility if you were accessing the constant directly.
|
51
|
+
The :parser option to Sequel::Postgres::PGArray.register is also no
|
52
|
+
longer respected, but that should not affect backwards compatibility.
|
53
|
+
|
54
|
+
* The Sequel::Model#convert_cpk_array private method that was added by
|
55
|
+
the association_pks plugin has been removed.
|
56
|
+
Sequel::Model#convert_pk_array handles both simple and composite
|
57
|
+
primary keys now.
|
data/lib/sequel.rb
CHANGED
data/lib/sequel/adapters/ado.rb
CHANGED
data/lib/sequel/adapters/do.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
require 'ibm_db'
|
2
4
|
Sequel.require 'adapters/shared/db2'
|
3
5
|
|
@@ -245,7 +247,7 @@ module Sequel
|
|
245
247
|
args = args.map{|v| v.nil? ? nil : prepared_statement_arg(v)}
|
246
248
|
log_sql = "EXECUTE #{ps_name}"
|
247
249
|
if ps.log_sql
|
248
|
-
log_sql
|
250
|
+
log_sql += " ("
|
249
251
|
log_sql << sql
|
250
252
|
log_sql << ")"
|
251
253
|
end
|
data/lib/sequel/adapters/jdbc.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
Sequel::JDBC.load_driver('org.postgresql.Driver', :Postgres)
|
2
4
|
Sequel.require 'adapters/shared/postgres'
|
3
5
|
|
@@ -138,6 +140,27 @@ module Sequel
|
|
138
140
|
super || exception.message =~ /\A(This connection has been closed\.|FATAL: terminating connection due to administrator command|An I\/O error occurred while sending to the backend\.)\z/
|
139
141
|
end
|
140
142
|
|
143
|
+
# For PostgreSQL-specific types, return the string that should be used
|
144
|
+
# as the PGObject value. Returns nil by default, loading pg_* extensions
|
145
|
+
# will override this to add support for specific types.
|
146
|
+
def bound_variable_arg(arg, conn)
|
147
|
+
nil
|
148
|
+
end
|
149
|
+
|
150
|
+
# If the given argument is a recognized PostgreSQL-specific type, create
|
151
|
+
# a PGObject instance with unknown type and the bound argument string value,
|
152
|
+
# and set that as the prepared statement argument.
|
153
|
+
def set_ps_arg(cps, arg, i)
|
154
|
+
if v = bound_variable_arg(arg, nil)
|
155
|
+
obj = org.postgresql.util.PGobject.new
|
156
|
+
obj.setType("unknown")
|
157
|
+
obj.setValue(v)
|
158
|
+
cps.setObject(i, obj)
|
159
|
+
else
|
160
|
+
super
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
141
164
|
# Use setNull for nil arguments as the default behavior of setString
|
142
165
|
# with nil doesn't appear to work correctly on PostgreSQL.
|
143
166
|
def set_ps_arg_nil(cps, i)
|
@@ -193,7 +216,7 @@ module Sequel
|
|
193
216
|
def type_convertor(map, meta, type, i)
|
194
217
|
case type
|
195
218
|
when *PG_SPECIFIC_TYPES
|
196
|
-
oid = meta.
|
219
|
+
oid = meta.getField(i).getOID
|
197
220
|
if pr = db.oid_convertor_proc(oid)
|
198
221
|
pr
|
199
222
|
elsif type == ARRAY_TYPE
|
data/lib/sequel/adapters/mock.rb
CHANGED
data/lib/sequel/adapters/odbc.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
require 'oci8'
|
2
4
|
Sequel.require 'adapters/shared/oracle'
|
3
5
|
|
@@ -57,7 +59,7 @@ module Sequel
|
|
57
59
|
|
58
60
|
def disconnect_connection(c)
|
59
61
|
c.logoff
|
60
|
-
rescue
|
62
|
+
rescue OCIException
|
61
63
|
nil
|
62
64
|
end
|
63
65
|
|
@@ -176,7 +178,7 @@ module Sequel
|
|
176
178
|
args = cursor_bind_params(conn, cursor, opts[:arguments])
|
177
179
|
log_sql = "EXECUTE #{name}"
|
178
180
|
if ps.log_sql
|
179
|
-
log_sql
|
181
|
+
log_sql += " ("
|
180
182
|
log_sql << sql
|
181
183
|
log_sql << ")"
|
182
184
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
Sequel.require 'adapters/shared/postgres'
|
2
4
|
|
3
5
|
begin
|
@@ -375,7 +377,7 @@ module Sequel
|
|
375
377
|
end
|
376
378
|
nil
|
377
379
|
else
|
378
|
-
b =
|
380
|
+
b = String.new
|
379
381
|
b << buf while buf = conn.get_copy_data
|
380
382
|
b
|
381
383
|
end
|
@@ -466,7 +468,7 @@ module Sequel
|
|
466
468
|
begin
|
467
469
|
channels = Array(channels)
|
468
470
|
channels.each do |channel|
|
469
|
-
sql = "LISTEN "
|
471
|
+
sql = "LISTEN ".dup
|
470
472
|
dataset.send(:identifier_append, sql, channel)
|
471
473
|
conn.execute(sql)
|
472
474
|
end
|
@@ -589,7 +591,7 @@ module Sequel
|
|
589
591
|
|
590
592
|
log_sql = "EXECUTE #{ps_name}"
|
591
593
|
if ps.log_sql
|
592
|
-
log_sql
|
594
|
+
log_sql += " ("
|
593
595
|
log_sql << sql
|
594
596
|
log_sql << ")"
|
595
597
|
end
|