sequel 5.82.0 → 5.84.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sequel +9 -17
- data/lib/sequel/adapters/jdbc/derby.rb +1 -1
- data/lib/sequel/adapters/shared/db2.rb +1 -1
- data/lib/sequel/adapters/shared/mssql.rb +14 -2
- data/lib/sequel/adapters/shared/postgres.rb +42 -4
- data/lib/sequel/adapters/shared/sqlite.rb +3 -1
- data/lib/sequel/database/connecting.rb +1 -4
- data/lib/sequel/database/misc.rb +27 -7
- data/lib/sequel/database/schema_methods.rb +17 -1
- data/lib/sequel/dataset/sql.rb +13 -0
- data/lib/sequel/extensions/pg_json_ops.rb +328 -1
- data/lib/sequel/extensions/stdio_logger.rb +48 -0
- data/lib/sequel/extensions/string_agg.rb +15 -2
- data/lib/sequel/plugins/defaults_setter.rb +16 -4
- data/lib/sequel/plugins/optimistic_locking.rb +2 -0
- data/lib/sequel/sql.rb +8 -5
- data/lib/sequel/version.rb +1 -1
- metadata +4 -235
- data/CHANGELOG +0 -1377
- data/README.rdoc +0 -936
- data/doc/advanced_associations.rdoc +0 -884
- data/doc/association_basics.rdoc +0 -1859
- data/doc/bin_sequel.rdoc +0 -146
- data/doc/cheat_sheet.rdoc +0 -255
- data/doc/code_order.rdoc +0 -104
- data/doc/core_extensions.rdoc +0 -405
- data/doc/dataset_basics.rdoc +0 -96
- data/doc/dataset_filtering.rdoc +0 -222
- data/doc/extensions.rdoc +0 -77
- data/doc/fork_safety.rdoc +0 -84
- data/doc/mass_assignment.rdoc +0 -98
- data/doc/migration.rdoc +0 -660
- data/doc/model_dataset_method_design.rdoc +0 -129
- data/doc/model_hooks.rdoc +0 -254
- data/doc/model_plugins.rdoc +0 -270
- data/doc/mssql_stored_procedures.rdoc +0 -43
- data/doc/object_model.rdoc +0 -563
- data/doc/opening_databases.rdoc +0 -439
- data/doc/postgresql.rdoc +0 -611
- data/doc/prepared_statements.rdoc +0 -144
- data/doc/querying.rdoc +0 -1070
- data/doc/reflection.rdoc +0 -120
- data/doc/release_notes/5.0.0.txt +0 -159
- data/doc/release_notes/5.1.0.txt +0 -31
- data/doc/release_notes/5.10.0.txt +0 -84
- data/doc/release_notes/5.11.0.txt +0 -83
- data/doc/release_notes/5.12.0.txt +0 -141
- data/doc/release_notes/5.13.0.txt +0 -27
- data/doc/release_notes/5.14.0.txt +0 -63
- data/doc/release_notes/5.15.0.txt +0 -39
- data/doc/release_notes/5.16.0.txt +0 -110
- data/doc/release_notes/5.17.0.txt +0 -31
- data/doc/release_notes/5.18.0.txt +0 -69
- data/doc/release_notes/5.19.0.txt +0 -28
- data/doc/release_notes/5.2.0.txt +0 -33
- data/doc/release_notes/5.20.0.txt +0 -89
- data/doc/release_notes/5.21.0.txt +0 -87
- data/doc/release_notes/5.22.0.txt +0 -48
- data/doc/release_notes/5.23.0.txt +0 -56
- data/doc/release_notes/5.24.0.txt +0 -56
- data/doc/release_notes/5.25.0.txt +0 -32
- data/doc/release_notes/5.26.0.txt +0 -35
- data/doc/release_notes/5.27.0.txt +0 -21
- data/doc/release_notes/5.28.0.txt +0 -16
- data/doc/release_notes/5.29.0.txt +0 -22
- data/doc/release_notes/5.3.0.txt +0 -121
- data/doc/release_notes/5.30.0.txt +0 -20
- data/doc/release_notes/5.31.0.txt +0 -148
- data/doc/release_notes/5.32.0.txt +0 -46
- data/doc/release_notes/5.33.0.txt +0 -24
- data/doc/release_notes/5.34.0.txt +0 -40
- data/doc/release_notes/5.35.0.txt +0 -56
- data/doc/release_notes/5.36.0.txt +0 -60
- data/doc/release_notes/5.37.0.txt +0 -30
- data/doc/release_notes/5.38.0.txt +0 -28
- data/doc/release_notes/5.39.0.txt +0 -19
- data/doc/release_notes/5.4.0.txt +0 -80
- data/doc/release_notes/5.40.0.txt +0 -40
- data/doc/release_notes/5.41.0.txt +0 -25
- data/doc/release_notes/5.42.0.txt +0 -136
- data/doc/release_notes/5.43.0.txt +0 -98
- data/doc/release_notes/5.44.0.txt +0 -32
- data/doc/release_notes/5.45.0.txt +0 -34
- data/doc/release_notes/5.46.0.txt +0 -87
- data/doc/release_notes/5.47.0.txt +0 -59
- data/doc/release_notes/5.48.0.txt +0 -14
- data/doc/release_notes/5.49.0.txt +0 -59
- data/doc/release_notes/5.5.0.txt +0 -61
- data/doc/release_notes/5.50.0.txt +0 -78
- data/doc/release_notes/5.51.0.txt +0 -47
- data/doc/release_notes/5.52.0.txt +0 -87
- data/doc/release_notes/5.53.0.txt +0 -23
- data/doc/release_notes/5.54.0.txt +0 -27
- data/doc/release_notes/5.55.0.txt +0 -21
- data/doc/release_notes/5.56.0.txt +0 -51
- data/doc/release_notes/5.57.0.txt +0 -23
- data/doc/release_notes/5.58.0.txt +0 -31
- data/doc/release_notes/5.59.0.txt +0 -73
- data/doc/release_notes/5.6.0.txt +0 -31
- data/doc/release_notes/5.60.0.txt +0 -22
- data/doc/release_notes/5.61.0.txt +0 -43
- data/doc/release_notes/5.62.0.txt +0 -132
- data/doc/release_notes/5.63.0.txt +0 -33
- data/doc/release_notes/5.64.0.txt +0 -50
- data/doc/release_notes/5.65.0.txt +0 -21
- data/doc/release_notes/5.66.0.txt +0 -24
- data/doc/release_notes/5.67.0.txt +0 -32
- data/doc/release_notes/5.68.0.txt +0 -61
- data/doc/release_notes/5.69.0.txt +0 -26
- data/doc/release_notes/5.7.0.txt +0 -108
- data/doc/release_notes/5.70.0.txt +0 -35
- data/doc/release_notes/5.71.0.txt +0 -21
- data/doc/release_notes/5.72.0.txt +0 -33
- data/doc/release_notes/5.73.0.txt +0 -66
- data/doc/release_notes/5.74.0.txt +0 -45
- data/doc/release_notes/5.75.0.txt +0 -35
- data/doc/release_notes/5.76.0.txt +0 -86
- data/doc/release_notes/5.77.0.txt +0 -63
- data/doc/release_notes/5.78.0.txt +0 -67
- data/doc/release_notes/5.79.0.txt +0 -28
- data/doc/release_notes/5.8.0.txt +0 -170
- data/doc/release_notes/5.80.0.txt +0 -40
- data/doc/release_notes/5.81.0.txt +0 -31
- data/doc/release_notes/5.82.0.txt +0 -61
- data/doc/release_notes/5.9.0.txt +0 -99
- data/doc/schema_modification.rdoc +0 -679
- data/doc/security.rdoc +0 -443
- data/doc/sharding.rdoc +0 -286
- data/doc/sql.rdoc +0 -648
- data/doc/testing.rdoc +0 -204
- data/doc/thread_safety.rdoc +0 -15
- data/doc/transactions.rdoc +0 -250
- data/doc/validations.rdoc +0 -558
- data/doc/virtual_rows.rdoc +0 -265
@@ -1,61 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* MERGE RETURNING is now supported when using PostgreSQL 17+. For
|
4
|
-
datasets supporting RETURNING, calling merge with a block
|
5
|
-
will yield each returned row:
|
6
|
-
|
7
|
-
DB[:table1].
|
8
|
-
returning.
|
9
|
-
merge_using(:table2, column1: :column2).
|
10
|
-
merge_insert(column3: :column4).
|
11
|
-
merge do |row|
|
12
|
-
# ...
|
13
|
-
end
|
14
|
-
# MERGE INTO "table1" USING "table2"
|
15
|
-
# ON ("column1" = "column2")
|
16
|
-
# WHEN NOT MATCHED THEN
|
17
|
-
# INSERT ("column3") VALUES ("column3")
|
18
|
-
# RETURNING *
|
19
|
-
|
20
|
-
* A :connect_opts_proc Database option is now supported, to allow
|
21
|
-
support for late-binding Database options. If provided, this
|
22
|
-
should be a callable object that is called with the options
|
23
|
-
used for connecting, and can modify the options. This makes
|
24
|
-
it simple to support authentication schemes that rotate
|
25
|
-
passwords automatically without user involvement:
|
26
|
-
|
27
|
-
Sequel.connect('postgres://user@host/database',
|
28
|
-
connect_opts_proc: lambda do |opts|
|
29
|
-
opts[:password] = SomeAuthLibrary.get_current_password(opts[:user])
|
30
|
-
end)
|
31
|
-
|
32
|
-
Note that the jdbc adapter relies on URIs and not option hashes,
|
33
|
-
so when using the jdbc adapter with this feature, you'll generally
|
34
|
-
need to set the :uri option.
|
35
|
-
|
36
|
-
= Other Improvements
|
37
|
-
|
38
|
-
* A race condition in the threaded connection pools that could result
|
39
|
-
in a delay or timeout error in checking out connections in low-traffic
|
40
|
-
environments has been fixed.
|
41
|
-
|
42
|
-
* Sequel now supports dropping a unique column or a column that is
|
43
|
-
part of an index on SQLite 3.35.0+, with the same emulation approach
|
44
|
-
it uses in earlier SQLite versions.
|
45
|
-
|
46
|
-
* The tactical_eager_loading plugin now handles cases where inheritance
|
47
|
-
is used and the objects used include associations with the same name
|
48
|
-
but different definitions. Sequel will now only eager load the
|
49
|
-
association for objects that use the same association definition as
|
50
|
-
the receiver.
|
51
|
-
|
52
|
-
= Backwards Compatibility
|
53
|
-
|
54
|
-
* bin/sequel no longer requires logger if passed the -E or -l options.
|
55
|
-
Instead, it uses a simple implementation that supports only
|
56
|
-
debug/warn/info/error methods. If you are using bin/sequel and
|
57
|
-
depending on the log format produced by the logger library, or
|
58
|
-
calling methods on the logger object other than
|
59
|
-
debug/warn/info/error, you'll need to update your code. This change
|
60
|
-
was made because logger is moving out of stdlib in a future Ruby
|
61
|
-
version.
|
data/doc/release_notes/5.9.0.txt
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
= New Features
|
2
|
-
|
3
|
-
* An escaped_like extension has been added, for the creation of
|
4
|
-
LIKE/ILIKE expressions with placeholders in patterns without
|
5
|
-
access to a dataset. This adds escaped_like and escaped_ilike
|
6
|
-
methods to the same Sequel expression objects that support like
|
7
|
-
and ilike. These methods take two arguments, the first being
|
8
|
-
the pattern, with ? placeholders, and the second being the
|
9
|
-
placeholder value (which can be an array for multiple
|
10
|
-
placeholders):
|
11
|
-
|
12
|
-
Sequel.extension :escaped_like
|
13
|
-
DB[:table].where{string_column.escaped_like('?%', user_input)}
|
14
|
-
# user_input is 'foo':
|
15
|
-
# SELECT * FROM table WHERE string_column LIKE 'foo%'
|
16
|
-
# user_input is '%foo':
|
17
|
-
# SELECT * FROM table WHERE string_column LIKE '\%foo%'
|
18
|
-
|
19
|
-
* Generated columns on MySQL 5.7+ and MariaDB 5.2+ are now supported
|
20
|
-
using the :generated_always_as option when creating the column.
|
21
|
-
The :generated_type option can also be used to specify the type of
|
22
|
-
generated column (virtual or stored). Examples:
|
23
|
-
|
24
|
-
DB.add_column :t, :c, Integer, generated_always_as: Sequel[:a]+'b'
|
25
|
-
# ALTER TABLE `t` ADD COLUMN `c` varchar(255)
|
26
|
-
# GENERATED ALWAYS AS (CONCAT(`a`, 'b'))
|
27
|
-
|
28
|
-
DB.add_column :t, :c, Integer, generated_always_as: Sequel[:a]+'b',
|
29
|
-
generated_type: :virtual
|
30
|
-
# ALTER TABLE `t` ADD COLUMN `c` varchar(255)
|
31
|
-
# GENERATED ALWAYS AS (CONCAT(`a`, 'b')) VIRTUAL
|
32
|
-
|
33
|
-
DB.add_column :t, :c, Integer, generated_always_as: Sequel[:a]+'b',
|
34
|
-
generated_type: :stored
|
35
|
-
# ALTER TABLE `t` ADD COLUMN `c` varchar(255)
|
36
|
-
# GENERATED ALWAYS AS (CONCAT(`a`, 'b')) STORED
|
37
|
-
|
38
|
-
* Sequel::Model.has_dataset? has been added for checking whether the
|
39
|
-
model class has an associated dataset. This will generally be true
|
40
|
-
for most model classes, but will be false for abstract model
|
41
|
-
classes (such as Sequel::Model itself).
|
42
|
-
|
43
|
-
* Sequel::VERSION_NUMBER has been added for easier future version
|
44
|
-
comparisons. The version number for 5.9.0 is 50090.
|
45
|
-
|
46
|
-
= Other Improvements
|
47
|
-
|
48
|
-
* When disconnecting connections in the threaded connection pools,
|
49
|
-
the disconnection is performed without holding the connection
|
50
|
-
pool mutex, since disconnection may block.
|
51
|
-
|
52
|
-
* The sharded threaded connection pool no longer deadlocks when
|
53
|
-
disconnecting connections if the connection_validator or
|
54
|
-
connection_expiration extension is used.
|
55
|
-
|
56
|
-
* If a thread dies and does not check a connection back into the
|
57
|
-
connection pool, Sequel now disconnects the connection when it
|
58
|
-
detects the dead thread, instead of assuming the connection is
|
59
|
-
safe to be reused.
|
60
|
-
|
61
|
-
* When using eager_graph with cascaded associations, a unique
|
62
|
-
object is now used instead of a shared object in cases where
|
63
|
-
using a shared object may cause further cascaded associated
|
64
|
-
objects to be duplicated.
|
65
|
-
|
66
|
-
* On PostgreSQL, the ESCAPE modifier to the LIKE/ILIKE operators is
|
67
|
-
no longer used, since the default ESCAPE value is the one Sequel
|
68
|
-
uses. This change was made in order to allow the LIKE/ILIKE
|
69
|
-
operators to work with the ANY function, as PostgreSQL does not
|
70
|
-
support the use of the ESCAPE modifier in such cases.
|
71
|
-
|
72
|
-
* A hash argument passed to Model.nested_attributes in the
|
73
|
-
nested_attributes plugin is now no longer modified.
|
74
|
-
|
75
|
-
* Internal data structures for eager and eager_graph datasets are now
|
76
|
-
frozen to avoid unintentional modification.
|
77
|
-
|
78
|
-
* Nondeterministic behavior in Database#foreign_key_list with the
|
79
|
-
:reverse option on PostgreSQL is now avoided by using an
|
80
|
-
unambiguous order.
|
81
|
-
|
82
|
-
* Performance has been improved slightly by avoiding unnecessary
|
83
|
-
hash allocations.
|
84
|
-
|
85
|
-
* Performance has been improved slightly by using while instead
|
86
|
-
of Kernel#loop.
|
87
|
-
|
88
|
-
* BigDecimal() is now used instead of BigDecimal.new(), as the
|
89
|
-
latter has been deprecated.
|
90
|
-
|
91
|
-
* The jdbc adapter now avoids referencing ::NativeException on JRuby
|
92
|
-
9.2+, since JRuby has deprecated it. It is still used on older
|
93
|
-
versions of JRuby, since some JRuby 1.7 code may still require it.
|
94
|
-
|
95
|
-
* Sequel now works around multiple Date/Time conversion bugs in
|
96
|
-
JRuby 9.2.0.0 for BC dates in the pg_extended_date_support
|
97
|
-
extension. These bugs have already been fixed in JRuby, and
|
98
|
-
the workarounds will be removed after the release of JRuby
|
99
|
-
9.2.1.0.
|