sequel 0.4.4.2 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +971 -953
- data/Rakefile +58 -44
- data/lib/sequel/database.rb +60 -2
- data/lib/sequel/dataset.rb +1 -0
- data/lib/sequel/dataset/sql.rb +7 -2
- data/lib/sequel/model.rb +22 -14
- data/lib/sequel/model/base.rb +1 -0
- data/lib/sequel/model/record.rb +2 -0
- data/lib/sequel/model/schema.rb +1 -1
- data/lib/sequel/model/validations.rb +117 -0
- data/lib/sequel/schema/schema_generator.rb +8 -0
- data/lib/sequel/schema/schema_sql.rb +2 -0
- data/spec/database_spec.rb +15 -0
- data/spec/dataset_spec.rb +9 -0
- data/spec/model/base_spec.rb +148 -0
- data/spec/model/caching_spec.rb +148 -0
- data/spec/model/hooks_spec.rb +105 -0
- data/spec/model/plugins_spec.rb +59 -0
- data/spec/model/record_spec.rb +360 -0
- data/spec/model/relations_spec.rb +148 -0
- data/spec/model/schema_spec.rb +80 -0
- data/spec/model/validations_spec.rb +292 -0
- data/spec/model_spec.rb +331 -1102
- data/spec/rcov.opts +4 -0
- data/spec/spec.opts +1 -4
- data/spec/spec_helper.rb +3 -2
- metadata +15 -4
data/CHANGELOG
CHANGED
@@ -1,953 +1,971 @@
|
|
1
|
-
=== 0.4.
|
2
|
-
|
3
|
-
*
|
4
|
-
|
5
|
-
* Fixed
|
6
|
-
|
7
|
-
*
|
8
|
-
|
9
|
-
*
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
*
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
*
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
*
|
22
|
-
|
23
|
-
*
|
24
|
-
|
25
|
-
*
|
26
|
-
|
27
|
-
*
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
*
|
36
|
-
|
37
|
-
*
|
38
|
-
|
39
|
-
* Added
|
40
|
-
|
41
|
-
* Added
|
42
|
-
|
43
|
-
* Added Database#
|
44
|
-
|
45
|
-
* Added
|
46
|
-
|
47
|
-
*
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
*
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
*
|
56
|
-
|
57
|
-
*
|
58
|
-
|
59
|
-
* Added
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
*
|
64
|
-
|
65
|
-
*
|
66
|
-
|
67
|
-
*
|
68
|
-
|
69
|
-
* Added
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
*
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
*
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
*
|
82
|
-
|
83
|
-
*
|
84
|
-
|
85
|
-
*
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
*
|
90
|
-
|
91
|
-
* Added
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
*
|
98
|
-
|
99
|
-
*
|
100
|
-
|
101
|
-
*
|
102
|
-
|
103
|
-
*
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
*
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
*
|
118
|
-
|
119
|
-
*
|
120
|
-
|
121
|
-
* Fixed
|
122
|
-
|
123
|
-
*
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
*
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
*
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
*
|
136
|
-
|
137
|
-
*
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
*
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
*
|
146
|
-
|
147
|
-
*
|
148
|
-
|
149
|
-
* Fixed
|
150
|
-
|
151
|
-
*
|
152
|
-
|
153
|
-
* Fixed
|
154
|
-
|
155
|
-
*
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
*
|
164
|
-
|
165
|
-
*
|
166
|
-
|
167
|
-
* Fixed
|
168
|
-
|
169
|
-
*
|
170
|
-
|
171
|
-
*
|
172
|
-
|
173
|
-
*
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
*
|
180
|
-
|
181
|
-
*
|
182
|
-
|
183
|
-
* Added
|
184
|
-
|
185
|
-
*
|
186
|
-
|
187
|
-
*
|
188
|
-
|
189
|
-
*
|
190
|
-
|
191
|
-
*
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
*
|
196
|
-
|
197
|
-
*
|
198
|
-
|
199
|
-
*
|
200
|
-
|
201
|
-
*
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
*
|
206
|
-
|
207
|
-
*
|
208
|
-
|
209
|
-
*
|
210
|
-
|
211
|
-
*
|
212
|
-
|
213
|
-
*
|
214
|
-
|
215
|
-
*
|
216
|
-
|
217
|
-
*
|
218
|
-
|
219
|
-
*
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
*
|
224
|
-
|
225
|
-
*
|
226
|
-
|
227
|
-
*
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
*
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
*
|
236
|
-
|
237
|
-
*
|
238
|
-
|
239
|
-
*
|
240
|
-
|
241
|
-
*
|
242
|
-
|
243
|
-
*
|
244
|
-
|
245
|
-
*
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
*
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
*
|
254
|
-
|
255
|
-
*
|
256
|
-
|
257
|
-
*
|
258
|
-
|
259
|
-
*
|
260
|
-
|
261
|
-
* Implemented Database#
|
262
|
-
|
263
|
-
* Fixed bug in
|
264
|
-
|
265
|
-
*
|
266
|
-
|
267
|
-
*
|
268
|
-
|
269
|
-
*
|
270
|
-
|
271
|
-
*
|
272
|
-
|
273
|
-
*
|
274
|
-
|
275
|
-
*
|
276
|
-
|
277
|
-
* Fixed
|
278
|
-
|
279
|
-
*
|
280
|
-
|
281
|
-
*
|
282
|
-
|
283
|
-
*
|
284
|
-
|
285
|
-
*
|
286
|
-
|
287
|
-
*
|
288
|
-
|
289
|
-
*
|
290
|
-
|
291
|
-
* Added Dataset#
|
292
|
-
|
293
|
-
*
|
294
|
-
|
295
|
-
*
|
296
|
-
|
297
|
-
*
|
298
|
-
|
299
|
-
*
|
300
|
-
|
301
|
-
*
|
302
|
-
|
303
|
-
*
|
304
|
-
|
305
|
-
*
|
306
|
-
|
307
|
-
*
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
*
|
312
|
-
|
313
|
-
*
|
314
|
-
|
315
|
-
* Fixed
|
316
|
-
|
317
|
-
* Fixed
|
318
|
-
|
319
|
-
*
|
320
|
-
|
321
|
-
*
|
322
|
-
|
323
|
-
*
|
324
|
-
|
325
|
-
*
|
326
|
-
|
327
|
-
=== 0.2.1 (2007-
|
328
|
-
|
329
|
-
* Added
|
330
|
-
|
331
|
-
*
|
332
|
-
|
333
|
-
*
|
334
|
-
|
335
|
-
*
|
336
|
-
|
337
|
-
*
|
338
|
-
|
339
|
-
*
|
340
|
-
|
341
|
-
*
|
342
|
-
|
343
|
-
*
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
*
|
348
|
-
|
349
|
-
*
|
350
|
-
|
351
|
-
*
|
352
|
-
|
353
|
-
* Implemented Dataset#
|
354
|
-
|
355
|
-
* Added
|
356
|
-
|
357
|
-
* Added
|
358
|
-
|
359
|
-
*
|
360
|
-
|
361
|
-
*
|
362
|
-
|
363
|
-
*
|
364
|
-
|
365
|
-
*
|
366
|
-
|
367
|
-
*
|
368
|
-
|
369
|
-
*
|
370
|
-
|
371
|
-
*
|
372
|
-
|
373
|
-
*
|
374
|
-
|
375
|
-
* Added
|
376
|
-
|
377
|
-
*
|
378
|
-
|
379
|
-
*
|
380
|
-
|
381
|
-
* Fixed
|
382
|
-
|
383
|
-
* Added
|
384
|
-
|
385
|
-
*
|
386
|
-
|
387
|
-
*
|
388
|
-
|
389
|
-
*
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
*
|
394
|
-
|
395
|
-
*
|
396
|
-
|
397
|
-
* Changed
|
398
|
-
|
399
|
-
*
|
400
|
-
|
401
|
-
*
|
402
|
-
|
403
|
-
*
|
404
|
-
|
405
|
-
* Fixed
|
406
|
-
|
407
|
-
*
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
*
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
*
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
* Fixed
|
420
|
-
|
421
|
-
*
|
422
|
-
|
423
|
-
*
|
424
|
-
|
425
|
-
*
|
426
|
-
|
427
|
-
*
|
428
|
-
|
429
|
-
* Fixed
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
*
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
*
|
438
|
-
|
439
|
-
*
|
440
|
-
|
441
|
-
*
|
442
|
-
|
443
|
-
*
|
444
|
-
|
445
|
-
*
|
446
|
-
|
447
|
-
*
|
448
|
-
|
449
|
-
*
|
450
|
-
|
451
|
-
*
|
452
|
-
|
453
|
-
*
|
454
|
-
|
455
|
-
*
|
456
|
-
|
457
|
-
*
|
458
|
-
|
459
|
-
* Fixed
|
460
|
-
|
461
|
-
*
|
462
|
-
|
463
|
-
*
|
464
|
-
|
465
|
-
*
|
466
|
-
|
467
|
-
* Added support for
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
* Added
|
472
|
-
|
473
|
-
* Added
|
474
|
-
|
475
|
-
*
|
476
|
-
|
477
|
-
*
|
478
|
-
|
479
|
-
*
|
480
|
-
|
481
|
-
*
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
*
|
486
|
-
|
487
|
-
=== 0.1.9.
|
488
|
-
|
489
|
-
*
|
490
|
-
|
491
|
-
*
|
492
|
-
|
493
|
-
*
|
494
|
-
|
495
|
-
*
|
496
|
-
|
497
|
-
*
|
498
|
-
|
499
|
-
*
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
*
|
504
|
-
|
505
|
-
=== 0.1.9.
|
506
|
-
|
507
|
-
*
|
508
|
-
|
509
|
-
*
|
510
|
-
|
511
|
-
*
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
*
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
*
|
520
|
-
|
521
|
-
*
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
*
|
526
|
-
|
527
|
-
*
|
528
|
-
|
529
|
-
*
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
* Added
|
538
|
-
|
539
|
-
* Changed
|
540
|
-
|
541
|
-
*
|
542
|
-
|
543
|
-
*
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
*
|
548
|
-
|
549
|
-
*
|
550
|
-
|
551
|
-
=== 0.1.9.
|
552
|
-
|
553
|
-
*
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
*
|
558
|
-
|
559
|
-
*
|
560
|
-
|
561
|
-
*
|
562
|
-
|
563
|
-
=== 0.1.9.
|
564
|
-
|
565
|
-
*
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
* Added Sequel.
|
572
|
-
|
573
|
-
=== 0.1.9 (2007-
|
574
|
-
|
575
|
-
*
|
576
|
-
|
577
|
-
*
|
578
|
-
|
579
|
-
*
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
*
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
*
|
588
|
-
|
589
|
-
*
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
* Fixed
|
594
|
-
|
595
|
-
*
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
*
|
600
|
-
|
601
|
-
*
|
602
|
-
|
603
|
-
*
|
604
|
-
|
605
|
-
*
|
606
|
-
|
607
|
-
*
|
608
|
-
|
609
|
-
*
|
610
|
-
|
611
|
-
*
|
612
|
-
|
613
|
-
* Added
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
*
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
*
|
622
|
-
|
623
|
-
*
|
624
|
-
|
625
|
-
*
|
626
|
-
|
627
|
-
*
|
628
|
-
|
629
|
-
*
|
630
|
-
|
631
|
-
* Added
|
632
|
-
|
633
|
-
* Added
|
634
|
-
|
635
|
-
* Fixed Dataset#
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
*
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
*
|
644
|
-
|
645
|
-
* Fixed
|
646
|
-
|
647
|
-
*
|
648
|
-
|
649
|
-
*
|
650
|
-
|
651
|
-
*
|
652
|
-
|
653
|
-
*
|
654
|
-
|
655
|
-
*
|
656
|
-
|
657
|
-
*
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
*
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
* Fixed
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
*
|
670
|
-
|
671
|
-
*
|
672
|
-
|
673
|
-
*
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
*
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
*
|
703
|
-
|
704
|
-
*
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
*
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
*
|
713
|
-
|
714
|
-
*
|
715
|
-
|
716
|
-
*
|
717
|
-
|
718
|
-
*
|
719
|
-
|
720
|
-
*
|
721
|
-
|
722
|
-
*
|
723
|
-
|
724
|
-
*
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
*
|
731
|
-
|
732
|
-
*
|
733
|
-
|
734
|
-
*
|
735
|
-
|
736
|
-
*
|
737
|
-
|
738
|
-
*
|
739
|
-
|
740
|
-
*
|
741
|
-
|
742
|
-
*
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
*
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
*
|
751
|
-
|
752
|
-
*
|
753
|
-
|
754
|
-
*
|
755
|
-
|
756
|
-
*
|
757
|
-
|
758
|
-
*
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
*
|
763
|
-
|
764
|
-
*
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
*
|
769
|
-
|
770
|
-
*
|
771
|
-
|
772
|
-
*
|
773
|
-
|
774
|
-
*
|
775
|
-
|
776
|
-
* Specs for
|
777
|
-
|
778
|
-
=== 0.0.
|
779
|
-
|
780
|
-
*
|
781
|
-
|
782
|
-
*
|
783
|
-
|
784
|
-
*
|
785
|
-
|
786
|
-
*
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
*
|
791
|
-
|
792
|
-
*
|
793
|
-
|
794
|
-
*
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
*
|
799
|
-
|
800
|
-
*
|
801
|
-
|
802
|
-
*
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
*
|
809
|
-
|
810
|
-
*
|
811
|
-
|
812
|
-
* Added
|
813
|
-
|
814
|
-
*
|
815
|
-
|
816
|
-
*
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
*
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
*
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
*
|
829
|
-
|
830
|
-
*
|
831
|
-
|
832
|
-
*
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
*
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
* Model#
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
*
|
847
|
-
|
848
|
-
*
|
849
|
-
|
850
|
-
* Fixed
|
851
|
-
|
852
|
-
=== 0.0.
|
853
|
-
|
854
|
-
*
|
855
|
-
|
856
|
-
*
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
* Added
|
863
|
-
|
864
|
-
* Added Dataset#
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
* Fixed
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
*
|
873
|
-
|
874
|
-
*
|
875
|
-
|
876
|
-
*
|
877
|
-
|
878
|
-
=== 0.0.
|
879
|
-
|
880
|
-
*
|
881
|
-
|
882
|
-
*
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
*
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
*
|
893
|
-
|
894
|
-
*
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
*
|
899
|
-
|
900
|
-
*
|
901
|
-
|
902
|
-
*
|
903
|
-
|
904
|
-
=== 0.0.
|
905
|
-
|
906
|
-
*
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
* Added
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
*
|
915
|
-
|
916
|
-
*
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
*
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
* Added
|
925
|
-
|
926
|
-
*
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
*
|
933
|
-
|
934
|
-
*
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
1
|
+
=== 0.4.5 (2007-12-25)
|
2
|
+
|
3
|
+
* Added rdoc for new alter_table functionality (#109).
|
4
|
+
|
5
|
+
* Fixed update_sql with array sub-item keys (#110).
|
6
|
+
|
7
|
+
* Refactored model specs.
|
8
|
+
|
9
|
+
* Added Model#update as alias to #set.
|
10
|
+
|
11
|
+
* Refactored validations code. Renamed Model.validations? into Model.has_validations?.
|
12
|
+
|
13
|
+
* Added initial Model validations (Thanks Lance Carlson)
|
14
|
+
|
15
|
+
* Added Database#set_column_default method (thanks Jim Morris.)
|
16
|
+
|
17
|
+
* Removed warning on uninitialized @transform value (thanks Jim Morris).
|
18
|
+
|
19
|
+
=== 0.4.4.2 (2007-12-20)
|
20
|
+
|
21
|
+
* Fixed parsing errors in Ruby 1.9.
|
22
|
+
|
23
|
+
* Fixed sync problem in connection_pool_spec.
|
24
|
+
|
25
|
+
* Changed String#to_time to raise Error::InvalidValue if Time.parse fails.
|
26
|
+
|
27
|
+
* Refactored sequel error classes.
|
28
|
+
|
29
|
+
=== 0.4.4.1 (2007-12-19)
|
30
|
+
|
31
|
+
* Fixed schema generation code to use field quoting and support adapter-specific literalization of default values (#108).
|
32
|
+
|
33
|
+
=== 0.4.4 (2007-12-17)
|
34
|
+
|
35
|
+
* Implemented Database#rename_table (#104).
|
36
|
+
|
37
|
+
* Fixed drop_index in mysql adapter (#103).
|
38
|
+
|
39
|
+
* Added ALTER TABLE specs for postgres, sqlite and mysql adapters. Added custom alter_table behavior for sqlite and mysql adapters (#101, #102).
|
40
|
+
|
41
|
+
* Added direct Database API for altering tables.
|
42
|
+
|
43
|
+
* Added Database#alter_table method with support for adding, dropping, renaming, modifying columns and adding and droppping indexes.
|
44
|
+
|
45
|
+
* Added #unique schema method for defining unique indexes (thanks Dado).
|
46
|
+
|
47
|
+
* Implemented unfolding of #each calls inside sequelizer blocks (thanks Jim Morris).
|
48
|
+
|
49
|
+
=== 0.4.3 (2007-12-15)
|
50
|
+
|
51
|
+
* Fixed Dataset#update to accept strings (#98).
|
52
|
+
|
53
|
+
* Fixed Model.[] to raise for boolean argument (#97).
|
54
|
+
|
55
|
+
* Added Database#add_index method (thanks coda.hale).
|
56
|
+
|
57
|
+
* Added error reporting for filtering on comparison not in a block (thanks Jim Morris).
|
58
|
+
|
59
|
+
* Added support for inline index definition (thanks Dado).
|
60
|
+
|
61
|
+
* Added Database#create_table! method for forcibly creating a table (thanks Dado).
|
62
|
+
|
63
|
+
* Added support for using Dataset#update with block.
|
64
|
+
|
65
|
+
* Changed subscript access to use | operator.
|
66
|
+
|
67
|
+
* Fixed subscript access in sequelizer.
|
68
|
+
|
69
|
+
* Added support for subscript access using Symbol#/ operator.
|
70
|
+
|
71
|
+
=== 0.4.2.2 (2007-12-10)
|
72
|
+
|
73
|
+
* Improved code coverage.
|
74
|
+
|
75
|
+
* Fixed Dataset#count to work properly with datasets with fixed SQL (when using #fetch).
|
76
|
+
|
77
|
+
* Added Model.create_with_params method that filters the given parameters accordring to the model's columns (thanks Aman Gupta).
|
78
|
+
|
79
|
+
=== 0.4.2.1 (2007-12-09)
|
80
|
+
|
81
|
+
* Refactored and fixed Dataset#reverse_order to work with field quoting (thanks Christian).
|
82
|
+
|
83
|
+
* Fixed problem with field quoting in insert statements.
|
84
|
+
|
85
|
+
* Changed sequelizer code to silently fail on any error when requiring parsetree and ruby2ruby.
|
86
|
+
|
87
|
+
* Added Database#create_view, #create_or_replace_view and #drop_view methods. Also implemented Dataset#create_view and #create_or_replace_view convenience methods.
|
88
|
+
|
89
|
+
* Keep DRY by re-using Model#[]= from method_missing.
|
90
|
+
|
91
|
+
* Added Model.fetch alias for DB.fetch.set_model(Model)
|
92
|
+
|
93
|
+
=== 0.4.2 (2007-12-07)
|
94
|
+
|
95
|
+
* Implemented Model#save_changes.
|
96
|
+
|
97
|
+
* Extended Model#save to accept specific columns to update.
|
98
|
+
|
99
|
+
* Implemented experimental JDBC adapter.
|
100
|
+
|
101
|
+
* Added adapter skeleton as starting point for new adapters.
|
102
|
+
|
103
|
+
* Cleaned-up adapters and moved automatic requiring of 'sequel' to adapter stubs.
|
104
|
+
|
105
|
+
=== 0.4.1.3 (2007-12-05)
|
106
|
+
|
107
|
+
* Better plugin conventions.
|
108
|
+
|
109
|
+
* Added experimental OpenBase adapter.
|
110
|
+
|
111
|
+
* Fixed Sequel.<xxx> methods to accept options hash as well as database name. Fixed Sequel.connect to accept options hash as well as URI (Wayne).
|
112
|
+
|
113
|
+
=== 0.4.1.2 (2007-12-04)
|
114
|
+
|
115
|
+
* Added release rake task (using RubyForge).
|
116
|
+
|
117
|
+
* Changed Model.is to accept variable arity.
|
118
|
+
|
119
|
+
* Implemented plugin loading for model classes.
|
120
|
+
|
121
|
+
* Fixed odbc-mssql and odbc adapters (thanks Dusty.)
|
122
|
+
|
123
|
+
* Implemented odbc-mssql adapter (thanks Dusty.)
|
124
|
+
|
125
|
+
=== 0.4.1.1 (2007-11-27)
|
126
|
+
|
127
|
+
* Fixed #first and #last functionality in Informix::Dataset (thanks Gerardo Santana).
|
128
|
+
|
129
|
+
=== 0.4.1 (2007-11-25)
|
130
|
+
|
131
|
+
* Put adapter files in lib/sequel/adapters. Requiring sequel/<adapter> is now deprecated. Users can now just require 'sequel' and adapters are automagically loaded (#93).
|
132
|
+
|
133
|
+
=== 0.4.0 (2007-11-24)
|
134
|
+
|
135
|
+
* Reorganized lib directory structure.
|
136
|
+
|
137
|
+
* Added support for dbi-xxx URI schemes (#86).
|
138
|
+
|
139
|
+
* Fixed problem in Database#uri where setting the password would raise an error (#87).
|
140
|
+
|
141
|
+
* Improved Dataset#insert_sql to correctly handle string keys (#92).
|
142
|
+
|
143
|
+
* Improved error-handling for worker threads. Errors are saved to an array and are accessible through #errors (#91).
|
144
|
+
|
145
|
+
* Dataset#uniq/distinct can now accept a column list for DISTINCT ON clauses.
|
146
|
+
|
147
|
+
* Fixed Model.all.
|
148
|
+
|
149
|
+
* Fixed literalization of strings with escape sequences in postgres adapter (#90).
|
150
|
+
|
151
|
+
* Added support for literalizing BigDecimal values (#89).
|
152
|
+
|
153
|
+
* Fixed column qualification for joined datasets (thanks Christian).
|
154
|
+
|
155
|
+
* Implemented experimental informix adapter.
|
156
|
+
|
157
|
+
=== 0.3.4.1 (2007-11-10)
|
158
|
+
|
159
|
+
* Changed Dataset#select_sql to support queries without a FROM clause.
|
160
|
+
|
161
|
+
=== 0.3.4 (2007-11-10)
|
162
|
+
|
163
|
+
* Fixed MySQL adapter to allow calling stored procedures (thanks Sebastian).
|
164
|
+
|
165
|
+
* Changed Dataset#each to always return self.
|
166
|
+
|
167
|
+
* Fixed SQL functions without arguments in block filters.
|
168
|
+
|
169
|
+
* Implemented super-cool Symbol#cast_as method.
|
170
|
+
|
171
|
+
* Fixed error message in command-line tool if failed to load adapter (#85).
|
172
|
+
|
173
|
+
* Refactored code relating to column references for better extendibility (#88).
|
174
|
+
|
175
|
+
* Tiny fix to Model#run_hooks.
|
176
|
+
|
177
|
+
=== 0.3.3 (2007-11-04)
|
178
|
+
|
179
|
+
* Revised code to generate SQL statements without trailing semicolons.
|
180
|
+
|
181
|
+
* Added Sequel::Worker implementation of a simple worker thread for asynchronous execution.
|
182
|
+
|
183
|
+
* Added spec for Oracle adapter.
|
184
|
+
|
185
|
+
* Fixed Oracle adapter to format INSERT statements without semicolons (thanks Liming Lian).
|
186
|
+
|
187
|
+
* Renamed alias to Array#keys as Array#columns instead of Array#fields.
|
188
|
+
|
189
|
+
* Renamed FieldCompositionMethods as ColumnCompositionMethods.
|
190
|
+
|
191
|
+
* Implemented Sequel::NumericExtensions to provide stuff like 30.days.ago.
|
192
|
+
|
193
|
+
=== 0.3.2 (2007-11-01)
|
194
|
+
|
195
|
+
* Added #to_column_name as alias to #to_field_name, #column_title as alias to #field_title.
|
196
|
+
|
197
|
+
* Added Dataset#interval method for getting interval between minimum/maximum values for a column.
|
198
|
+
|
199
|
+
* Fixed Oracle::Database#execute (#84).
|
200
|
+
|
201
|
+
* Added group_and_count as general implementation for count_by_xxx.
|
202
|
+
|
203
|
+
* Added count_by magic method.
|
204
|
+
|
205
|
+
* Added Dataset#range method for getting the minimum/maximum values for a column.
|
206
|
+
|
207
|
+
* Fixed timestamp translation in SQLite adapter (#83).
|
208
|
+
|
209
|
+
* Experimental DB2 adapter.
|
210
|
+
|
211
|
+
* Added Dataset#set as alias to Dataset#update.
|
212
|
+
|
213
|
+
* Removed long deprecated expressions.rb code.
|
214
|
+
|
215
|
+
* Better documentation.
|
216
|
+
|
217
|
+
* Implemented Dataset magic methods: order_by_xxx, group_by_xxx, filter_by_xxx, all_by_xxx, first_by_xxx, last_by_xxx.
|
218
|
+
|
219
|
+
* Changed Model.create and Model.new to accept a block.
|
220
|
+
|
221
|
+
=== 0.3.1 (2007-10-30)
|
222
|
+
|
223
|
+
* Typo fixes (#79).
|
224
|
+
|
225
|
+
* Added require 'yaml' to dataset.rb (#78).
|
226
|
+
|
227
|
+
* Changed postgres adapter to use the ruby-postgres library's type conversion if available (#76).
|
228
|
+
|
229
|
+
* Fixed string literalization in mysql adapter for strings with comment backslashes in them (#75).
|
230
|
+
|
231
|
+
* Fixed ParseTree dependency to work with version 2.0.0 and later (#74).
|
232
|
+
|
233
|
+
* foreign_key definitions now accept :key option for specifying the remote key (#73).
|
234
|
+
|
235
|
+
* Fixed Model#method_missing to not raise error for columns not in the table but for which a value exists (#77).
|
236
|
+
|
237
|
+
* New documentation for Model.
|
238
|
+
|
239
|
+
* Implemented Oracle adapter based on ruby-oci8 library.
|
240
|
+
|
241
|
+
* Implemented Model#pk_hash. Is it really necessary?
|
242
|
+
|
243
|
+
* Deprecated Model#pkey. Implemented better Model#pk method.
|
244
|
+
|
245
|
+
* Specs and docs for Model.one_to_one, Model.one_to_many macros.
|
246
|
+
|
247
|
+
=== 0.3.0.1 (2007-10-20)
|
248
|
+
|
249
|
+
* Changed Database#fetch to return a modified dataset.
|
250
|
+
|
251
|
+
=== 0.3 (2007-10-20)
|
252
|
+
|
253
|
+
* Added stock transforms to Dataset#transform. Refactored Model.serialize.
|
254
|
+
|
255
|
+
* Added Database#logger= method for setting the database logger object.
|
256
|
+
|
257
|
+
* Fixed Model.[] to act as shortcut to Model.find when a hash is given (#71).
|
258
|
+
|
259
|
+
* Added support for old and new decimal types in MySQL adapter, and updated MYSQL_TYPES with MySQL 5.0 constants (#72).
|
260
|
+
|
261
|
+
* Implemented Database#disconnect method for all adapters.
|
262
|
+
|
263
|
+
* Fixed small bug in ArrayKeys module.
|
264
|
+
|
265
|
+
* Implemented model caching by primary key.
|
266
|
+
|
267
|
+
* Separated Model.find and Model.[] functionality. Model.find takes a filter. Model.[] is strictly for finding by primary keys.
|
268
|
+
|
269
|
+
* Enhanced Dataset#first to accept a filter block. Model#find can also now accept a filter block.
|
270
|
+
|
271
|
+
* Changed Database#[] to act as shortcut to #fetch if a string is given.
|
272
|
+
|
273
|
+
* Renamed Database#each to #fetch. If no block is given, the method returns an enumerator.
|
274
|
+
|
275
|
+
* Changed Dataset#join methods to correctly literalize values in join conditions (#70).
|
276
|
+
|
277
|
+
* Fixed #filter with ranges to correctly literalize field names (#69).
|
278
|
+
|
279
|
+
* Implemented Database#each method for quickly retrieving records with arbitrary SQL (thanks Aman Gupta).
|
280
|
+
|
281
|
+
* Fixed bug in postgres adapter where a LiteralString would be literalized as a regular String.
|
282
|
+
|
283
|
+
* Fixed SQLite insert with subquery (#68).
|
284
|
+
|
285
|
+
* Reverted back to hashes as default mode. Added Sequel.use_array_tuples and Sequel.use_hash_tuples methods.
|
286
|
+
|
287
|
+
* Fixed problem with arrays with keys when using #delete.
|
288
|
+
|
289
|
+
* Implemented ArrayKeys as substitute for ArrayFields.
|
290
|
+
|
291
|
+
* Added Dataset#each_hash method.
|
292
|
+
|
293
|
+
* Rewrote SQLite::Database#transaction to use sqlite3-ruby library implementation of transactions.
|
294
|
+
|
295
|
+
* Fixed Model.destroy_all to work correctly in cases where no before_destroy hook is defined and an after_destroy hook is defined.
|
296
|
+
|
297
|
+
* Restored Model.has_hooks? implementation.
|
298
|
+
|
299
|
+
* Changed Database#<< to strip comments and whitespace only when an array is given.
|
300
|
+
|
301
|
+
* Changed Schema::Generator#primary_key to accept calls with the type argument omitted.
|
302
|
+
|
303
|
+
* Hooks can now be prepended or appended by choice.
|
304
|
+
|
305
|
+
* Changed Model.subset to define filter method on the underlying dataset instead of the model class.
|
306
|
+
|
307
|
+
* Fixed Dataset#transform to work with array fields.
|
308
|
+
|
309
|
+
* Added Dataset#to_csv method.
|
310
|
+
|
311
|
+
* PrettyTable can now extract column names from arrayfields.
|
312
|
+
|
313
|
+
* Converted ado, dbi, odbc adapters to use arrayfields instead of hashes.
|
314
|
+
|
315
|
+
* Fixed composite key support.
|
316
|
+
|
317
|
+
* Fixed Dataset#insert_sql, update_sql to support array fields.
|
318
|
+
|
319
|
+
* Converted sqlite, mysql, postgres adapters to use arrayfields instead of hashes.
|
320
|
+
|
321
|
+
* Extended Dataset#from to auto alias sub-queries.
|
322
|
+
|
323
|
+
* Extended Dataset#from to accept hash for aliasing tables.
|
324
|
+
|
325
|
+
* Added before_update, after_update hooks.
|
326
|
+
|
327
|
+
=== 0.2.1.1 (2007-10-07)
|
328
|
+
|
329
|
+
* Added Date literalization to sqlite adapter (#60).
|
330
|
+
|
331
|
+
* Changed Model.serialize to allow calling it after the class is defined (#59).
|
332
|
+
|
333
|
+
* Fixed after_create hooks to allow calling save inside the hook (#58).
|
334
|
+
|
335
|
+
* Fixed MySQL quoting of sql functions (#57).
|
336
|
+
|
337
|
+
* Implemented rollback! global method for cancelling transactions in progress.
|
338
|
+
|
339
|
+
* Fixed =~ operator in Sequelizer.
|
340
|
+
|
341
|
+
* Fixed ODBC::Dataset#fetch_rows (thanks Dusty).
|
342
|
+
|
343
|
+
* Renamed Model.recreate_table to create_table!. recreate_table is deprecated and will issue a warning (#56).
|
344
|
+
|
345
|
+
=== 0.2.1 (2007-09-24)
|
346
|
+
|
347
|
+
* Added default implementation of Model.primary_key_hash.
|
348
|
+
|
349
|
+
* Fixed Sequel::Model() to set dataset for inherited classes.
|
350
|
+
|
351
|
+
* Rewrote Model.serialize to use Dataset#transform.
|
352
|
+
|
353
|
+
* Implemented Dataset#transform.
|
354
|
+
|
355
|
+
* Added gem spec for Windows (without ParseTree dependency).
|
356
|
+
|
357
|
+
* Added support for dynamic strings in Sequelizer (#49).
|
358
|
+
|
359
|
+
* Query branch merged into trunk.
|
360
|
+
|
361
|
+
* Implemented self-changing methods.
|
362
|
+
|
363
|
+
* Add support for ternary operator to Sequelizer.
|
364
|
+
|
365
|
+
* Fixed sequelizer to evaluate expressions if they don't involve symbols or literal strings.
|
366
|
+
|
367
|
+
* Added protection against using #each, #delete, #insert, #update inside query blocks.
|
368
|
+
|
369
|
+
* Improved Model#method_missing to deal with invalid attributes.
|
370
|
+
|
371
|
+
* Implemented Dataset#query.
|
372
|
+
|
373
|
+
* Added Dataset#group_by as alias for Dataset#group.
|
374
|
+
|
375
|
+
* Added Dataset#order_by as alias for Dataset#order.
|
376
|
+
|
377
|
+
* More model refactoring. Added support for composite keys.
|
378
|
+
|
379
|
+
* Added Dataset#empty? method (#46).
|
380
|
+
|
381
|
+
* Fixed Symbol#to_field_name to support names with numbers and upper-case characters (#45).
|
382
|
+
|
383
|
+
* Added install_no_doc rake task.
|
384
|
+
|
385
|
+
* Partial refactoring of model code.
|
386
|
+
|
387
|
+
* Refactored dataset-model association and added Dataset#set_row_filter method.
|
388
|
+
|
389
|
+
* Added support for case-sensitive regexps to mysql adapter.
|
390
|
+
|
391
|
+
* Changed mysql adapter to support encoding option as well.
|
392
|
+
|
393
|
+
* Added charset/encoding option to postgres adapter.
|
394
|
+
|
395
|
+
* Implemented Model.serialize (thanks Aman Gupta.)
|
396
|
+
|
397
|
+
* Changed Model.create to INSERT DEFAULT VALUES instead of (id) VALUES (null) (brings back #41.)
|
398
|
+
|
399
|
+
* Fixed Model.new to work without arguments.
|
400
|
+
|
401
|
+
* Added Model.no_primary_key method to allow models without primary keys.
|
402
|
+
|
403
|
+
* Added Model#this method (#42 thanks Duane Johnson).
|
404
|
+
|
405
|
+
* Fixed Dataset#insert_sql to use DEFAULT VALUES clause if argument is an empty hash.
|
406
|
+
|
407
|
+
* Fixed Model.create to work correctly when no argument is passed (#41).
|
408
|
+
|
409
|
+
=== 0.2.0.2 (2007-09-07)
|
410
|
+
|
411
|
+
* Dataset#insert can now accept subqueries.
|
412
|
+
|
413
|
+
* Changed Migrator.apply to return the version.
|
414
|
+
|
415
|
+
* Changed Sequel::Model() to cache intermediate classes so descendant classes can be reopened (#39).
|
416
|
+
|
417
|
+
* Added :charset option to MySQL adapter (#40).
|
418
|
+
|
419
|
+
* Fixed Dataset#exclude to add parens around NOT expression (#38).
|
420
|
+
|
421
|
+
* Fixed use of sub-queries with all comparison operators in block filters (#38).
|
422
|
+
|
423
|
+
* Fixed arithmetic expressions in block filters to not be literalized.
|
424
|
+
|
425
|
+
* Changed Symbol#method_missing to return LiteralString.
|
426
|
+
|
427
|
+
* Changed PrettyTable to right-align numbers.
|
428
|
+
|
429
|
+
* Fixed Model.create_table (thanks Duane Johnson.)
|
430
|
+
|
431
|
+
=== 0.2.0.1 (2007-09-04)
|
432
|
+
|
433
|
+
* Improved support for invoking methods with inline procs inside block filters.
|
434
|
+
|
435
|
+
=== 0.2.0 (2007-09-02)
|
436
|
+
|
437
|
+
* Fixed Model.drop_table (thanks Duane Johnson.)
|
438
|
+
|
439
|
+
* Dataset#each can now return rows for arbitrary SQL by specifying :sql option.
|
440
|
+
|
441
|
+
* Added spec for postgres adapter.
|
442
|
+
|
443
|
+
* Fixed Model.method_missing to work with new SQL generation.
|
444
|
+
|
445
|
+
* Fixed #compare_expr to support regexps.
|
446
|
+
|
447
|
+
* Fixed postgres, mysql adapters to support regexps.
|
448
|
+
|
449
|
+
* More specs for block filters. Updated README.
|
450
|
+
|
451
|
+
* Added support for globals and $X macros in block filters.
|
452
|
+
|
453
|
+
* Fixed Sequelizer to not fail if ParseTree or Ruby2Ruby gems are missing.
|
454
|
+
|
455
|
+
* Renamed String#expr into String#lit (#expr should be deprecated in future versions).
|
456
|
+
|
457
|
+
* Renamed Sequel::ExpressionString into LiteralString.
|
458
|
+
|
459
|
+
* Fixed Symbol#[] to return an ExpressionString, so as not to be literalized.
|
460
|
+
|
461
|
+
* Renamed Dataset::Expressions to Dataset::Sequelizer.
|
462
|
+
|
463
|
+
* Renamed Expressions#format_re_expression to match_expr.
|
464
|
+
|
465
|
+
* Renamed Expressions#format_eq_expression to compare_expr.
|
466
|
+
|
467
|
+
* Added support for Regexp in MySQL adapter.
|
468
|
+
|
469
|
+
* Refactored Regexp expressions into a separate #format_re_expression method.
|
470
|
+
|
471
|
+
* Added support for arithmetic in proc filters.
|
472
|
+
|
473
|
+
* Added support for nested proc expressions, more specs.
|
474
|
+
|
475
|
+
* Added support for SQL function using symbols, e.g. :sum[:x].
|
476
|
+
|
477
|
+
* Fixed deadlock bug in ConnectionPool.
|
478
|
+
|
479
|
+
* Removed deprecated old expressions.rb.
|
480
|
+
|
481
|
+
* Rewrote Proc filter feature using ParseTree.
|
482
|
+
|
483
|
+
* Added support for additional functions on columns using Symbol#method_missing.
|
484
|
+
|
485
|
+
* Added support for supplying filter block to DB#[] method, to allow stuff like DB[:nodes] {:path =~ /^icex1/}.
|
486
|
+
|
487
|
+
=== 0.1.9.12 (2007-08-26)
|
488
|
+
|
489
|
+
* Added spec for PrettyTable.
|
490
|
+
|
491
|
+
* Added specs for Schema::Generator and Model (#36 thanks technoweenie).
|
492
|
+
|
493
|
+
* Fixed Sequel::Model.set_schema (#36 thanks technoweenie.)
|
494
|
+
|
495
|
+
* Added support for no options on Schema::Generator#foreign_key (#36 thanks technoweenie.)
|
496
|
+
|
497
|
+
* Implemented (restored?) Schema::Generator#primary_key_name (#36 thanks technoweenie.)
|
498
|
+
|
499
|
+
* Better spec code coverage.
|
500
|
+
|
501
|
+
=== 0.1.9.11 (2007-08-24)
|
502
|
+
|
503
|
+
* Changed Dataset#set_model to allow supplying additional arguments to the model's initialize method (#35). Thanks Sunny Hirai.
|
504
|
+
|
505
|
+
=== 0.1.9.10 (2007-08-22)
|
506
|
+
|
507
|
+
* Changed schema generation code to generate separate statements for CREATE TABLE and each CREATE INDEX (#34).
|
508
|
+
|
509
|
+
* Refactored Dataset::SQL#field_name for better support of different field quoting standards by specific adapters.
|
510
|
+
|
511
|
+
* Added #current_page_record_count for paginated datasets.
|
512
|
+
|
513
|
+
* Removed Database#literal and included Dataset::SQL instead.
|
514
|
+
|
515
|
+
* Sequel::Dataset:SQL#field_name can now take a hash (as well as #select and any method that uses #field_name) for aliasing column names. E.g. DB[:test].select(:_qqa => 'Date').sql #=> 'SELECT _qqa AS Date FROM test'.
|
516
|
+
|
517
|
+
* Moved SingleThreadedPool to lib/sequel/connection_pool.rb.
|
518
|
+
|
519
|
+
* Changed SQLite::Dataset to return affected rows for #delete and #update (#33).
|
520
|
+
|
521
|
+
* ADO adapter: Added use of Enumerable for Recordset#Fields, playing it safe and moving to the first row before getting results, and changing the auto_increment constant to work for MSSQL.
|
522
|
+
|
523
|
+
=== 0.1.9.9 (2007-08-18)
|
524
|
+
|
525
|
+
* New ADO adapter by cdcarter (#31).
|
526
|
+
|
527
|
+
* Added automatic column aliasing to #avg, #sum, #min and #max (#30).
|
528
|
+
|
529
|
+
* Fixed broken Sequel::DBI::Dataset#fetch_rows (#29 thanks cdcarter.)
|
530
|
+
|
531
|
+
=== 0.1.9.8 (2007-08-15)
|
532
|
+
|
533
|
+
* Fixed DBI adapter.
|
534
|
+
|
535
|
+
=== 0.1.9.7 (2007-08-15)
|
536
|
+
|
537
|
+
* Added support for executing batch statements in sqlite adapter.
|
538
|
+
|
539
|
+
* Changed #current_page_record_range to return 0..0 for an invalid page.
|
540
|
+
|
541
|
+
* Fixed joining of aliased tables.
|
542
|
+
|
543
|
+
* Improved Symbol#to_field_name to prevent false positives.
|
544
|
+
|
545
|
+
* Implemented Dataset#multi_insert with :commit_every option.
|
546
|
+
|
547
|
+
* More docs for Dataset#set_model.
|
548
|
+
|
549
|
+
* Implemented automatic creation of convenience methods for each adapter (e.g. Sequel.sqlite etc.)
|
550
|
+
|
551
|
+
=== 0.1.9.6 (2007-08-13)
|
552
|
+
|
553
|
+
* Refactored schema definition code. Gets rid of famous primary_key problem as well as other issues (e.g. issue #22).
|
554
|
+
|
555
|
+
* Added #pagination_record_count, #page_range and #current_page_record_range for paginated datasets.
|
556
|
+
|
557
|
+
* Changed MySQL adapter to automatically reconnect (issue #26).
|
558
|
+
|
559
|
+
* Changed Sequel() to accept variable arity.
|
560
|
+
|
561
|
+
* Added :elements option to column definition, in order to support ENUM and SET types.
|
562
|
+
|
563
|
+
=== 0.1.9.5 (2007-08-12)
|
564
|
+
|
565
|
+
* Fixed migration docs.
|
566
|
+
|
567
|
+
* Removed dependency on PGconn in Schema class.
|
568
|
+
|
569
|
+
=== 0.1.9.4 (2007-08-11)
|
570
|
+
|
571
|
+
* Added Sequel.dbi convenience method for using DBI connection strings to open DBI databases.
|
572
|
+
|
573
|
+
=== 0.1.9.3 (2007-08-10)
|
574
|
+
|
575
|
+
* Added support for specifying field size in schema definitions (thanks Florian Aßmann.)
|
576
|
+
|
577
|
+
* Added migration code based on work by Florian Aßmann.
|
578
|
+
|
579
|
+
* Reintroduced metaid dependency. No need to keep a local copy of it.
|
580
|
+
|
581
|
+
=== 0.1.9.2 (2007-07-24)
|
582
|
+
|
583
|
+
* Removed metaid dependency. Re-factored requires in lib/sequel.rb.
|
584
|
+
|
585
|
+
=== 0.1.9.1 (2007-07-22)
|
586
|
+
|
587
|
+
* Improved robustness of MySQL::Dataset#field_name.
|
588
|
+
|
589
|
+
* Added Sequel.single_threaded= convenience method.
|
590
|
+
|
591
|
+
=== 0.1.9 (2007-07-21)
|
592
|
+
|
593
|
+
* Fixed #update_sql and #insert_sql to support field quoting by calling #field_name.
|
594
|
+
|
595
|
+
* Implemented automatic data type conversion in mysql adapter.
|
596
|
+
|
597
|
+
* Added support for boolean literals in mysql adapter.
|
598
|
+
|
599
|
+
* Added support for ORDER and LIMIT clauses in UPDATE statements in mysql adapter.
|
600
|
+
|
601
|
+
* Implemented correct field quoting (using back-ticks) in mysql adapter.
|
602
|
+
|
603
|
+
* Wrote basic MySQL spec.
|
604
|
+
|
605
|
+
* Fixd MySQL::Dataset to return correct data types with symbols as hash keys.
|
606
|
+
|
607
|
+
* Removed discunctional MySQL::Database#transaction.
|
608
|
+
|
609
|
+
* Added support for single threaded operation.
|
610
|
+
|
611
|
+
* Fixed bug in Dataset#format_eq_expression where Range objects would not be literalized correctly.
|
612
|
+
|
613
|
+
* Added parens around postgres LIKE expressions using regexps.
|
614
|
+
|
615
|
+
=== 0.1.8 (2007-07-10)
|
616
|
+
|
617
|
+
* Implemented Dataset#columns for retrieving the columns in the result set.
|
618
|
+
|
619
|
+
* Updated Model with changes to how model-associated datasets work.
|
620
|
+
|
621
|
+
* Beefed-up specs. Coverage is now at 95.0%.
|
622
|
+
|
623
|
+
* Added support for polymorphic datasets.
|
624
|
+
|
625
|
+
* The adapter dataset interface was simplified and standardized. Only four methods need be overriden: fetch_rows, update, insert and delete.
|
626
|
+
|
627
|
+
* The Dataset class was refactored. The bulk of the dataset code was moved into separate modules.
|
628
|
+
|
629
|
+
* Renamed Dataset#hash_column to Dataset#to_hash.
|
630
|
+
|
631
|
+
* Added some common pragmas to sqlite adapter.
|
632
|
+
|
633
|
+
* Added Postgres::Dataset#analyze for EXPLAIN ANALYZE queries.
|
634
|
+
|
635
|
+
* Fixed broken Postgres::Dataset#explain.
|
636
|
+
|
637
|
+
=== 0.1.7
|
638
|
+
|
639
|
+
* Removed db.synchronize wrapping calls in sqlite adapter.
|
640
|
+
|
641
|
+
* Implemented Model.join method to restrict returned columns to the model table (thanks Pedro Gutierrez).
|
642
|
+
|
643
|
+
* Implemented Dataset#paginate method.
|
644
|
+
|
645
|
+
* Fixed after_destroy hook.
|
646
|
+
|
647
|
+
* Improved Dataset#first and #last to accept a filter hash.
|
648
|
+
|
649
|
+
* Added Dataset#[]= method.
|
650
|
+
|
651
|
+
* Added Sequel() convenience method.
|
652
|
+
|
653
|
+
* Fixed Dataset#first to include a LIMIT clause for a single record.
|
654
|
+
|
655
|
+
* Small fix to Postgres driver to return a primary_key value for the inserted record if it is specified in the insertion values (thanks Florian Aßmann and Pedro Gutierrez).
|
656
|
+
|
657
|
+
* Fixed Symbol#DESC to support qualified notation (thanks Pedro Gutierrez).
|
658
|
+
|
659
|
+
=== 0.1.6
|
660
|
+
|
661
|
+
* Fixed Model#method_missing to raise for an invalid attribute.
|
662
|
+
|
663
|
+
* Fixed PrettyTable to print model objects (thanks snok.)
|
664
|
+
|
665
|
+
* Fixed ODBC timestamp conversion to return DateTime rather than Time object (thanks snok.)
|
666
|
+
|
667
|
+
* Fixed Model.method_missing (thanks snok.)
|
668
|
+
|
669
|
+
* Model.method_missing now creates stubs for calling Model.dataset methods. Methods like Model.each etc are removed.
|
670
|
+
|
671
|
+
* Changed default join type to INNER JOIN (thanks snok.)
|
672
|
+
|
673
|
+
* Added support for literal expressions, e.g. DB[:items].filter(:col1 => 'col2 - 10'.expr).
|
674
|
+
|
675
|
+
* Added Dataset#and.
|
676
|
+
|
677
|
+
* SQLite adapter opens a memory DB if no database is specified, e.g. Sequel.open 'sqlite:/'.
|
678
|
+
|
679
|
+
* Added Dataset#or, pretty nifty.
|
680
|
+
|
681
|
+
=== 0.1.5
|
682
|
+
|
683
|
+
* Fixed Dataset#join to support multiple joins. Added #left_outer_join, #right_outer_join, #full_outer_join, #inner_join methods.
|
684
|
+
|
685
|
+
=== 0.1.4
|
686
|
+
|
687
|
+
* Added String#split_sql.
|
688
|
+
|
689
|
+
* Implemented Array#to_sql and String#to_sql. Database#to_sql can now take an array of strings and convert into an SQL string. Comments and excessive white-space are removed.
|
690
|
+
|
691
|
+
* Improved Schema generator to support data types as method names:
|
692
|
+
DB.create_table :test do
|
693
|
+
integer :abc
|
694
|
+
text :def
|
695
|
+
...
|
696
|
+
end
|
697
|
+
|
698
|
+
* Implemented ODBC adapter.
|
699
|
+
|
700
|
+
=== 0.1.3
|
701
|
+
|
702
|
+
* Implemented DBI adapter.
|
703
|
+
|
704
|
+
* Refactored database connection code. Now handled through Database#connect.
|
705
|
+
|
706
|
+
=== 0.1.2
|
707
|
+
|
708
|
+
* The first opened database is automatically assigned to to Model.db.
|
709
|
+
|
710
|
+
* Removed SequelConnectionError. Exception class errors are converted to RuntimeError.
|
711
|
+
|
712
|
+
* Added support for UNION, INTERSECT and EXCEPT set operations.
|
713
|
+
|
714
|
+
* Fixed Dataset#single_record to return nil if no record is found.
|
715
|
+
|
716
|
+
* Updated specs to conform to RSpec 1.0.
|
717
|
+
|
718
|
+
* Added Model#find_or_create method.
|
719
|
+
|
720
|
+
* Fixed MySQL::Dataset#query_single (thanks Dries Harnie.)
|
721
|
+
|
722
|
+
* Added Model.subset method. Fixed Model.filter and Model.exclude to accept blocks.
|
723
|
+
|
724
|
+
* Added Database#uri method.
|
725
|
+
|
726
|
+
* Refactored and removed deprecated code in postgres adapter.
|
727
|
+
|
728
|
+
===0.1.1
|
729
|
+
|
730
|
+
* More documentation for Dataset.
|
731
|
+
|
732
|
+
* Added Dataset#size as alias to Dataset#count.
|
733
|
+
|
734
|
+
* Changed Database#<< to call execute (instead of being an alias). Thus it will work for descendants as well.
|
735
|
+
|
736
|
+
* Fixed Sequel.open to accept variable arity.
|
737
|
+
|
738
|
+
* Refactored Model#refresh, Model.create. Removed Model#reload.
|
739
|
+
|
740
|
+
* Refactored Model hooks.
|
741
|
+
|
742
|
+
* Cleaned up Dataset API.
|
743
|
+
|
744
|
+
=== 0.1.0
|
745
|
+
|
746
|
+
* Changed Database#create_table to only accept a block. Nobody's gonna use the other way.
|
747
|
+
|
748
|
+
* Removed Dataset#[]= method. Too confusing and not really useful.
|
749
|
+
|
750
|
+
* Fixed ConnectionPool#hold to wrap exceptions only once.
|
751
|
+
|
752
|
+
* Dataset#where_list Renamed Dataset#expression_list.
|
753
|
+
|
754
|
+
* Added support for qualified fields in Proc expressions (e.g. filter {items.id == 1}.)
|
755
|
+
|
756
|
+
* Added like? and in? Proc expression operators.
|
757
|
+
|
758
|
+
* Added require 'date' in dataset.rb. Is this a 1.8.5 thing?
|
759
|
+
|
760
|
+
* Refactored Dataset to use literal strings instead of format strings (slight performance improvement and better readability.)
|
761
|
+
|
762
|
+
* Added support for literalizing Date objects.
|
763
|
+
|
764
|
+
* Refactored literalization of Time objects.
|
765
|
+
|
766
|
+
=== 0.0.20
|
767
|
+
|
768
|
+
* Refactored Dataset where clause construction to use expressions.
|
769
|
+
|
770
|
+
* Implemented Proc expressions (adapted from a great idea by Sam Smoot.)
|
771
|
+
|
772
|
+
* Fixed Model#map.
|
773
|
+
|
774
|
+
* Documentation for ConnectionPool.
|
775
|
+
|
776
|
+
* Specs for Database.
|
777
|
+
|
778
|
+
=== 0.0.19
|
779
|
+
|
780
|
+
* More specs for Dataset.
|
781
|
+
|
782
|
+
* Fixed Dataset#invert_order to work correctly with strings.
|
783
|
+
|
784
|
+
* Fixed Model#== to check equality of values.
|
785
|
+
|
786
|
+
* Added Model#exclude and Model#order.
|
787
|
+
|
788
|
+
* Fixed Dataset#order and Dataset#group to behave correctly when supplied with qualified field name symbols.
|
789
|
+
|
790
|
+
* Removed Database#literal. Shouldn't have been there.
|
791
|
+
|
792
|
+
* Added SQLite::Dataset#explain. Returns an array of opcode hashes.
|
793
|
+
|
794
|
+
* Specs for ConnectionPool.
|
795
|
+
|
796
|
+
=== 0.0.18
|
797
|
+
|
798
|
+
* Implemented SequelError and SequelConnectionError classes. ConnectionPool#hold now catches any connection errors and reraises them SequelConnectionError.
|
799
|
+
|
800
|
+
* Removed duplication in Database#[].
|
801
|
+
|
802
|
+
* :from and :select options are now always arrays (patch by Alex Bradbury.)
|
803
|
+
|
804
|
+
* Fixed Dataset#exclude to work correctly (patch and specs by Alex Bradbury.)
|
805
|
+
|
806
|
+
=== 0.0.17
|
807
|
+
|
808
|
+
* Fixed Postgres::Database#tables to return table names as symbols (caused problem when using Database#table_exists?).
|
809
|
+
|
810
|
+
* Fixed Dataset#from to have variable arity, like Dataset#select and Dataset#where (patch by Alex Bradbury.)
|
811
|
+
|
812
|
+
* Added support for GROUP BY and HAVING clauses (patches by Alex Bradbury.) Refactored Dataset#filter.
|
813
|
+
|
814
|
+
* More specs.
|
815
|
+
|
816
|
+
* Refactored Dataset#where for better composability.
|
817
|
+
|
818
|
+
* Added Dataset#[]= method.
|
819
|
+
|
820
|
+
* Added support for DISTINCT and OFFSET clauses (patches by Alex Bradbury.) Dataset#limit now accepts ranges. Added Dataset#uniq and distinct methods.
|
821
|
+
|
822
|
+
=== 0.0.16
|
823
|
+
|
824
|
+
* More documentation.
|
825
|
+
|
826
|
+
* Added support for subqueries in Dataset#literal.
|
827
|
+
|
828
|
+
* Added support for Model.all_by_XXX methods through Model.method_missing.
|
829
|
+
|
830
|
+
* Added basic SQL logging to Database.
|
831
|
+
|
832
|
+
* Added Enumerable#send_each convenience method.
|
833
|
+
|
834
|
+
* Changed Dataset#destroy to return the number of deleted records.
|
835
|
+
|
836
|
+
=== 0.0.15
|
837
|
+
|
838
|
+
* Improved Dataset#insert_sql to allow arrays as well as hashes.
|
839
|
+
|
840
|
+
* Database#drop_table now accepts a list of table names.
|
841
|
+
|
842
|
+
* Added Model#id to to return the id column.
|
843
|
+
|
844
|
+
=== 0.0.14
|
845
|
+
|
846
|
+
* Fixed Model's attribute accessors (hopefully for the last time).
|
847
|
+
|
848
|
+
* Changed Model.db and Model.db= to allow different databases for different model classes.
|
849
|
+
|
850
|
+
* Fixed bug in aggregate methods (max, min, etc) for datasets using record classes.
|
851
|
+
|
852
|
+
=== 0.0.13
|
853
|
+
|
854
|
+
* Fixed Model#method_missing to do both find, filter and attribute accessors. duh.
|
855
|
+
|
856
|
+
* Fixed bug in Dataset#literal when quoting arrays of strings (thanks Douglas Koszerek.)
|
857
|
+
|
858
|
+
=== 0.0.12
|
859
|
+
|
860
|
+
* Model#save now correctly performs an INSERT for new objects.
|
861
|
+
|
862
|
+
* Added Model#reload for reloading an object from the database.
|
863
|
+
|
864
|
+
* Added Dataset#naked method for getting a version of a dataset that fetches records as hashes.
|
865
|
+
|
866
|
+
* Implemented attribute accessors for column values ala ActiveRecord models.
|
867
|
+
|
868
|
+
* Fixed filtering using nil values (e.g. dataset.filter(:parent_id => nil)).
|
869
|
+
|
870
|
+
=== 0.0.11
|
871
|
+
|
872
|
+
* Renamed Model.schema to Model.set_schema and Model.get_schema to Model.schema.
|
873
|
+
|
874
|
+
* Improved Model class to allow descendants of model clases (thanks Pedro Gutierrez.)
|
875
|
+
|
876
|
+
* Removed require 'postgres' in schema.rb (thanks Douglas Koszerek.)
|
877
|
+
|
878
|
+
=== 0.0.10
|
879
|
+
|
880
|
+
* Added some examples.
|
881
|
+
|
882
|
+
* Added Dataset#print method for pretty-printing tables.
|
883
|
+
|
884
|
+
=== 0.0.9
|
885
|
+
|
886
|
+
* Fixed Postgres::Database#tables and #locks methods.
|
887
|
+
|
888
|
+
* Added PGconn#last_insert_id method that should support all 7.x and 8.x versions of Postgresql.
|
889
|
+
|
890
|
+
* Added Dataset#exists method for EXISTS where clauses.
|
891
|
+
|
892
|
+
* Changed behavior of Dataset#literal to regard symbols as field names.
|
893
|
+
|
894
|
+
* Refactored and DRY'd Dataset#literal and overrides therof. Added support for subqueries in where clause.
|
895
|
+
|
896
|
+
=== 0.0.8
|
897
|
+
|
898
|
+
* Fixed Dataset#reverse_order to provide chainability. This method can be called without arguments to invert the current order or with arguments to provide a descending order.
|
899
|
+
|
900
|
+
* Fixed literal representation of literals in SQLite adapter (thanks Christian Neukirchen!)
|
901
|
+
|
902
|
+
* Refactored insert code in Postgres adapter (in preparation for fetching the last insert id for pre-8.1 versions).
|
903
|
+
|
904
|
+
=== 0.0.7
|
905
|
+
|
906
|
+
* Fixed bug in Model.schema, duh!
|
907
|
+
|
908
|
+
=== 0.0.6
|
909
|
+
|
910
|
+
* Added Dataset#sql as alias to Dataset#select_sql.
|
911
|
+
|
912
|
+
* Dataset#where and Dataset#exclude can now be used for refining dataset conditions, enabling stuff like posts.where(:title => 'abcdef').exclude(:user_id => 3).
|
913
|
+
|
914
|
+
* Implemented Dataset#exclude method.
|
915
|
+
|
916
|
+
* Added Sequel::Schema#auto_primary_key method for setting an automatic primary key to be added to every table definition. Changed the schema generator to not define a primary key by default.
|
917
|
+
|
918
|
+
* Changed Sequel::Database#table_exists? to rely on the tables method if it is available.
|
919
|
+
|
920
|
+
* Implemented SQLite::Database#tables.
|
921
|
+
|
922
|
+
=== 0.0.5
|
923
|
+
|
924
|
+
* Added Dataset#[] method. Refactored Model#find and Model#[].
|
925
|
+
|
926
|
+
* Renamed Pool#conn_maker to Pool#connection_proc.
|
927
|
+
|
928
|
+
* Added automatic require 'sequel' to all adapters for convenience.
|
929
|
+
|
930
|
+
=== 0.0.4
|
931
|
+
|
932
|
+
* Added preliminary MySQL support.
|
933
|
+
|
934
|
+
* Code cleanup.
|
935
|
+
|
936
|
+
=== 0.0.3
|
937
|
+
|
938
|
+
* Add Dataset#sum method.
|
939
|
+
|
940
|
+
* Added support for exclusive ranges (thanks Christian Neukirchen.)
|
941
|
+
|
942
|
+
* Added sequel console for quick'n'dirty access to databases.
|
943
|
+
|
944
|
+
* Fixed small bug in Dataset#qualified_field_name for better join support.
|
945
|
+
|
946
|
+
=== 0.0.2
|
947
|
+
|
948
|
+
* Added Sequel.open as alias to Sequel.connect.
|
949
|
+
|
950
|
+
* Refactored Dataset#where_equal_condition into Dataset#where_condition, allowing arrays and ranges, e.g. posts.filter(:stamp => (3.days.ago)..(1.day.ago)), or posts.filter(:category => ['ruby', 'postgres', 'linux']).
|
951
|
+
|
952
|
+
* Added Model#[]= method for changing column values and Model#save
|
953
|
+
method for saving them.
|
954
|
+
|
955
|
+
* Added Dataset#destroy for deleting each record individually as support for models. Renamed Model#delete to Model#destroy (and Model#destroy_all) ala ActiveRecord.
|
956
|
+
|
957
|
+
* Refactored Dataset#first and Dataset#last code. These methods can now accept the number of records to fetch.
|
958
|
+
|
959
|
+
=== 0.0.1
|
960
|
+
|
961
|
+
* More documentation for Dataset.
|
962
|
+
|
963
|
+
* Renamed Database#query to Database#dataset.
|
964
|
+
|
965
|
+
* Added Dataset#insert_multiple for inserting multiple records.
|
966
|
+
|
967
|
+
* Added Dataset#<< as shorthand for inserting records.
|
968
|
+
|
969
|
+
* Added Database#<< method for executing arbitrary SQL.
|
970
|
+
|
971
|
+
* Imported Sequel code.
|