sequel 4.26.0 → 5.37.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (692) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG +405 -5656
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +232 -157
  5. data/bin/sequel +32 -9
  6. data/doc/advanced_associations.rdoc +252 -188
  7. data/doc/association_basics.rdoc +231 -273
  8. data/doc/bin_sequel.rdoc +5 -3
  9. data/doc/cheat_sheet.rdoc +75 -48
  10. data/doc/code_order.rdoc +28 -10
  11. data/doc/core_extensions.rdoc +104 -63
  12. data/doc/dataset_basics.rdoc +12 -21
  13. data/doc/dataset_filtering.rdoc +99 -86
  14. data/doc/extensions.rdoc +3 -10
  15. data/doc/mass_assignment.rdoc +74 -31
  16. data/doc/migration.rdoc +72 -46
  17. data/doc/model_dataset_method_design.rdoc +129 -0
  18. data/doc/model_hooks.rdoc +15 -25
  19. data/doc/model_plugins.rdoc +12 -12
  20. data/doc/mssql_stored_procedures.rdoc +3 -3
  21. data/doc/object_model.rdoc +59 -69
  22. data/doc/opening_databases.rdoc +84 -94
  23. data/doc/postgresql.rdoc +268 -38
  24. data/doc/prepared_statements.rdoc +29 -24
  25. data/doc/querying.rdoc +184 -164
  26. data/doc/reflection.rdoc +5 -6
  27. data/doc/release_notes/5.0.0.txt +159 -0
  28. data/doc/release_notes/5.1.0.txt +31 -0
  29. data/doc/release_notes/5.10.0.txt +84 -0
  30. data/doc/release_notes/5.11.0.txt +83 -0
  31. data/doc/release_notes/5.12.0.txt +141 -0
  32. data/doc/release_notes/5.13.0.txt +27 -0
  33. data/doc/release_notes/5.14.0.txt +63 -0
  34. data/doc/release_notes/5.15.0.txt +39 -0
  35. data/doc/release_notes/5.16.0.txt +110 -0
  36. data/doc/release_notes/5.17.0.txt +31 -0
  37. data/doc/release_notes/5.18.0.txt +69 -0
  38. data/doc/release_notes/5.19.0.txt +28 -0
  39. data/doc/release_notes/5.2.0.txt +33 -0
  40. data/doc/release_notes/5.20.0.txt +89 -0
  41. data/doc/release_notes/5.21.0.txt +87 -0
  42. data/doc/release_notes/5.22.0.txt +48 -0
  43. data/doc/release_notes/5.23.0.txt +56 -0
  44. data/doc/release_notes/5.24.0.txt +56 -0
  45. data/doc/release_notes/5.25.0.txt +32 -0
  46. data/doc/release_notes/5.26.0.txt +35 -0
  47. data/doc/release_notes/5.27.0.txt +21 -0
  48. data/doc/release_notes/5.28.0.txt +16 -0
  49. data/doc/release_notes/5.29.0.txt +22 -0
  50. data/doc/release_notes/5.3.0.txt +121 -0
  51. data/doc/release_notes/5.30.0.txt +20 -0
  52. data/doc/release_notes/5.31.0.txt +148 -0
  53. data/doc/release_notes/5.32.0.txt +46 -0
  54. data/doc/release_notes/5.33.0.txt +24 -0
  55. data/doc/release_notes/5.34.0.txt +40 -0
  56. data/doc/release_notes/5.35.0.txt +56 -0
  57. data/doc/release_notes/5.36.0.txt +60 -0
  58. data/doc/release_notes/5.37.0.txt +30 -0
  59. data/doc/release_notes/5.4.0.txt +80 -0
  60. data/doc/release_notes/5.5.0.txt +61 -0
  61. data/doc/release_notes/5.6.0.txt +31 -0
  62. data/doc/release_notes/5.7.0.txt +108 -0
  63. data/doc/release_notes/5.8.0.txt +170 -0
  64. data/doc/release_notes/5.9.0.txt +99 -0
  65. data/doc/schema_modification.rdoc +102 -77
  66. data/doc/security.rdoc +160 -87
  67. data/doc/sharding.rdoc +74 -47
  68. data/doc/sql.rdoc +135 -122
  69. data/doc/testing.rdoc +34 -18
  70. data/doc/thread_safety.rdoc +2 -4
  71. data/doc/transactions.rdoc +101 -19
  72. data/doc/validations.rdoc +64 -51
  73. data/doc/virtual_rows.rdoc +90 -109
  74. data/lib/sequel.rb +3 -1
  75. data/lib/sequel/adapters/ado.rb +154 -22
  76. data/lib/sequel/adapters/ado/access.rb +21 -21
  77. data/lib/sequel/adapters/ado/mssql.rb +8 -15
  78. data/lib/sequel/adapters/amalgalite.rb +17 -25
  79. data/lib/sequel/adapters/ibmdb.rb +52 -58
  80. data/lib/sequel/adapters/jdbc.rb +149 -127
  81. data/lib/sequel/adapters/jdbc/db2.rb +32 -40
  82. data/lib/sequel/adapters/jdbc/derby.rb +56 -58
  83. data/lib/sequel/adapters/jdbc/h2.rb +40 -30
  84. data/lib/sequel/adapters/jdbc/hsqldb.rb +22 -33
  85. data/lib/sequel/adapters/jdbc/jtds.rb +4 -10
  86. data/lib/sequel/adapters/jdbc/mssql.rb +6 -12
  87. data/lib/sequel/adapters/jdbc/mysql.rb +17 -18
  88. data/lib/sequel/adapters/jdbc/oracle.rb +25 -19
  89. data/lib/sequel/adapters/jdbc/postgresql.rb +90 -69
  90. data/lib/sequel/adapters/jdbc/sqlanywhere.rb +14 -24
  91. data/lib/sequel/adapters/jdbc/sqlite.rb +50 -12
  92. data/lib/sequel/adapters/jdbc/sqlserver.rb +36 -9
  93. data/lib/sequel/adapters/jdbc/transactions.rb +25 -39
  94. data/lib/sequel/adapters/mock.rb +104 -113
  95. data/lib/sequel/adapters/mysql.rb +42 -61
  96. data/lib/sequel/adapters/mysql2.rb +126 -35
  97. data/lib/sequel/adapters/odbc.rb +21 -28
  98. data/lib/sequel/adapters/odbc/db2.rb +3 -1
  99. data/lib/sequel/adapters/odbc/mssql.rb +11 -15
  100. data/lib/sequel/adapters/odbc/oracle.rb +11 -0
  101. data/lib/sequel/adapters/oracle.rb +62 -68
  102. data/lib/sequel/adapters/postgres.rb +257 -311
  103. data/lib/sequel/adapters/postgresql.rb +3 -1
  104. data/lib/sequel/adapters/shared/access.rb +75 -79
  105. data/lib/sequel/adapters/shared/db2.rb +96 -74
  106. data/lib/sequel/adapters/shared/mssql.rb +258 -213
  107. data/lib/sequel/adapters/shared/mysql.rb +284 -216
  108. data/lib/sequel/adapters/shared/oracle.rb +175 -60
  109. data/lib/sequel/adapters/shared/postgres.rb +829 -383
  110. data/lib/sequel/adapters/shared/sqlanywhere.rb +105 -127
  111. data/lib/sequel/adapters/shared/sqlite.rb +382 -159
  112. data/lib/sequel/adapters/sqlanywhere.rb +53 -38
  113. data/lib/sequel/adapters/sqlite.rb +111 -105
  114. data/lib/sequel/adapters/tinytds.rb +38 -46
  115. data/lib/sequel/adapters/utils/emulate_offset_with_reverse_and_count.rb +8 -9
  116. data/lib/sequel/adapters/utils/emulate_offset_with_row_number.rb +7 -5
  117. data/lib/sequel/adapters/utils/mysql_mysql2.rb +87 -0
  118. data/lib/sequel/adapters/utils/mysql_prepared_statements.rb +56 -0
  119. data/lib/sequel/adapters/utils/replace.rb +3 -4
  120. data/lib/sequel/adapters/utils/split_alter_table.rb +2 -0
  121. data/lib/sequel/adapters/utils/stored_procedures.rb +9 -22
  122. data/lib/sequel/adapters/utils/unmodified_identifiers.rb +28 -0
  123. data/lib/sequel/ast_transformer.rb +13 -89
  124. data/lib/sequel/connection_pool.rb +54 -26
  125. data/lib/sequel/connection_pool/sharded_single.rb +19 -12
  126. data/lib/sequel/connection_pool/sharded_threaded.rb +160 -111
  127. data/lib/sequel/connection_pool/single.rb +21 -12
  128. data/lib/sequel/connection_pool/threaded.rb +137 -119
  129. data/lib/sequel/core.rb +352 -320
  130. data/lib/sequel/database.rb +19 -2
  131. data/lib/sequel/database/connecting.rb +70 -55
  132. data/lib/sequel/database/dataset.rb +15 -5
  133. data/lib/sequel/database/dataset_defaults.rb +20 -102
  134. data/lib/sequel/database/features.rb +20 -4
  135. data/lib/sequel/database/logging.rb +25 -7
  136. data/lib/sequel/database/misc.rb +132 -118
  137. data/lib/sequel/database/query.rb +51 -28
  138. data/lib/sequel/database/schema_generator.rb +188 -75
  139. data/lib/sequel/database/schema_methods.rb +161 -92
  140. data/lib/sequel/database/transactions.rb +260 -58
  141. data/lib/sequel/dataset.rb +28 -12
  142. data/lib/sequel/dataset/actions.rb +354 -170
  143. data/lib/sequel/dataset/dataset_module.rb +46 -0
  144. data/lib/sequel/dataset/features.rb +81 -34
  145. data/lib/sequel/dataset/graph.rb +82 -58
  146. data/lib/sequel/dataset/misc.rb +139 -47
  147. data/lib/sequel/dataset/placeholder_literalizer.rb +66 -26
  148. data/lib/sequel/dataset/prepared_statements.rb +188 -85
  149. data/lib/sequel/dataset/query.rb +428 -214
  150. data/lib/sequel/dataset/sql.rb +446 -339
  151. data/lib/sequel/deprecated.rb +14 -2
  152. data/lib/sequel/exceptions.rb +48 -16
  153. data/lib/sequel/extensions/_model_constraint_validations.rb +16 -0
  154. data/lib/sequel/extensions/_model_pg_row.rb +43 -0
  155. data/lib/sequel/extensions/_pretty_table.rb +10 -9
  156. data/lib/sequel/extensions/any_not_empty.rb +45 -0
  157. data/lib/sequel/extensions/arbitrary_servers.rb +15 -11
  158. data/lib/sequel/extensions/auto_literal_strings.rb +74 -0
  159. data/lib/sequel/extensions/blank.rb +2 -0
  160. data/lib/sequel/extensions/caller_logging.rb +79 -0
  161. data/lib/sequel/extensions/columns_introspection.rb +9 -4
  162. data/lib/sequel/extensions/connection_expiration.rb +99 -0
  163. data/lib/sequel/extensions/connection_validator.rb +26 -13
  164. data/lib/sequel/extensions/constant_sql_override.rb +65 -0
  165. data/lib/sequel/extensions/constraint_validations.rb +93 -38
  166. data/lib/sequel/extensions/core_extensions.rb +45 -53
  167. data/lib/sequel/extensions/core_refinements.rb +44 -46
  168. data/lib/sequel/extensions/current_datetime_timestamp.rb +5 -4
  169. data/lib/sequel/extensions/dataset_source_alias.rb +4 -0
  170. data/lib/sequel/extensions/date_arithmetic.rb +42 -16
  171. data/lib/sequel/extensions/datetime_parse_to_time.rb +37 -0
  172. data/lib/sequel/extensions/duplicate_columns_handler.rb +94 -0
  173. data/lib/sequel/extensions/empty_array_consider_nulls.rb +7 -3
  174. data/lib/sequel/extensions/error_sql.rb +7 -3
  175. data/lib/sequel/extensions/escaped_like.rb +100 -0
  176. data/lib/sequel/extensions/eval_inspect.rb +14 -15
  177. data/lib/sequel/extensions/exclude_or_null.rb +68 -0
  178. data/lib/sequel/extensions/fiber_concurrency.rb +24 -0
  179. data/lib/sequel/extensions/freeze_datasets.rb +3 -0
  180. data/lib/sequel/extensions/from_block.rb +2 -31
  181. data/lib/sequel/extensions/graph_each.rb +19 -6
  182. data/lib/sequel/extensions/identifier_mangling.rb +180 -0
  183. data/lib/sequel/extensions/implicit_subquery.rb +48 -0
  184. data/lib/sequel/extensions/index_caching.rb +109 -0
  185. data/lib/sequel/extensions/inflector.rb +8 -4
  186. data/lib/sequel/extensions/integer64.rb +32 -0
  187. data/lib/sequel/extensions/looser_typecasting.rb +19 -9
  188. data/lib/sequel/extensions/migration.rb +132 -80
  189. data/lib/sequel/extensions/mssql_emulate_lateral_with_apply.rb +4 -0
  190. data/lib/sequel/extensions/named_timezones.rb +88 -23
  191. data/lib/sequel/extensions/no_auto_literal_strings.rb +4 -0
  192. data/lib/sequel/extensions/null_dataset.rb +12 -8
  193. data/lib/sequel/extensions/pagination.rb +35 -28
  194. data/lib/sequel/extensions/pg_array.rb +227 -316
  195. data/lib/sequel/extensions/pg_array_ops.rb +19 -7
  196. data/lib/sequel/extensions/pg_enum.rb +69 -24
  197. data/lib/sequel/extensions/pg_extended_date_support.rb +250 -0
  198. data/lib/sequel/extensions/pg_hstore.rb +50 -59
  199. data/lib/sequel/extensions/pg_hstore_ops.rb +9 -3
  200. data/lib/sequel/extensions/pg_inet.rb +34 -15
  201. data/lib/sequel/extensions/pg_inet_ops.rb +5 -1
  202. data/lib/sequel/extensions/pg_interval.rb +26 -26
  203. data/lib/sequel/extensions/pg_json.rb +422 -141
  204. data/lib/sequel/extensions/pg_json_ops.rb +248 -9
  205. data/lib/sequel/extensions/pg_loose_count.rb +5 -1
  206. data/lib/sequel/extensions/pg_range.rb +162 -146
  207. data/lib/sequel/extensions/pg_range_ops.rb +10 -5
  208. data/lib/sequel/extensions/pg_row.rb +53 -87
  209. data/lib/sequel/extensions/pg_row_ops.rb +36 -13
  210. data/lib/sequel/extensions/pg_static_cache_updater.rb +6 -2
  211. data/lib/sequel/extensions/pg_timestamptz.rb +28 -0
  212. data/lib/sequel/extensions/pretty_table.rb +4 -0
  213. data/lib/sequel/extensions/query.rb +12 -7
  214. data/lib/sequel/extensions/round_timestamps.rb +6 -9
  215. data/lib/sequel/extensions/run_transaction_hooks.rb +72 -0
  216. data/lib/sequel/extensions/s.rb +59 -0
  217. data/lib/sequel/extensions/schema_caching.rb +14 -1
  218. data/lib/sequel/extensions/schema_dumper.rb +83 -55
  219. data/lib/sequel/extensions/select_remove.rb +8 -4
  220. data/lib/sequel/extensions/sequel_4_dataset_methods.rb +85 -0
  221. data/lib/sequel/extensions/server_block.rb +50 -17
  222. data/lib/sequel/extensions/server_logging.rb +61 -0
  223. data/lib/sequel/extensions/split_array_nil.rb +8 -4
  224. data/lib/sequel/extensions/sql_comments.rb +96 -0
  225. data/lib/sequel/extensions/sql_expr.rb +4 -1
  226. data/lib/sequel/extensions/string_agg.rb +181 -0
  227. data/lib/sequel/extensions/string_date_time.rb +2 -0
  228. data/lib/sequel/extensions/symbol_aref.rb +53 -0
  229. data/lib/sequel/extensions/symbol_aref_refinement.rb +43 -0
  230. data/lib/sequel/extensions/symbol_as.rb +23 -0
  231. data/lib/sequel/extensions/symbol_as_refinement.rb +37 -0
  232. data/lib/sequel/extensions/synchronize_sql.rb +45 -0
  233. data/lib/sequel/extensions/thread_local_timezones.rb +4 -0
  234. data/lib/sequel/extensions/to_dot.rb +15 -5
  235. data/lib/sequel/extensions/virtual_row_method_block.rb +44 -0
  236. data/lib/sequel/model.rb +36 -126
  237. data/lib/sequel/model/associations.rb +850 -257
  238. data/lib/sequel/model/base.rb +652 -764
  239. data/lib/sequel/model/dataset_module.rb +13 -10
  240. data/lib/sequel/model/default_inflections.rb +3 -1
  241. data/lib/sequel/model/errors.rb +3 -3
  242. data/lib/sequel/model/exceptions.rb +12 -12
  243. data/lib/sequel/model/inflections.rb +8 -19
  244. data/lib/sequel/model/plugins.rb +111 -0
  245. data/lib/sequel/plugins/accessed_columns.rb +2 -0
  246. data/lib/sequel/plugins/active_model.rb +32 -7
  247. data/lib/sequel/plugins/after_initialize.rb +3 -1
  248. data/lib/sequel/plugins/association_dependencies.rb +27 -18
  249. data/lib/sequel/plugins/association_lazy_eager_option.rb +66 -0
  250. data/lib/sequel/plugins/association_multi_add_remove.rb +85 -0
  251. data/lib/sequel/plugins/association_pks.rb +181 -83
  252. data/lib/sequel/plugins/association_proxies.rb +33 -9
  253. data/lib/sequel/plugins/auto_validations.rb +58 -23
  254. data/lib/sequel/plugins/before_after_save.rb +8 -0
  255. data/lib/sequel/plugins/blacklist_security.rb +23 -12
  256. data/lib/sequel/plugins/boolean_readers.rb +9 -6
  257. data/lib/sequel/plugins/boolean_subsets.rb +64 -0
  258. data/lib/sequel/plugins/caching.rb +27 -16
  259. data/lib/sequel/plugins/class_table_inheritance.rb +192 -94
  260. data/lib/sequel/plugins/column_conflicts.rb +18 -3
  261. data/lib/sequel/plugins/column_select.rb +9 -5
  262. data/lib/sequel/plugins/columns_updated.rb +42 -0
  263. data/lib/sequel/plugins/composition.rb +36 -24
  264. data/lib/sequel/plugins/constraint_validations.rb +37 -16
  265. data/lib/sequel/plugins/csv_serializer.rb +58 -35
  266. data/lib/sequel/plugins/dataset_associations.rb +60 -18
  267. data/lib/sequel/plugins/def_dataset_method.rb +90 -0
  268. data/lib/sequel/plugins/defaults_setter.rb +74 -13
  269. data/lib/sequel/plugins/delay_add_association.rb +4 -1
  270. data/lib/sequel/plugins/dirty.rb +65 -24
  271. data/lib/sequel/plugins/eager_each.rb +27 -3
  272. data/lib/sequel/plugins/eager_graph_eager.rb +139 -0
  273. data/lib/sequel/plugins/empty_failure_backtraces.rb +38 -0
  274. data/lib/sequel/plugins/error_splitter.rb +19 -12
  275. data/lib/sequel/plugins/finder.rb +246 -0
  276. data/lib/sequel/plugins/forbid_lazy_load.rb +216 -0
  277. data/lib/sequel/plugins/force_encoding.rb +9 -12
  278. data/lib/sequel/plugins/hook_class_methods.rb +39 -54
  279. data/lib/sequel/plugins/input_transformer.rb +20 -10
  280. data/lib/sequel/plugins/insert_conflict.rb +72 -0
  281. data/lib/sequel/plugins/insert_returning_select.rb +4 -2
  282. data/lib/sequel/plugins/instance_filters.rb +12 -8
  283. data/lib/sequel/plugins/instance_hooks.rb +36 -17
  284. data/lib/sequel/plugins/instance_specific_default.rb +113 -0
  285. data/lib/sequel/plugins/inverted_subsets.rb +24 -13
  286. data/lib/sequel/plugins/json_serializer.rb +123 -47
  287. data/lib/sequel/plugins/lazy_attributes.rb +20 -14
  288. data/lib/sequel/plugins/list.rb +40 -26
  289. data/lib/sequel/plugins/many_through_many.rb +28 -12
  290. data/lib/sequel/plugins/modification_detection.rb +17 -5
  291. data/lib/sequel/plugins/mssql_optimistic_locking.rb +8 -5
  292. data/lib/sequel/plugins/nested_attributes.rb +55 -28
  293. data/lib/sequel/plugins/optimistic_locking.rb +5 -3
  294. data/lib/sequel/plugins/pg_array_associations.rb +52 -18
  295. data/lib/sequel/plugins/pg_auto_constraint_validations.rb +348 -0
  296. data/lib/sequel/plugins/pg_row.rb +7 -51
  297. data/lib/sequel/plugins/prepared_statements.rb +53 -72
  298. data/lib/sequel/plugins/prepared_statements_safe.rb +13 -5
  299. data/lib/sequel/plugins/rcte_tree.rb +43 -63
  300. data/lib/sequel/plugins/serialization.rb +37 -44
  301. data/lib/sequel/plugins/serialization_modification_detection.rb +3 -1
  302. data/lib/sequel/plugins/sharding.rb +17 -10
  303. data/lib/sequel/plugins/single_table_inheritance.rb +62 -28
  304. data/lib/sequel/plugins/singular_table_names.rb +2 -0
  305. data/lib/sequel/plugins/skip_create_refresh.rb +5 -3
  306. data/lib/sequel/plugins/skip_saving_columns.rb +108 -0
  307. data/lib/sequel/plugins/split_values.rb +13 -6
  308. data/lib/sequel/plugins/static_cache.rb +79 -53
  309. data/lib/sequel/plugins/static_cache_cache.rb +53 -0
  310. data/lib/sequel/plugins/string_stripper.rb +5 -3
  311. data/lib/sequel/plugins/subclasses.rb +20 -2
  312. data/lib/sequel/plugins/subset_conditions.rb +48 -0
  313. data/lib/sequel/plugins/table_select.rb +4 -2
  314. data/lib/sequel/plugins/tactical_eager_loading.rb +120 -6
  315. data/lib/sequel/plugins/throw_failures.rb +110 -0
  316. data/lib/sequel/plugins/timestamps.rb +22 -8
  317. data/lib/sequel/plugins/touch.rb +21 -8
  318. data/lib/sequel/plugins/tree.rb +57 -30
  319. data/lib/sequel/plugins/typecast_on_load.rb +14 -4
  320. data/lib/sequel/plugins/unlimited_update.rb +3 -7
  321. data/lib/sequel/plugins/update_or_create.rb +6 -4
  322. data/lib/sequel/plugins/update_primary_key.rb +3 -1
  323. data/lib/sequel/plugins/update_refresh.rb +28 -15
  324. data/lib/sequel/plugins/uuid.rb +70 -0
  325. data/lib/sequel/plugins/validate_associated.rb +20 -0
  326. data/lib/sequel/plugins/validation_class_methods.rb +40 -19
  327. data/lib/sequel/plugins/validation_contexts.rb +49 -0
  328. data/lib/sequel/plugins/validation_helpers.rb +49 -31
  329. data/lib/sequel/plugins/whitelist_security.rb +122 -0
  330. data/lib/sequel/plugins/xml_serializer.rb +31 -30
  331. data/lib/sequel/sql.rb +479 -329
  332. data/lib/sequel/timezones.rb +62 -32
  333. data/lib/sequel/version.rb +10 -3
  334. metadata +177 -477
  335. data/Rakefile +0 -165
  336. data/doc/active_record.rdoc +0 -912
  337. data/doc/release_notes/1.0.txt +0 -38
  338. data/doc/release_notes/1.1.txt +0 -143
  339. data/doc/release_notes/1.3.txt +0 -101
  340. data/doc/release_notes/1.4.0.txt +0 -53
  341. data/doc/release_notes/1.5.0.txt +0 -155
  342. data/doc/release_notes/2.0.0.txt +0 -298
  343. data/doc/release_notes/2.1.0.txt +0 -271
  344. data/doc/release_notes/2.10.0.txt +0 -328
  345. data/doc/release_notes/2.11.0.txt +0 -215
  346. data/doc/release_notes/2.12.0.txt +0 -534
  347. data/doc/release_notes/2.2.0.txt +0 -253
  348. data/doc/release_notes/2.3.0.txt +0 -88
  349. data/doc/release_notes/2.4.0.txt +0 -106
  350. data/doc/release_notes/2.5.0.txt +0 -137
  351. data/doc/release_notes/2.6.0.txt +0 -157
  352. data/doc/release_notes/2.7.0.txt +0 -166
  353. data/doc/release_notes/2.8.0.txt +0 -171
  354. data/doc/release_notes/2.9.0.txt +0 -97
  355. data/doc/release_notes/3.0.0.txt +0 -221
  356. data/doc/release_notes/3.1.0.txt +0 -406
  357. data/doc/release_notes/3.10.0.txt +0 -286
  358. data/doc/release_notes/3.11.0.txt +0 -254
  359. data/doc/release_notes/3.12.0.txt +0 -304
  360. data/doc/release_notes/3.13.0.txt +0 -210
  361. data/doc/release_notes/3.14.0.txt +0 -118
  362. data/doc/release_notes/3.15.0.txt +0 -78
  363. data/doc/release_notes/3.16.0.txt +0 -45
  364. data/doc/release_notes/3.17.0.txt +0 -58
  365. data/doc/release_notes/3.18.0.txt +0 -120
  366. data/doc/release_notes/3.19.0.txt +0 -67
  367. data/doc/release_notes/3.2.0.txt +0 -268
  368. data/doc/release_notes/3.20.0.txt +0 -41
  369. data/doc/release_notes/3.21.0.txt +0 -87
  370. data/doc/release_notes/3.22.0.txt +0 -39
  371. data/doc/release_notes/3.23.0.txt +0 -172
  372. data/doc/release_notes/3.24.0.txt +0 -420
  373. data/doc/release_notes/3.25.0.txt +0 -88
  374. data/doc/release_notes/3.26.0.txt +0 -88
  375. data/doc/release_notes/3.27.0.txt +0 -82
  376. data/doc/release_notes/3.28.0.txt +0 -304
  377. data/doc/release_notes/3.29.0.txt +0 -459
  378. data/doc/release_notes/3.3.0.txt +0 -192
  379. data/doc/release_notes/3.30.0.txt +0 -135
  380. data/doc/release_notes/3.31.0.txt +0 -146
  381. data/doc/release_notes/3.32.0.txt +0 -202
  382. data/doc/release_notes/3.33.0.txt +0 -157
  383. data/doc/release_notes/3.34.0.txt +0 -671
  384. data/doc/release_notes/3.35.0.txt +0 -144
  385. data/doc/release_notes/3.36.0.txt +0 -245
  386. data/doc/release_notes/3.37.0.txt +0 -338
  387. data/doc/release_notes/3.38.0.txt +0 -234
  388. data/doc/release_notes/3.39.0.txt +0 -237
  389. data/doc/release_notes/3.4.0.txt +0 -325
  390. data/doc/release_notes/3.40.0.txt +0 -73
  391. data/doc/release_notes/3.41.0.txt +0 -155
  392. data/doc/release_notes/3.42.0.txt +0 -74
  393. data/doc/release_notes/3.43.0.txt +0 -105
  394. data/doc/release_notes/3.44.0.txt +0 -152
  395. data/doc/release_notes/3.45.0.txt +0 -179
  396. data/doc/release_notes/3.46.0.txt +0 -122
  397. data/doc/release_notes/3.47.0.txt +0 -270
  398. data/doc/release_notes/3.48.0.txt +0 -477
  399. data/doc/release_notes/3.5.0.txt +0 -510
  400. data/doc/release_notes/3.6.0.txt +0 -366
  401. data/doc/release_notes/3.7.0.txt +0 -179
  402. data/doc/release_notes/3.8.0.txt +0 -151
  403. data/doc/release_notes/3.9.0.txt +0 -233
  404. data/doc/release_notes/4.0.0.txt +0 -262
  405. data/doc/release_notes/4.1.0.txt +0 -85
  406. data/doc/release_notes/4.10.0.txt +0 -226
  407. data/doc/release_notes/4.11.0.txt +0 -147
  408. data/doc/release_notes/4.12.0.txt +0 -105
  409. data/doc/release_notes/4.13.0.txt +0 -169
  410. data/doc/release_notes/4.14.0.txt +0 -68
  411. data/doc/release_notes/4.15.0.txt +0 -56
  412. data/doc/release_notes/4.16.0.txt +0 -36
  413. data/doc/release_notes/4.17.0.txt +0 -38
  414. data/doc/release_notes/4.18.0.txt +0 -36
  415. data/doc/release_notes/4.19.0.txt +0 -45
  416. data/doc/release_notes/4.2.0.txt +0 -129
  417. data/doc/release_notes/4.20.0.txt +0 -79
  418. data/doc/release_notes/4.21.0.txt +0 -94
  419. data/doc/release_notes/4.22.0.txt +0 -72
  420. data/doc/release_notes/4.23.0.txt +0 -65
  421. data/doc/release_notes/4.24.0.txt +0 -99
  422. data/doc/release_notes/4.25.0.txt +0 -181
  423. data/doc/release_notes/4.26.0.txt +0 -44
  424. data/doc/release_notes/4.3.0.txt +0 -40
  425. data/doc/release_notes/4.4.0.txt +0 -92
  426. data/doc/release_notes/4.5.0.txt +0 -34
  427. data/doc/release_notes/4.6.0.txt +0 -30
  428. data/doc/release_notes/4.7.0.txt +0 -103
  429. data/doc/release_notes/4.8.0.txt +0 -175
  430. data/doc/release_notes/4.9.0.txt +0 -190
  431. data/lib/sequel/adapters/cubrid.rb +0 -142
  432. data/lib/sequel/adapters/do.rb +0 -156
  433. data/lib/sequel/adapters/do/mysql.rb +0 -64
  434. data/lib/sequel/adapters/do/postgres.rb +0 -42
  435. data/lib/sequel/adapters/do/sqlite3.rb +0 -40
  436. data/lib/sequel/adapters/jdbc/as400.rb +0 -82
  437. data/lib/sequel/adapters/jdbc/cubrid.rb +0 -62
  438. data/lib/sequel/adapters/jdbc/firebirdsql.rb +0 -34
  439. data/lib/sequel/adapters/jdbc/informix-sqli.rb +0 -31
  440. data/lib/sequel/adapters/jdbc/jdbcprogress.rb +0 -31
  441. data/lib/sequel/adapters/odbc/progress.rb +0 -8
  442. data/lib/sequel/adapters/shared/cubrid.rb +0 -243
  443. data/lib/sequel/adapters/shared/firebird.rb +0 -245
  444. data/lib/sequel/adapters/shared/informix.rb +0 -52
  445. data/lib/sequel/adapters/shared/mysql_prepared_statements.rb +0 -150
  446. data/lib/sequel/adapters/shared/progress.rb +0 -38
  447. data/lib/sequel/adapters/swift.rb +0 -158
  448. data/lib/sequel/adapters/swift/mysql.rb +0 -47
  449. data/lib/sequel/adapters/swift/postgres.rb +0 -45
  450. data/lib/sequel/adapters/swift/sqlite.rb +0 -47
  451. data/lib/sequel/adapters/utils/pg_types.rb +0 -68
  452. data/lib/sequel/dataset/mutation.rb +0 -109
  453. data/lib/sequel/extensions/empty_array_ignore_nulls.rb +0 -3
  454. data/lib/sequel/extensions/filter_having.rb +0 -59
  455. data/lib/sequel/extensions/hash_aliases.rb +0 -45
  456. data/lib/sequel/extensions/meta_def.rb +0 -31
  457. data/lib/sequel/extensions/query_literals.rb +0 -80
  458. data/lib/sequel/extensions/ruby18_symbol_extensions.rb +0 -22
  459. data/lib/sequel/extensions/sequel_3_dataset_methods.rb +0 -118
  460. data/lib/sequel/extensions/set_overrides.rb +0 -72
  461. data/lib/sequel/no_core_ext.rb +0 -1
  462. data/lib/sequel/plugins/association_autoreloading.rb +0 -7
  463. data/lib/sequel/plugins/many_to_one_pk_lookup.rb +0 -7
  464. data/lib/sequel/plugins/pg_typecast_on_load.rb +0 -78
  465. data/lib/sequel/plugins/prepared_statements_associations.rb +0 -117
  466. data/lib/sequel/plugins/prepared_statements_with_pk.rb +0 -59
  467. data/lib/sequel/plugins/schema.rb +0 -80
  468. data/lib/sequel/plugins/scissors.rb +0 -33
  469. data/spec/adapters/db2_spec.rb +0 -160
  470. data/spec/adapters/firebird_spec.rb +0 -411
  471. data/spec/adapters/informix_spec.rb +0 -100
  472. data/spec/adapters/mssql_spec.rb +0 -706
  473. data/spec/adapters/mysql_spec.rb +0 -1287
  474. data/spec/adapters/oracle_spec.rb +0 -313
  475. data/spec/adapters/postgres_spec.rb +0 -3725
  476. data/spec/adapters/spec_helper.rb +0 -43
  477. data/spec/adapters/sqlanywhere_spec.rb +0 -170
  478. data/spec/adapters/sqlite_spec.rb +0 -653
  479. data/spec/bin_spec.rb +0 -254
  480. data/spec/core/connection_pool_spec.rb +0 -1016
  481. data/spec/core/database_spec.rb +0 -2531
  482. data/spec/core/dataset_spec.rb +0 -5098
  483. data/spec/core/deprecated_spec.rb +0 -70
  484. data/spec/core/expression_filters_spec.rb +0 -1243
  485. data/spec/core/mock_adapter_spec.rb +0 -462
  486. data/spec/core/object_graph_spec.rb +0 -303
  487. data/spec/core/placeholder_literalizer_spec.rb +0 -163
  488. data/spec/core/schema_generator_spec.rb +0 -179
  489. data/spec/core/schema_spec.rb +0 -1659
  490. data/spec/core/spec_helper.rb +0 -34
  491. data/spec/core/version_spec.rb +0 -7
  492. data/spec/core_extensions_spec.rb +0 -699
  493. data/spec/extensions/accessed_columns_spec.rb +0 -51
  494. data/spec/extensions/active_model_spec.rb +0 -123
  495. data/spec/extensions/after_initialize_spec.rb +0 -24
  496. data/spec/extensions/arbitrary_servers_spec.rb +0 -109
  497. data/spec/extensions/association_dependencies_spec.rb +0 -117
  498. data/spec/extensions/association_pks_spec.rb +0 -365
  499. data/spec/extensions/association_proxies_spec.rb +0 -86
  500. data/spec/extensions/auto_validations_spec.rb +0 -192
  501. data/spec/extensions/blacklist_security_spec.rb +0 -88
  502. data/spec/extensions/blank_spec.rb +0 -69
  503. data/spec/extensions/boolean_readers_spec.rb +0 -93
  504. data/spec/extensions/caching_spec.rb +0 -270
  505. data/spec/extensions/class_table_inheritance_spec.rb +0 -420
  506. data/spec/extensions/column_conflicts_spec.rb +0 -60
  507. data/spec/extensions/column_select_spec.rb +0 -108
  508. data/spec/extensions/columns_introspection_spec.rb +0 -91
  509. data/spec/extensions/composition_spec.rb +0 -242
  510. data/spec/extensions/connection_validator_spec.rb +0 -120
  511. data/spec/extensions/constraint_validations_plugin_spec.rb +0 -274
  512. data/spec/extensions/constraint_validations_spec.rb +0 -325
  513. data/spec/extensions/core_refinements_spec.rb +0 -519
  514. data/spec/extensions/csv_serializer_spec.rb +0 -173
  515. data/spec/extensions/current_datetime_timestamp_spec.rb +0 -27
  516. data/spec/extensions/dataset_associations_spec.rb +0 -311
  517. data/spec/extensions/dataset_source_alias_spec.rb +0 -51
  518. data/spec/extensions/date_arithmetic_spec.rb +0 -150
  519. data/spec/extensions/defaults_setter_spec.rb +0 -101
  520. data/spec/extensions/delay_add_association_spec.rb +0 -52
  521. data/spec/extensions/dirty_spec.rb +0 -180
  522. data/spec/extensions/eager_each_spec.rb +0 -42
  523. data/spec/extensions/empty_array_consider_nulls_spec.rb +0 -24
  524. data/spec/extensions/error_splitter_spec.rb +0 -18
  525. data/spec/extensions/error_sql_spec.rb +0 -20
  526. data/spec/extensions/eval_inspect_spec.rb +0 -73
  527. data/spec/extensions/filter_having_spec.rb +0 -40
  528. data/spec/extensions/force_encoding_spec.rb +0 -114
  529. data/spec/extensions/from_block_spec.rb +0 -21
  530. data/spec/extensions/graph_each_spec.rb +0 -109
  531. data/spec/extensions/hash_aliases_spec.rb +0 -24
  532. data/spec/extensions/hook_class_methods_spec.rb +0 -429
  533. data/spec/extensions/inflector_spec.rb +0 -183
  534. data/spec/extensions/input_transformer_spec.rb +0 -54
  535. data/spec/extensions/insert_returning_select_spec.rb +0 -46
  536. data/spec/extensions/instance_filters_spec.rb +0 -79
  537. data/spec/extensions/instance_hooks_spec.rb +0 -276
  538. data/spec/extensions/inverted_subsets_spec.rb +0 -33
  539. data/spec/extensions/json_serializer_spec.rb +0 -291
  540. data/spec/extensions/lazy_attributes_spec.rb +0 -170
  541. data/spec/extensions/list_spec.rb +0 -267
  542. data/spec/extensions/looser_typecasting_spec.rb +0 -43
  543. data/spec/extensions/many_through_many_spec.rb +0 -2172
  544. data/spec/extensions/meta_def_spec.rb +0 -21
  545. data/spec/extensions/migration_spec.rb +0 -712
  546. data/spec/extensions/modification_detection_spec.rb +0 -80
  547. data/spec/extensions/mssql_optimistic_locking_spec.rb +0 -91
  548. data/spec/extensions/named_timezones_spec.rb +0 -108
  549. data/spec/extensions/nested_attributes_spec.rb +0 -697
  550. data/spec/extensions/null_dataset_spec.rb +0 -85
  551. data/spec/extensions/optimistic_locking_spec.rb +0 -128
  552. data/spec/extensions/pagination_spec.rb +0 -118
  553. data/spec/extensions/pg_array_associations_spec.rb +0 -736
  554. data/spec/extensions/pg_array_ops_spec.rb +0 -143
  555. data/spec/extensions/pg_array_spec.rb +0 -395
  556. data/spec/extensions/pg_enum_spec.rb +0 -92
  557. data/spec/extensions/pg_hstore_ops_spec.rb +0 -236
  558. data/spec/extensions/pg_hstore_spec.rb +0 -206
  559. data/spec/extensions/pg_inet_ops_spec.rb +0 -101
  560. data/spec/extensions/pg_inet_spec.rb +0 -52
  561. data/spec/extensions/pg_interval_spec.rb +0 -76
  562. data/spec/extensions/pg_json_ops_spec.rb +0 -229
  563. data/spec/extensions/pg_json_spec.rb +0 -218
  564. data/spec/extensions/pg_loose_count_spec.rb +0 -17
  565. data/spec/extensions/pg_range_ops_spec.rb +0 -58
  566. data/spec/extensions/pg_range_spec.rb +0 -404
  567. data/spec/extensions/pg_row_ops_spec.rb +0 -60
  568. data/spec/extensions/pg_row_plugin_spec.rb +0 -62
  569. data/spec/extensions/pg_row_spec.rb +0 -360
  570. data/spec/extensions/pg_static_cache_updater_spec.rb +0 -92
  571. data/spec/extensions/pg_typecast_on_load_spec.rb +0 -63
  572. data/spec/extensions/prepared_statements_associations_spec.rb +0 -159
  573. data/spec/extensions/prepared_statements_safe_spec.rb +0 -61
  574. data/spec/extensions/prepared_statements_spec.rb +0 -103
  575. data/spec/extensions/prepared_statements_with_pk_spec.rb +0 -31
  576. data/spec/extensions/pretty_table_spec.rb +0 -92
  577. data/spec/extensions/query_literals_spec.rb +0 -183
  578. data/spec/extensions/query_spec.rb +0 -102
  579. data/spec/extensions/rcte_tree_spec.rb +0 -392
  580. data/spec/extensions/round_timestamps_spec.rb +0 -43
  581. data/spec/extensions/schema_caching_spec.rb +0 -41
  582. data/spec/extensions/schema_dumper_spec.rb +0 -789
  583. data/spec/extensions/schema_spec.rb +0 -117
  584. data/spec/extensions/scissors_spec.rb +0 -26
  585. data/spec/extensions/select_remove_spec.rb +0 -38
  586. data/spec/extensions/sequel_3_dataset_methods_spec.rb +0 -101
  587. data/spec/extensions/serialization_modification_detection_spec.rb +0 -98
  588. data/spec/extensions/serialization_spec.rb +0 -362
  589. data/spec/extensions/server_block_spec.rb +0 -90
  590. data/spec/extensions/set_overrides_spec.rb +0 -61
  591. data/spec/extensions/sharding_spec.rb +0 -198
  592. data/spec/extensions/shared_caching_spec.rb +0 -175
  593. data/spec/extensions/single_table_inheritance_spec.rb +0 -297
  594. data/spec/extensions/singular_table_names_spec.rb +0 -22
  595. data/spec/extensions/skip_create_refresh_spec.rb +0 -17
  596. data/spec/extensions/spec_helper.rb +0 -71
  597. data/spec/extensions/split_array_nil_spec.rb +0 -24
  598. data/spec/extensions/split_values_spec.rb +0 -22
  599. data/spec/extensions/sql_expr_spec.rb +0 -60
  600. data/spec/extensions/static_cache_spec.rb +0 -361
  601. data/spec/extensions/string_date_time_spec.rb +0 -95
  602. data/spec/extensions/string_stripper_spec.rb +0 -68
  603. data/spec/extensions/subclasses_spec.rb +0 -66
  604. data/spec/extensions/table_select_spec.rb +0 -71
  605. data/spec/extensions/tactical_eager_loading_spec.rb +0 -82
  606. data/spec/extensions/thread_local_timezones_spec.rb +0 -67
  607. data/spec/extensions/timestamps_spec.rb +0 -175
  608. data/spec/extensions/to_dot_spec.rb +0 -154
  609. data/spec/extensions/touch_spec.rb +0 -203
  610. data/spec/extensions/tree_spec.rb +0 -274
  611. data/spec/extensions/typecast_on_load_spec.rb +0 -80
  612. data/spec/extensions/unlimited_update_spec.rb +0 -20
  613. data/spec/extensions/update_or_create_spec.rb +0 -87
  614. data/spec/extensions/update_primary_key_spec.rb +0 -100
  615. data/spec/extensions/update_refresh_spec.rb +0 -53
  616. data/spec/extensions/validate_associated_spec.rb +0 -52
  617. data/spec/extensions/validation_class_methods_spec.rb +0 -1027
  618. data/spec/extensions/validation_helpers_spec.rb +0 -541
  619. data/spec/extensions/xml_serializer_spec.rb +0 -207
  620. data/spec/files/bad_down_migration/001_create_alt_basic.rb +0 -4
  621. data/spec/files/bad_down_migration/002_create_alt_advanced.rb +0 -4
  622. data/spec/files/bad_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  623. data/spec/files/bad_timestamped_migrations/1273253851_create_nodes.rb +0 -9
  624. data/spec/files/bad_timestamped_migrations/1273253853_3_create_users.rb +0 -3
  625. data/spec/files/bad_up_migration/001_create_alt_basic.rb +0 -4
  626. data/spec/files/bad_up_migration/002_create_alt_advanced.rb +0 -3
  627. data/spec/files/convert_to_timestamp_migrations/001_create_sessions.rb +0 -9
  628. data/spec/files/convert_to_timestamp_migrations/002_create_nodes.rb +0 -9
  629. data/spec/files/convert_to_timestamp_migrations/003_3_create_users.rb +0 -4
  630. data/spec/files/convert_to_timestamp_migrations/1273253850_create_artists.rb +0 -9
  631. data/spec/files/convert_to_timestamp_migrations/1273253852_create_albums.rb +0 -9
  632. data/spec/files/duplicate_integer_migrations/001_create_alt_advanced.rb +0 -4
  633. data/spec/files/duplicate_integer_migrations/001_create_alt_basic.rb +0 -4
  634. data/spec/files/duplicate_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  635. data/spec/files/duplicate_timestamped_migrations/1273253853_create_nodes.rb +0 -9
  636. data/spec/files/duplicate_timestamped_migrations/1273253853_create_users.rb +0 -4
  637. data/spec/files/integer_migrations/001_create_sessions.rb +0 -9
  638. data/spec/files/integer_migrations/002_create_nodes.rb +0 -9
  639. data/spec/files/integer_migrations/003_3_create_users.rb +0 -4
  640. data/spec/files/interleaved_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  641. data/spec/files/interleaved_timestamped_migrations/1273253850_create_artists.rb +0 -9
  642. data/spec/files/interleaved_timestamped_migrations/1273253851_create_nodes.rb +0 -9
  643. data/spec/files/interleaved_timestamped_migrations/1273253852_create_albums.rb +0 -9
  644. data/spec/files/interleaved_timestamped_migrations/1273253853_3_create_users.rb +0 -4
  645. data/spec/files/missing_integer_migrations/001_create_alt_basic.rb +0 -4
  646. data/spec/files/missing_integer_migrations/003_create_alt_advanced.rb +0 -4
  647. data/spec/files/missing_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  648. data/spec/files/missing_timestamped_migrations/1273253853_3_create_users.rb +0 -4
  649. data/spec/files/reversible_migrations/001_reversible.rb +0 -5
  650. data/spec/files/reversible_migrations/002_reversible.rb +0 -5
  651. data/spec/files/reversible_migrations/003_reversible.rb +0 -5
  652. data/spec/files/reversible_migrations/004_reversible.rb +0 -5
  653. data/spec/files/reversible_migrations/005_reversible.rb +0 -10
  654. data/spec/files/timestamped_migrations/1273253849_create_sessions.rb +0 -9
  655. data/spec/files/timestamped_migrations/1273253851_create_nodes.rb +0 -9
  656. data/spec/files/timestamped_migrations/1273253853_3_create_users.rb +0 -4
  657. data/spec/files/transaction_specified_migrations/001_create_alt_basic.rb +0 -4
  658. data/spec/files/transaction_specified_migrations/002_create_basic.rb +0 -4
  659. data/spec/files/transaction_unspecified_migrations/001_create_alt_basic.rb +0 -3
  660. data/spec/files/transaction_unspecified_migrations/002_create_basic.rb +0 -3
  661. data/spec/files/uppercase_timestamped_migrations/1273253849_CREATE_SESSIONS.RB +0 -9
  662. data/spec/files/uppercase_timestamped_migrations/1273253851_CREATE_NODES.RB +0 -9
  663. data/spec/files/uppercase_timestamped_migrations/1273253853_3_CREATE_USERS.RB +0 -4
  664. data/spec/guards_helper.rb +0 -55
  665. data/spec/integration/associations_test.rb +0 -2454
  666. data/spec/integration/database_test.rb +0 -113
  667. data/spec/integration/dataset_test.rb +0 -1808
  668. data/spec/integration/eager_loader_test.rb +0 -687
  669. data/spec/integration/migrator_test.rb +0 -240
  670. data/spec/integration/model_test.rb +0 -226
  671. data/spec/integration/plugin_test.rb +0 -2240
  672. data/spec/integration/prepared_statement_test.rb +0 -467
  673. data/spec/integration/schema_test.rb +0 -817
  674. data/spec/integration/spec_helper.rb +0 -48
  675. data/spec/integration/timezone_test.rb +0 -86
  676. data/spec/integration/transaction_test.rb +0 -374
  677. data/spec/integration/type_test.rb +0 -133
  678. data/spec/model/association_reflection_spec.rb +0 -525
  679. data/spec/model/associations_spec.rb +0 -4426
  680. data/spec/model/base_spec.rb +0 -759
  681. data/spec/model/class_dataset_methods_spec.rb +0 -146
  682. data/spec/model/dataset_methods_spec.rb +0 -149
  683. data/spec/model/eager_loading_spec.rb +0 -2137
  684. data/spec/model/hooks_spec.rb +0 -604
  685. data/spec/model/inflector_spec.rb +0 -26
  686. data/spec/model/model_spec.rb +0 -982
  687. data/spec/model/plugins_spec.rb +0 -299
  688. data/spec/model/record_spec.rb +0 -2147
  689. data/spec/model/spec_helper.rb +0 -46
  690. data/spec/model/validations_spec.rb +0 -193
  691. data/spec/sequel_coverage.rb +0 -15
  692. data/spec/spec_config.rb +0 -10
@@ -1,122 +0,0 @@
1
- = New Features
2
-
3
- * Dataset#first! has been added. This is identical to #first,
4
- except where #first would return nil due to no row matching,
5
- #first! raises a Sequel::NoMatchingRow exception. The main
6
- benefit here is that a standard exception class is now used,
7
- so external libraries can deal with these exceptions appropriately
8
- (such as web applications returning a 404 error).
9
-
10
- * Dataset#with_pk! has been added to model datasets. Similar to
11
- #first!, this raises a Sequel::NoMatchingRow exception instead of
12
- returning nil if there is no matching row.
13
-
14
- * A drop_foreign_key method has been added to the alter_table
15
- generator:
16
-
17
- alter_table(:tab){drop_foreign_key :col}
18
-
19
- This relies on foreign_key_list working and including the name
20
- of the foreign key. Previously, you'd have to drop the foreign key
21
- constraint before dropping the column in some cases.
22
-
23
- * Column constraints can now be named using :*_constraint_name
24
- options:
25
-
26
- create_table(:tab) do
27
- primary_key :id, :primary_key_constraint_name=>:pk_name
28
- foriegn_key :t_id, :t, :foreign_key_constraint_name=>:fk_name,
29
- :unique=>true, :unique_constraint_name=>:uk_name
30
- end
31
-
32
- This makes it easier to name constraints, which has always been
33
- recommended as it makes it easier to drop such constraints in the
34
- future.
35
-
36
- * On Microsoft SQL Server, Dataset#cross_apply and #outer_apply have
37
- been added to use CROSS/OUTER APPLY. These are useful if you
38
- want to join a table to the output of a function that takes the
39
- table as an argument.
40
-
41
- = Other Improvements
42
-
43
- * The connection pools are now faster when using the
44
- :connection_handling=>:queue option.
45
-
46
- * External connection pool classes can now be loaded automatically by
47
- the :pool_class option.
48
-
49
- * Database#each_server now raises if not given a block. Previously,
50
- it just leaked Database references.
51
-
52
- * On Microsoft SQL Server, ] characters are now escaped correctly in
53
- identifiers.
54
-
55
- * On PostgreSQL, infinite dates are also handled when using
56
- Database#convert_infinite_timestamps. Previously, infinite dates
57
- were incorrectly converted to 0000-01-01.
58
-
59
- * The associations, composition, serialization, and dirty plugins
60
- now clear caches stored in the instance in some additional cases,
61
- such as when saving model instances when the dataset supports
62
- insert_select.
63
-
64
- * Model#validates_type in the validation_helpers plugin now handles
65
- false values correctly.
66
-
67
- * The string_stripper plugin has been fixed to not change the result
68
- of Model.set_dataset.
69
-
70
- * You can now drop primary key constraints on H2, using:
71
-
72
- alter_table(:tab){drop_constraint :foo, :type=>:primary_key}
73
-
74
- * The jdbc/as400 adapter has been fixed, it was broken starting in
75
- Sequel 3.44.0.
76
-
77
- * A Security guide has been added explaining various security issues
78
- to think about when using Sequel.
79
-
80
- = Backwards Compatibility
81
-
82
- * The change to make associations, composition, serialization, and
83
- dirty now clear caches after saving when the dataset supports
84
- insert_select can break code that expected the previous behavior.
85
- For example:
86
-
87
- artist = Artist[1]
88
- artist.has_albums # => false
89
-
90
- album = Album.new(:artist=>artist)
91
- def album.after_create
92
- super
93
- artist.update(:has_albums=>true)
94
- end
95
- album.save
96
-
97
- artist.has_albums # => false
98
-
99
- Such code should either refresh the artist after saving the album,
100
- or use album.artist.has_albums. You already had to do that if
101
- the dataset did not support insert_select; the impetus for this
102
- change was to make the behavior consistent.
103
-
104
- * Decimal/numeric columns are now strictly typecast by default,
105
- similar to integer and real/double precision columns. If you want
106
- the previous loose typecasting to for decimal/numeric columns,
107
- use the looser_typecasting extension.
108
-
109
- * External adapters that called Database.set_adapter_scheme with a
110
- string should change to using a symbol.
111
-
112
- * Dataset#select_map, #select_order_map, and #get now raise an
113
- exception if they are passed a plain string inside an array.
114
- If you do want to use a plain string, you now need to alias it:
115
-
116
- dataset.get([Sequel.as('string', :some_alias)])
117
-
118
- = Sequel 4 Implementation Planning
119
-
120
- * Sequel 4 implementation planning has begun. If you want to view
121
- and/or provide feedback on the implementation plan, see
122
- https://github.com/jeremyevans/sequel-4-plans
@@ -1,270 +0,0 @@
1
- = New Plugins
2
-
3
- * An auto_validations plugin has been added, which automatically
4
- adds not null, type, and unique validations based on information
5
- obtained from parsing the database schema. If you don't
6
- require customization of the validation error message per
7
- column, this can significantly DRY up validation code. Currently
8
- this plugin requires the database support index parsing; that
9
- restriction will be removed in Sequel 4.
10
-
11
- * An input_transformer plugin has been added, for automatically
12
- running a transformation proc on all model column setter
13
- input before use. This is a generalization of the
14
- string_stripper plugin, allowing arbitrary modifications
15
- to the input.
16
-
17
- * An error_splitter plugin has been added, for splitting validation
18
- errors applying to multiple columns into a separate validation
19
- error per column. This is useful if you want to to include such
20
- errors when using Errors#on to get all errors on the column. In
21
- general, only uniqueness errors apply to multiple columns, so
22
- those are the only errors likely to be affected.
23
-
24
- = Other New Features
25
-
26
- * Database.extension has been added, allowing you to load an
27
- extension into all future databases. This is similar to loading a
28
- plugin into Sequel::Model itself. For example, if you want all
29
- Database instances to use the query_literals extension, run the
30
- following before creating your Database instances:
31
-
32
- Sequel::Database.extension :query_literals
33
-
34
- * Database.after_initialize has been added for running a hook
35
- on all new databases created.
36
-
37
- * Model.default_set_fields_options has been added, allowing you
38
- to set the default options for the #set_fields and #update_fields
39
- methods. This is useful if you want to make :missing=>:raise
40
- or :missing=>:skip the default behavior.
41
-
42
- * The :setter, :adder, :remover, and :clearer association options
43
- have been added. These allow you to override the default
44
- implementation used to modify the association. :setter affects
45
- the *_to_one setter method, :adder the *_to_many add_* method,
46
- :remover the *_to_many remove_* method, and :clearer the
47
- *_to_many remove_all_* method.
48
-
49
- Previously, you had to override a private method to get the same
50
- behavior, this just offers a nicer API for that.
51
-
52
- * A :keep_reference Database option has been added. When set to
53
- false, a reference to the Database instance is not kept in
54
- Sequel::DATABASES. This is designed for Database instances
55
- created by libraries, so they don't accidentally get chosen as
56
- the default Sequel::Model database.
57
-
58
- * Model#modified! now accepts a column and marks that column
59
- as changed. This is useful if you plan on mutating the column
60
- value as opposed to reassigning it.
61
-
62
- * Model#modified? now accepts a column and returns whether the
63
- column has been changed.
64
-
65
- * The migrators now support an :allow_missing_migration_files
66
- option, which makes them silently ignore errors related to
67
- missing migration files.
68
-
69
- * validates_schema_types has been added to validation_helpers,
70
- which validates that the column values are instances of the
71
- expected ruby type for the given database schema type. This
72
- is a more robust version of the validates_not_string
73
- extension, and users of validates_not_string are encouraged
74
- to switch soon, as validates_not_string is going away in
75
- Sequel 4.
76
-
77
- validates_schema_type has been added to validation_class_methods,
78
- which preforms the same validation, but it requires the columns
79
- be listed explicitly.
80
-
81
- validates_type in validation_helpers has been expanded to
82
- accept an array of allowable classes.
83
-
84
- Related to this is the addition of Database#schema_type_class for
85
- returning the type class(es) for the given schema type symbol.
86
-
87
- * validates_not_null has been added to the validation_helpers
88
- plugin. This is similar to the validates_presence validation,
89
- but only checks for nil values, allowing empty/blank strings.
90
-
91
- * In the caching plugin, when the :ignore_exceptions option is true,
92
- exceptions raised when deleting an object from the cache are now
93
- ignored correctly.
94
-
95
- * On PostgreSQL, Sequel now supports a :search_path Database
96
- option to automatically set the client connection search_path.
97
- This allows you to control which schemas do no require
98
- qualification, and in which order to check schemas when
99
- referencing unqualified objects. If you were using the
100
- default_schema setting, it is recommended that you switch
101
- to using :search_path instead.
102
-
103
- * The pg_array extension can now register array types on a
104
- per-Database basis via Database#register_array_type. Previously,
105
- only global registration of array types was allowed. Additionally,
106
- when registering array types on a per-Database basis, the oids can
107
- be looked up automatically, making it possible to register array
108
- types with just a type name:
109
-
110
- DB.register_array_type(:interval)
111
-
112
- * The pg_array extension now automatically creates conversion
113
- procs for array types of all named types used by the
114
- database. This means that if you use the pg_array and
115
- pg_hstore extensions, the hstore[] type is now handled
116
- correctly.
117
-
118
- * The postgres adapter now supports :use_iso_date_format and
119
- :convert_infinite_timestamps Database options. Previously,
120
- use_iso_date_format was only a global setting, and
121
- convert_infinite_timestamps could only be set after
122
- initialization.
123
-
124
- * Database#supports_schema_parsing? has been added to check
125
- if schema parsing via the Database#schema method is
126
- supported.
127
-
128
- = Other Improvements
129
-
130
- * A race condition related to prepared_sql for newly prepared
131
- statements has been fixed.
132
-
133
- * Dataset#get now works correctly if given an array with multiple
134
- columns if there were no returned rows.
135
-
136
- * The plugins that ship with Sequel now handle frozen model instances
137
- correctly.
138
-
139
- * Freezing of model instances now works correctly for models without
140
- primary keys.
141
-
142
- * Database constraints added with the constraint_validations
143
- plugin now handle NULL values correctly if the :allow_nil=>true
144
- setting is used.
145
-
146
- * The pagination, pretty_table, query, schema_caching,
147
- schema_dumper, and select_remove extensions can now be
148
- loaded by Database#extension. If you are loading them
149
- globally via Sequel.extension, switch to using
150
- Database#extension, since that will be required starting
151
- in Sequel 4.
152
-
153
- * The lazy_attributes plugin no longer uses the identity_map plugin
154
- internally, and eager loading lazy attributes now works correctly
155
- without an active identity map.
156
-
157
- * The many_to_one_pk_lookup plugin now handles many more corner
158
- cases, and should be safe to enable by default.
159
-
160
- * The static_cache plugin now has optimized implementations of
161
- Model.map, .to_hash, and .to_hash_groups which work without a
162
- database query. Model.count without arguments has also been
163
- optimized to not require a database query.
164
-
165
- * Fetching new records has been made faster when using the
166
- update_primary_key plugin, since it was changed to cache the primary
167
- key values lazily.
168
-
169
- * When using the update_primary_key plugin, if the primary key
170
- changes, clear the associations cache of all non-many_to_one
171
- associations (since those will likely be based on the primary
172
- key).
173
-
174
- * The pg_typecast_on_load plugin no longer errors if given a
175
- column that doesn't have a matching oid conversion proc.
176
-
177
- * Handling of domain types on PostgreSQL has been significantly
178
- improved. Domain type columns now have correct model
179
- typecasting, and the pg_row extension correctly sets up
180
- conversion procs for domain types inside composite types.
181
-
182
- * Postgres::HStoreOp#- now automatically casts string input to
183
- text, so that PostgreSQL doesn't assume the string is an
184
- hstore.
185
-
186
- * Postgres::PGRangeOp#starts_before and #ends_after have been
187
- renamed to #ends_before and #starts_after. The previous
188
- names were misleading. The old names are still available
189
- for backwards compatibility, but they will be removed in the
190
- Sequel 4.
191
-
192
- * The pg_row plugin now handles aliased tables correctly.
193
-
194
- * Model#validate in the validation_class_methods plugin no
195
- longer skips validate methods in superclasses or previously
196
- loaded plugins.
197
-
198
- * Loading the touch plugin into a model subclass after it has
199
- been loaded into a model superclass no longer ignores
200
- inherited touched associations.
201
-
202
- * Sequel no longer resets the conversion procs for the
203
- Database instance when using Databaset#extension to load a
204
- pg_* extension that adds global conversion procs. Instead,
205
- the global conversion procs are added to the instance-specific
206
- conversion procs. The result of this is that manually added
207
- conversion procs will not be lost if an extension is loaded
208
- afterward.
209
-
210
- * The jdbc adapter now references the driver class before loading
211
- subadapter specific code, which can fix issues if the database
212
- tries to connect on initialization (such as the jdbc/postgres
213
- adapter if the pg_hstore extension is loaded previously).
214
-
215
- * A guide describing Sequel's support for advanced PostgreSQL
216
- features has been added.
217
-
218
- = Backwards Compatibility
219
-
220
- * If you have already used the constraint_validations plugin to
221
- create validations with the :allow_nil=>true option, you should
222
- drop and regenerate those constraints to ensure they handle NULL
223
- values correctly.
224
-
225
- * The change to make PostgreSQL automatically handle domain
226
- types can break previous code that set up special conversions
227
- and typecasts per domain type. In the schema parsing, if you
228
- want to get the domain type information, it will be contained
229
- in the :db_domain_type and :domain_oid schema entries.
230
-
231
- * Sequel::Postgres.use_iso_date_format is now only defined if
232
- you are using the postgres adapter. Previously, it could
233
- be defined when using other adapters with a pg_* extension,
234
- even though the setting had no effect in that case.
235
-
236
- * The validation_class_methods plugin now copies validations into
237
- the subclass upon inheritance, instead of recursing into the
238
- superclass on validation. This makes it more similar to how
239
- all the other Sequel plugins work. However, it also means that
240
- if you add validations to a superclass after creating a
241
- subclass, the subclass won't have those validations. Additionally
242
- if you skip superclass validations in a child class after creating
243
- a grandchild class, the grandchild class could still have the
244
- parent class's validations.
245
-
246
- * The validates_unique validation in validation_helpers no longer
247
- attempts to do the uniqueness query if the underlying columns
248
- have validation errors. The reasoning behind this is that if the
249
- underlying columns are not valid, the uniqueness query can cause
250
- a DatabaseError.
251
-
252
- * If you were passing strings in hstore format to
253
- Postgres::HStoreOp#-, you should manually cast them to hstore:
254
-
255
- hstore_op - Sequel.cast('a=>b', :hstore)
256
-
257
- * The default validation error message for validates_type has been
258
- modified.
259
-
260
- * Database#schema_column_type was made public accidently by an
261
- adapter and a few extensions. That has been fixed, but if you
262
- were calling it with an explicit receiver and it happened to
263
- work by accident before, you'll need to update your code.
264
-
265
- = Sequel 4 Implementation Planning
266
-
267
- * Sequel 4 implementation work will begin shortly. All Sequel users
268
- are encouraged to read about the proposed changes and provide
269
- feedback on the implementation plan. For details, see
270
- https://github.com/jeremyevans/sequel-4-plans.
@@ -1,477 +0,0 @@
1
- = Deprecation Warnings
2
-
3
- The main change in Sequel 3.48.0 is the deprecation of Sequel
4
- features that will be modified, moved, or removed in Sequel 4.
5
- For the reasoning behind these changes, please review the
6
- commits logs at
7
- https://github.com/jeremyevans/sequel-4-plans/commits/master
8
-
9
- == Deprecation Logging
10
-
11
- If you use a deprecated method or feature, Sequel will by default
12
- print a deprecation message and 10 lines of backtrace to stderr
13
- to easily allow you to figure out which code needs to be
14
- updated. You can change where the deprecation messages go and how
15
- many lines of backtrace are given using the following:
16
-
17
- # Log deprecation information to a file
18
- Sequel::Deprecation.output = File.open('deprecated.txt', 'wb')
19
-
20
- # Turn off all deprecation logging
21
- Sequel::Deprecation.output = nil
22
-
23
- # Use 5 lines of backtrace when logging deprecation messages
24
- Sequel::Deprecation.backtrace_filter = 5
25
-
26
- # Use all backtrace lines when logging deprecation messages
27
- Sequel::Deprecation.backtrace_filter = true
28
-
29
- # Don't include backtraces in the deprecation logging
30
- Sequel::Deprecation.backtrace_filter = false
31
-
32
- # Select which backtrace lines to output
33
- Sequel::Deprecation.backtrace_filter = \
34
- lambda{|line, line_no| line_no < 3 || line =~ /my_app/}
35
-
36
- == Major Change
37
-
38
- * The core extensions will no longer be loaded by default. You will
39
- have to use `Sequel.extension :core_extensions` to load the core
40
- extensions.
41
-
42
- * The Symbol#[] and Symbol#{<,>,<=,>=} methods will no longer be
43
- provided by the core extensions on ruby 1.8. You will have to
44
- use `Sequel.extension :ruby18_symbol_extensions` to use them.
45
-
46
- == Core Behavior Changes
47
-
48
- * Dataset#filter becomes an alias for #where, and #exclude
49
- becomes an alias for #exclude_where. You will have to
50
- use `DB.extension :filter_having` to get the previous behavior.
51
- Dataset#and and #or will also only affect the WHERE clause.
52
-
53
- * Dataset#and, #or, and #invert will not raise errors for no existing
54
- filter.
55
-
56
- * Dataset#select_more becomes an alias for #select_append.
57
-
58
- * Dataset#select and #from will not longer consider a hash argument as
59
- an alias specification. You will have to use
60
- `DB.extension :hash_aliases` to get the previous behavior.
61
-
62
- * Database#dataset and Dataset.new will not take an options hash.
63
-
64
- * Database#transaction :disconnect=>:retry option will be removed.
65
-
66
- * Calling Dataset#add_graph_aliases before #graph or #set_graph_aliases
67
- will raise an Error.
68
-
69
- * Datasets will have a frozen options hash by default.
70
-
71
- * Dataset#set_overrides and #set_defaults will move to the
72
- set_overrides extension.
73
-
74
- * Sequel.empty_array_handle_nulls will be removed. To get the
75
- empty_array_handle_nulls = false behavior, you will have to
76
- use `DB.extension :empty_array_ignore_nulls`.
77
-
78
- * The second argument to Dataset #union, #intersect, and #except must
79
- be an options hash if it is given.
80
-
81
- * The fourth argument to Dataset #join_table must be an options
82
- hash if it is given.
83
-
84
- * Using a mismatched number of placeholders and arguments in a
85
- placeholder literal string will raise an error.
86
-
87
- * Dataset#graph_each will move to the graph_each extension.
88
-
89
- * Database#default_schema will be removed.
90
-
91
- * Dataset#[]= will be moved to the sequel_3_dataset_methods
92
- extension.
93
-
94
- * Dataset#insert_multiple will be moved to the
95
- sequel_3_dataset_methods extension.
96
-
97
- * Dataset#set will be moved to the sequel_3_dataset_methods
98
- extension.
99
-
100
- * Dataset#to_csv will be moved to the sequel_3_dataset_methods
101
- extension.
102
-
103
- * Dataset#db= and #opts= setters will be moved to the
104
- sequel_3_dataset_methods extension.
105
-
106
- * Dataset#qualify_to and #qualify_to_first_source will be moved to
107
- the sequel_3_dataset_methods extension.
108
-
109
- * Remove default methods that raise Sequel::NotImplemented:
110
- Database#connect, #execute, #foreign_key_list, #indexes, #tables,
111
- and #views, and Dataset#fetch_rows.
112
-
113
- * Sequel::SQL::Expression#to_s will be removed.
114
-
115
- * All Dataset methods in Dataset::PUBLIC_APPEND_METHODS except for
116
- #literal, #quote_identifier, and #quote_schema_table will be
117
- removed.
118
-
119
- * All Dataset methods in Dataset::PRIVATE_APPEND_METHODS will
120
- be removed.
121
-
122
- * Sequel k_require, ts_require, tsk_require, and
123
- check_requiring_thread will be removed.
124
-
125
- * Dataset.def_append_methods will be removed.
126
-
127
- * Dataset#table_ref_append will be removed.
128
-
129
- * Sequel.virtual_row_instance_eval accessor will be removed.
130
-
131
- * Database#reset_schema_utility_dataset will be removed.
132
-
133
- == Adapter Behavior Changes
134
-
135
- * The Database#do method will be removed from the ado, db2, dbi,
136
- informix, odbc, openbase, and oracle adapters.
137
-
138
- * The jdbc adapter will raise an error when parsing the schema
139
- for a table if it detects results for the same table name in
140
- multiple schemas.
141
-
142
- * The Database#query method will be removed from the informix
143
- adapter.
144
-
145
- * Dataset#lock on PostgreSQL will check the given lock mode.
146
-
147
- * Sequel will check the client_min_messages setting before
148
- use on PostgreSQL.
149
-
150
- * Prepared statement placeholders on PostgreSQL will no longer
151
- support implicit casting via :$x__type.
152
-
153
- == Extension Behavior Changes
154
-
155
- * The following extensions will no longer make global changes to
156
- the Database and Dataset classes: null_dataset, pagination,
157
- pretty_table, query, schema_caching, schema_dumper,
158
- select_remove, and to_dot. These will be changed to
159
- Database/Dataset specific extensions.
160
-
161
- * The pg_auto_parameterize and pg_statement_cache extensions will
162
- be removed.
163
-
164
- * Sequel::Dataset.introspect_all_columns will be removed from the
165
- columns_introspection extension.
166
-
167
- * PGRangeOp#starts_before and #ends_after will be removed from the
168
- pg_range_ops extension.
169
-
170
- == Model Behavior Changes
171
-
172
- * Model#initialize will accept only one argument.
173
-
174
- * The after_initialize hook will be moved to a plugin.
175
-
176
- * Move blacklist-based security methods (#set_except, #update_except,
177
- .set_restricted_columns) to a plugin.
178
-
179
- * The :eager_loader and :eager_grapher association option procs will
180
- always be passed a hash.
181
-
182
- * Model string column setters will consider array and hash input to
183
- be invalid.
184
-
185
- * Remove save taking multiple arguments for the columns to save.
186
- Add Model#save :columns option for saving specific columns.
187
-
188
- * Don't automatically choose a reciprocal association with a condition
189
- or block.
190
-
191
- * Don't automatically set up reciprocal associations if multiple ones
192
- match.
193
-
194
- * Model::Errors#[] will no longer modify the receiver. If you want
195
- autovivification, use the active_model plugin.
196
-
197
- * Model.set_primary_key will not longer accept composite keys as
198
- multiple arguments.
199
-
200
- * The correlated_subquery eager limit strategy will be removed.
201
-
202
- * The following Model class dataset methods will be removed: print,
203
- each_page, paginate, set, add_graph_aliases, insert_multiple, query,
204
- set_overrides, set_defaults, to_csv.
205
-
206
- * The Model.{destroy,delete,update} class dataset methods will be
207
- moved to the scissors plugin.
208
-
209
- * Model#pk_or_nil will be removed.
210
-
211
- * Model#set_values will no longer be called directly by any Sequel
212
- code, and overriding it is deprecated. It will be removed in Sequel
213
- 4.1.
214
-
215
- * Model.cache_anonymous_models accessor will move to Sequel module.
216
-
217
- * Model::InstanceMethods.class_attr_overridable and
218
- .class_attr_reader will be removed.
219
-
220
- * The :one_to_one option check for one_to_many associations will
221
- be removed.
222
-
223
- == Plugin Behavior Changes
224
-
225
- * Public dataset methods will no longer have class methods
226
- automatically added.
227
-
228
- * The validates_not_string validation will be removed from the
229
- validation_class_methods and validation_helpers plugin.
230
-
231
- * In the json_serializer plugin, the to_json :root=>true option
232
- means :root=>:collection instead of :root=>:both.
233
-
234
- * In the json_serializer plugin, the to_json :naked option will
235
- default to true, and there will not be way to add the JSON.create_id
236
- automatically.
237
-
238
- * In the json_serializer plugin, from_json will no longer automatically
239
- delete the JSON.create_id key from the input hash.
240
-
241
- * The #to_json and #to_xml :all_columns and :all_associations options
242
- in the json_serializer and xml_serializer plugins will be removed.
243
-
244
- * The Model.json_create method will be removed from the
245
- json_serializer plugin.
246
-
247
- * The validates_type validation will raise validation errors for nil
248
- if :allow_nil=>true is not used.
249
-
250
- * auto_validate_presence_columns will be removed from the
251
- auto_validations plugin
252
-
253
- * The identity_map plugin will be removed.
254
-
255
- == Internal Changes
256
-
257
- * The sequel_core.rb and sequel_model.rb files will be removed.
258
-
259
- * Dataset#{quote_identifiers,identifier_output_method,
260
- identifier_input_method} will assume Database implements the
261
- methods.
262
-
263
- = Forwards Compatibility
264
-
265
- Not all changes planned in Sequel 4 have deprecation warnings.
266
- The following changes will be made in Sequel 4 but do not have
267
- deprecation warnings in 3.48.0:
268
-
269
- * The threaded connection pools will default to
270
- :connection_handling=>:queue. You can manually set
271
- :connection_handling=>:stack to get the current behavior.
272
-
273
- * Dataset#join_table will default to :qualify=>:deep. You can
274
- manually set :qualify=>:symbol to get the current behavior. This
275
- can be set at a global level by overriding
276
- Dataset#default_join_table_qualification.
277
-
278
- * Model.raise_on_typecast_failure will default to false. Set this to
279
- true to get the current behavior of raising typecast errors in the
280
- setter methods.
281
-
282
- * Model#save will no longer call Model#_refresh or Model#set_values
283
- internally after an insert. Manually refreshes will be treated
284
- differently than after creation refreshes in Sequel 4.
285
-
286
- * On SQLite, integer_booleans will be true by default. Set this to
287
- false to get the current behavior of 't' for true and 'f' for false.
288
-
289
- * On SQLite, use_timestamp_timezones will be false by default. Set
290
- this to true to get the current behavior with timezone information
291
- in timestamps.
292
-
293
- * The default value for most option hash arguments will be an empty
294
- frozen hash. If you are overriding methods and modifying option
295
- hashes, fix your code.
296
-
297
- * The defaults_setter plugin will work in a lazy manner instead of
298
- an eager manner. If you must have the values hash contain defaults
299
- for new objects (instead of just getting defaults from getter
300
- methods), you'll need to fork the current plugin.
301
-
302
- * Model#set_all will allow setting the primary key columns.
303
-
304
- * The many_to_one_pk_lookup plugin will be integrated into the
305
- default associations support.
306
-
307
- * The association_autoreloading plugin will be integrated into the
308
- default associations support.
309
-
310
- * Plugins will extend the class with ClassMethods before including
311
- InstanceMethods in the class.
312
-
313
- * Dataset#get, #select_map, and #select_order_map will automatically
314
- add aliases for unaliased expressions if given a single expression.
315
-
316
- * Database#tables and #views on PostgreSQL will check against
317
- the current schemas in the search path.
318
-
319
- * Sequel::SQL::SQLArray alias for ValueList will be removed.
320
-
321
- * Sequel::SQL::NoBooleanInputMethods will be removed.
322
-
323
- * Sequel::NotImplemented will be removed.
324
-
325
- * Sequel::Model::EMPTY_INSTANCE_VARIABLES will be removed.
326
-
327
- * Sequel will no longer provide a default database for the adapter or
328
- integration specs.
329
-
330
- = New Features
331
-
332
- * You can now choose which Errors class to use on a per model basis
333
- by overriding Model#errors_class.
334
-
335
- * The following Database methods have been added to check for support:
336
- supports_index_parsing?, supports_foreign_key_parsing?,
337
- support_table_listing?, supports_view_listing?.
338
-
339
- * The pg_hstore_ops extension now integrates with the pg_array,
340
- pg_hstore, and pg_array_ops extensions, allowing you to pass in
341
- arrays and hashes to be treated as PGArrays and HStores, and
342
- returning ArrayOps for PostgreSQL functions/operators that
343
- return arrays.
344
-
345
- * Sequel.object_to_json and Sequel.json_parser_error_class
346
- have been added and all internal json usage uses them, so you
347
- can now override these methods if you want to use an alternative
348
- json library with Sequel.
349
-
350
- * The association_proxies plugin now accepts a block allowing the
351
- user control over which methods are proxied to the dataset or
352
- the cached array of instances. You can base the decision on
353
- where to send the method using a variety of factors including
354
- the method name, the method arguments, the state of the current
355
- instance, or the related association. Here's an example of a
356
- simple case just depending on the name of the method;
357
-
358
- Model.plugin :association_proxies do |opts|
359
- [:find, :where, :create].include?(opts[:method])
360
- end
361
-
362
- If the block returns true, the method is sent to the dataset,
363
- otherwise it is sent to the array of associated objects.
364
-
365
- * The auto_validations plugin now accepts a :not_null=>:presence
366
- option, for doing a presence validation instead of a not_null
367
- validation. This is useful for databases with NOT NULL
368
- constraints where you also want to disallow empty strings.
369
-
370
- * The auto_validations plugin now validates against explicit nil
371
- values in NOT NULL columns that have defaults.
372
-
373
- * The constraint_validations plugin now reflects validations, using
374
- Model.constraint_validation_reflections.
375
-
376
- Model.constraint_validation_reflections[:column]
377
- # => [[:presence, {}],
378
- # [:max_length, {:argument=>255, :message=>'just too long'}]]
379
-
380
- * The constraint_validations plugin can now be set to pass specific
381
- validations options to the validation_helpers plugin. This can be
382
- useful if using the auto_validations plugin with this plugin to
383
- avoid duplicate error messages for nil values:
384
-
385
- Model.plugin :constraint_validations,
386
- :validates_options=>{:presence=>{:allow_nil=>true}}
387
-
388
- * The named_timezones extension can now be loaded as a database
389
- extension, which allows for automatic conversions of string
390
- timezones:
391
-
392
- DB.extension :named_timezones
393
- DB.timezone = 'America/Los_Angeles'
394
-
395
- * Offsets are now emulated by Microsoft Access using a combination
396
- of reverse orders and total counts. This is slow, especially on
397
- large datasets, but probably better than having no support at all.
398
- It is also possible to use the same code to support Microsoft
399
- SQL Server 2000, but as Sequel does not support that (minimum
400
- supported version is 2005), you have to do it manually:
401
-
402
- Sequel.require 'adapters/utils/emulate_offset_with_reverse_and_count'
403
- DB.extend_datasets Sequel::EmulateOffsetWithReverseAndCount
404
-
405
- = Other Improvements
406
-
407
- * Dataset#clone is now faster.
408
-
409
- * Database methods that create datasets (fetch, from, select, get)
410
- are now faster.
411
-
412
- * Model.with_pk and .with_pk! are now faster.
413
-
414
- * Dataset#or now just clones if given an empty argument, similar
415
- to Dataset#where.
416
-
417
- * Sequel now correctly frees statements after using them in the
418
- ibmdb adapter. Previously, they weren't freed until GC, which
419
- could result in errors if all available handles are in use.
420
-
421
- * Dataset creation is now faster on Microsoft SQL Server.
422
-
423
- * The mediumint and mediumtext types are now recognized on MySQL.
424
-
425
- * The ado adapter now handles disconnecting an already disconnected
426
- connection.
427
-
428
- * The auto_validations plugin now works on databases that don't
429
- support index parsing. However, it will not set up automatic
430
- uniqueness validations on such databases.
431
-
432
- * The validation_helpers is more strict in some cases when checking
433
- for nil values, using a specific nil check instead of general
434
- falsely check.
435
-
436
- * The table inheritance plugins now correctly handle usage of
437
- set_dataset in a subclass.
438
-
439
- * The bin/sequel command line tool now has specs.
440
-
441
- = Backwards Compatibility
442
-
443
- * Sequel now uses aliases for many internal Dataset#get calls, such
444
- as those used by table_exists? and max.
445
-
446
- * Sequel now no longer uses class variables internally. Instead,
447
- instance variables of the Sequel::Database class are used.
448
-
449
- * Sequel now sets up the identifier mangling methods on Database
450
- initialization instead of on first use.
451
-
452
- * The private Database#adapter_initialize method has been added for
453
- per adapter configuration. All internal adapters have been switched
454
- to use this method instead of overridding initialize, and all
455
- external adapters should as well. This makes sure that Database
456
- instances are not added to Sequel::DATABASES until they have been
457
- completely initialized.
458
-
459
- * Virtual row blocks no longer convert their return values to an array.
460
- Among other things, this means that having a virtual row block return
461
- a hash works as expected.
462
-
463
- * The private Dataset#hash_key_symbol method now only takes a single
464
- argument.
465
-
466
- * Database#constraint_validations in the constraint_validations plugin
467
- now returns raw hash rows, instead of arrays of validation method
468
- call arguments.
469
-
470
- * Dataset#count now uses a lowercase count function in the SQL.
471
-
472
- * Passing a non-String or Hash as the first argument to an adapter
473
- method (e.g. Sequel.postgres(1)) now raises an error. Before, this used
474
- to work on some adapters that implicitly converted the database
475
- name to a string.
476
-
477
- * The stats and dcov rake tasks were removed.