activerecord 3.0.6 → 3.0.7.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activerecord might be problematic. Click here for more details.

Files changed (74) hide show
  1. data/CHANGELOG +7 -1
  2. data/lib/active_record.rbc +1825 -0
  3. data/lib/active_record/aggregations.rbc +2173 -0
  4. data/lib/active_record/association_preload.rbc +8379 -0
  5. data/lib/active_record/associations.rbc +25180 -0
  6. data/lib/active_record/associations/association_collection.rbc +11174 -0
  7. data/lib/active_record/associations/association_proxy.rbc +4435 -0
  8. data/lib/active_record/associations/belongs_to_association.rbc +1867 -0
  9. data/lib/active_record/associations/belongs_to_polymorphic_association.rbc +1718 -0
  10. data/lib/active_record/associations/has_many_association.rbc +2553 -0
  11. data/lib/active_record/associations/has_many_through_association.rbc +2381 -0
  12. data/lib/active_record/associations/has_one_association.rbc +2919 -0
  13. data/lib/active_record/associations/through_association_scope.rbc +3411 -0
  14. data/lib/active_record/attribute_methods.rbc +1473 -0
  15. data/lib/active_record/attribute_methods/before_type_cast.rbc +700 -0
  16. data/lib/active_record/attribute_methods/dirty.rbc +1627 -0
  17. data/lib/active_record/attribute_methods/primary_key.rb +6 -0
  18. data/lib/active_record/attribute_methods/primary_key.rbc +1017 -0
  19. data/lib/active_record/attribute_methods/query.rbc +786 -0
  20. data/lib/active_record/attribute_methods/read.rb +5 -3
  21. data/lib/active_record/attribute_methods/read.rbc +2614 -0
  22. data/lib/active_record/attribute_methods/time_zone_conversion.rbc +1148 -0
  23. data/lib/active_record/attribute_methods/write.rbc +998 -0
  24. data/lib/active_record/autosave_association.rbc +4143 -0
  25. data/lib/active_record/base.rb +2 -1
  26. data/lib/active_record/base.rbc +23583 -0
  27. data/lib/active_record/callbacks.rbc +1562 -0
  28. data/lib/active_record/connection_adapters/abstract/connection_pool.rbc +5041 -0
  29. data/lib/active_record/connection_adapters/abstract/connection_specification.rbc +1752 -0
  30. data/lib/active_record/connection_adapters/abstract/database_limits.rbc +877 -0
  31. data/lib/active_record/connection_adapters/abstract/database_statements.rbc +4704 -0
  32. data/lib/active_record/connection_adapters/abstract/query_cache.rbc +1519 -0
  33. data/lib/active_record/connection_adapters/abstract/quoting.rbc +1566 -0
  34. data/lib/active_record/connection_adapters/abstract/schema_definitions.rbc +10452 -0
  35. data/lib/active_record/connection_adapters/abstract/schema_statements.rbc +6987 -0
  36. data/lib/active_record/connection_adapters/abstract_adapter.rbc +2890 -0
  37. data/lib/active_record/connection_adapters/postgresql_adapter.rbc +16913 -0
  38. data/lib/active_record/connection_adapters/sqlite3_adapter.rbc +1265 -0
  39. data/lib/active_record/connection_adapters/sqlite_adapter.rbc +0 -0
  40. data/lib/active_record/counter_cache.rbc +1191 -0
  41. data/lib/active_record/dynamic_finder_match.rbc +1091 -0
  42. data/lib/active_record/dynamic_scope_match.rbc +514 -0
  43. data/lib/active_record/errors.rbc +1077 -0
  44. data/lib/active_record/locking/optimistic.rbc +2281 -0
  45. data/lib/active_record/locking/pessimistic.rbc +384 -0
  46. data/lib/active_record/log_subscriber.rbc +1055 -0
  47. data/lib/active_record/migration.rbc +8513 -0
  48. data/lib/active_record/named_scope.rbc +1347 -0
  49. data/lib/active_record/nested_attributes.rb +1 -0
  50. data/lib/active_record/nested_attributes.rbc +3599 -0
  51. data/lib/active_record/observer.rbc +941 -0
  52. data/lib/active_record/persistence.rbc +3631 -0
  53. data/lib/active_record/query_cache.rbc +760 -0
  54. data/lib/active_record/railtie.rbc +2109 -0
  55. data/lib/active_record/railties/controller_runtime.rbc +838 -0
  56. data/lib/active_record/reflection.rbc +6897 -0
  57. data/lib/active_record/relation.rbc +6006 -0
  58. data/lib/active_record/relation/batches.rb +1 -1
  59. data/lib/active_record/relation/batches.rbc +1078 -0
  60. data/lib/active_record/relation/calculations.rbc +4012 -0
  61. data/lib/active_record/relation/finder_methods.rb +14 -6
  62. data/lib/active_record/relation/finder_methods.rbc +5264 -0
  63. data/lib/active_record/relation/query_methods.rbc +6458 -0
  64. data/lib/active_record/relation/spawn_methods.rbc +3034 -0
  65. data/lib/active_record/serialization.rbc +1302 -0
  66. data/lib/active_record/serializers/xml_serializer.rbc +1866 -0
  67. data/lib/active_record/timestamp.rbc +1354 -0
  68. data/lib/active_record/transactions.rbc +3348 -0
  69. data/lib/active_record/validations.rbc +1597 -0
  70. data/lib/active_record/validations/associated.rbc +681 -0
  71. data/lib/active_record/validations/uniqueness.rbc +1803 -0
  72. data/lib/active_record/version.rb +2 -2
  73. data/lib/active_record/version.rbc +295 -0
  74. metadata +89 -16
@@ -16,6 +16,11 @@ module ActiveRecord
16
16
  reset_primary_key
17
17
  end
18
18
 
19
+ # Returns a quoted version of the primary key name, used to construct SQL statements.
20
+ def quoted_primary_key
21
+ @quoted_primary_key ||= connection.quote_column_name(primary_key)
22
+ end
23
+
19
24
  def reset_primary_key #:nodoc:
20
25
  key = get_primary_key(base_class.name)
21
26
  set_primary_key(key)
@@ -41,6 +46,7 @@ module ActiveRecord
41
46
  # set_primary_key "sysid"
42
47
  # end
43
48
  def set_primary_key(value = nil, &block)
49
+ @quoted_primary_key = nil
44
50
  define_attr_method :primary_key, value, &block
45
51
  end
46
52
  alias :primary_key= :set_primary_key
@@ -0,0 +1,1017 @@
1
+ !RBIX
2
+ 12079494195756429234
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 28
13
+ 99
14
+ 7
15
+ 0
16
+ 65
17
+ 49
18
+ 1
19
+ 2
20
+ 13
21
+ 99
22
+ 12
23
+ 7
24
+ 2
25
+ 12
26
+ 7
27
+ 3
28
+ 12
29
+ 65
30
+ 12
31
+ 49
32
+ 4
33
+ 4
34
+ 15
35
+ 49
36
+ 2
37
+ 0
38
+ 15
39
+ 2
40
+ 11
41
+ I
42
+ 6
43
+ I
44
+ 0
45
+ I
46
+ 0
47
+ I
48
+ 0
49
+ n
50
+ p
51
+ 5
52
+ x
53
+ 12
54
+ ActiveRecord
55
+ x
56
+ 11
57
+ open_module
58
+ x
59
+ 15
60
+ __module_init__
61
+ M
62
+ 1
63
+ n
64
+ n
65
+ x
66
+ 12
67
+ ActiveRecord
68
+ i
69
+ 28
70
+ 5
71
+ 66
72
+ 99
73
+ 7
74
+ 0
75
+ 65
76
+ 49
77
+ 1
78
+ 2
79
+ 13
80
+ 99
81
+ 12
82
+ 7
83
+ 2
84
+ 12
85
+ 7
86
+ 3
87
+ 12
88
+ 65
89
+ 12
90
+ 49
91
+ 4
92
+ 4
93
+ 15
94
+ 49
95
+ 2
96
+ 0
97
+ 11
98
+ I
99
+ 6
100
+ I
101
+ 0
102
+ I
103
+ 0
104
+ I
105
+ 0
106
+ n
107
+ p
108
+ 5
109
+ x
110
+ 16
111
+ AttributeMethods
112
+ x
113
+ 11
114
+ open_module
115
+ x
116
+ 15
117
+ __module_init__
118
+ M
119
+ 1
120
+ n
121
+ n
122
+ x
123
+ 16
124
+ AttributeMethods
125
+ i
126
+ 28
127
+ 5
128
+ 66
129
+ 99
130
+ 7
131
+ 0
132
+ 65
133
+ 49
134
+ 1
135
+ 2
136
+ 13
137
+ 99
138
+ 12
139
+ 7
140
+ 2
141
+ 12
142
+ 7
143
+ 3
144
+ 12
145
+ 65
146
+ 12
147
+ 49
148
+ 4
149
+ 4
150
+ 15
151
+ 49
152
+ 2
153
+ 0
154
+ 11
155
+ I
156
+ 6
157
+ I
158
+ 0
159
+ I
160
+ 0
161
+ I
162
+ 0
163
+ n
164
+ p
165
+ 5
166
+ x
167
+ 10
168
+ PrimaryKey
169
+ x
170
+ 11
171
+ open_module
172
+ x
173
+ 15
174
+ __module_init__
175
+ M
176
+ 1
177
+ n
178
+ n
179
+ x
180
+ 10
181
+ PrimaryKey
182
+ i
183
+ 53
184
+ 5
185
+ 66
186
+ 5
187
+ 45
188
+ 0
189
+ 1
190
+ 43
191
+ 2
192
+ 47
193
+ 49
194
+ 3
195
+ 1
196
+ 15
197
+ 99
198
+ 7
199
+ 4
200
+ 7
201
+ 5
202
+ 65
203
+ 67
204
+ 49
205
+ 6
206
+ 0
207
+ 49
208
+ 7
209
+ 4
210
+ 15
211
+ 99
212
+ 7
213
+ 8
214
+ 65
215
+ 49
216
+ 9
217
+ 2
218
+ 13
219
+ 99
220
+ 12
221
+ 7
222
+ 10
223
+ 12
224
+ 7
225
+ 11
226
+ 12
227
+ 65
228
+ 12
229
+ 49
230
+ 12
231
+ 4
232
+ 15
233
+ 49
234
+ 10
235
+ 0
236
+ 11
237
+ I
238
+ 6
239
+ I
240
+ 0
241
+ I
242
+ 0
243
+ I
244
+ 0
245
+ n
246
+ p
247
+ 13
248
+ x
249
+ 13
250
+ ActiveSupport
251
+ n
252
+ x
253
+ 7
254
+ Concern
255
+ x
256
+ 6
257
+ extend
258
+ x
259
+ 6
260
+ to_key
261
+ M
262
+ 1
263
+ n
264
+ n
265
+ x
266
+ 6
267
+ to_key
268
+ i
269
+ 16
270
+ 5
271
+ 47
272
+ 49
273
+ 0
274
+ 0
275
+ 9
276
+ 10
277
+ 1
278
+ 8
279
+ 15
280
+ 5
281
+ 48
282
+ 1
283
+ 35
284
+ 1
285
+ 11
286
+ I
287
+ 1
288
+ I
289
+ 0
290
+ I
291
+ 0
292
+ I
293
+ 0
294
+ n
295
+ p
296
+ 2
297
+ x
298
+ 11
299
+ new_record?
300
+ x
301
+ 2
302
+ id
303
+ p
304
+ 5
305
+ I
306
+ -1
307
+ I
308
+ 8
309
+ I
310
+ 0
311
+ I
312
+ 9
313
+ I
314
+ 10
315
+ x
316
+ 100
317
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
318
+ p
319
+ 0
320
+ x
321
+ 17
322
+ method_visibility
323
+ x
324
+ 15
325
+ add_defn_method
326
+ x
327
+ 12
328
+ ClassMethods
329
+ x
330
+ 11
331
+ open_module
332
+ x
333
+ 15
334
+ __module_init__
335
+ M
336
+ 1
337
+ n
338
+ n
339
+ x
340
+ 12
341
+ ClassMethods
342
+ i
343
+ 82
344
+ 5
345
+ 66
346
+ 99
347
+ 7
348
+ 0
349
+ 7
350
+ 1
351
+ 65
352
+ 67
353
+ 49
354
+ 2
355
+ 0
356
+ 49
357
+ 3
358
+ 4
359
+ 15
360
+ 99
361
+ 7
362
+ 4
363
+ 7
364
+ 5
365
+ 65
366
+ 67
367
+ 49
368
+ 2
369
+ 0
370
+ 49
371
+ 3
372
+ 4
373
+ 15
374
+ 99
375
+ 7
376
+ 6
377
+ 7
378
+ 7
379
+ 65
380
+ 67
381
+ 49
382
+ 2
383
+ 0
384
+ 49
385
+ 3
386
+ 4
387
+ 15
388
+ 99
389
+ 7
390
+ 8
391
+ 7
392
+ 9
393
+ 65
394
+ 67
395
+ 49
396
+ 2
397
+ 0
398
+ 49
399
+ 3
400
+ 4
401
+ 15
402
+ 99
403
+ 7
404
+ 10
405
+ 7
406
+ 11
407
+ 65
408
+ 67
409
+ 49
410
+ 2
411
+ 0
412
+ 49
413
+ 3
414
+ 4
415
+ 15
416
+ 65
417
+ 7
418
+ 12
419
+ 7
420
+ 10
421
+ 47
422
+ 49
423
+ 13
424
+ 2
425
+ 11
426
+ I
427
+ 5
428
+ I
429
+ 0
430
+ I
431
+ 0
432
+ I
433
+ 0
434
+ n
435
+ p
436
+ 14
437
+ x
438
+ 11
439
+ primary_key
440
+ M
441
+ 1
442
+ n
443
+ n
444
+ x
445
+ 11
446
+ primary_key
447
+ i
448
+ 4
449
+ 5
450
+ 48
451
+ 0
452
+ 11
453
+ I
454
+ 1
455
+ I
456
+ 0
457
+ I
458
+ 0
459
+ I
460
+ 0
461
+ n
462
+ p
463
+ 1
464
+ x
465
+ 17
466
+ reset_primary_key
467
+ p
468
+ 5
469
+ I
470
+ -1
471
+ I
472
+ f
473
+ I
474
+ 0
475
+ I
476
+ 10
477
+ I
478
+ 4
479
+ x
480
+ 100
481
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
482
+ p
483
+ 0
484
+ x
485
+ 17
486
+ method_visibility
487
+ x
488
+ 15
489
+ add_defn_method
490
+ x
491
+ 18
492
+ quoted_primary_key
493
+ M
494
+ 1
495
+ n
496
+ n
497
+ x
498
+ 18
499
+ quoted_primary_key
500
+ i
501
+ 18
502
+ 39
503
+ 0
504
+ 13
505
+ 10
506
+ 17
507
+ 15
508
+ 5
509
+ 48
510
+ 1
511
+ 5
512
+ 48
513
+ 2
514
+ 49
515
+ 3
516
+ 1
517
+ 38
518
+ 0
519
+ 11
520
+ I
521
+ 2
522
+ I
523
+ 0
524
+ I
525
+ 0
526
+ I
527
+ 0
528
+ n
529
+ p
530
+ 4
531
+ x
532
+ 19
533
+ @quoted_primary_key
534
+ x
535
+ 10
536
+ connection
537
+ x
538
+ 11
539
+ primary_key
540
+ x
541
+ 17
542
+ quote_column_name
543
+ p
544
+ 5
545
+ I
546
+ -1
547
+ I
548
+ 14
549
+ I
550
+ 0
551
+ I
552
+ 15
553
+ I
554
+ 12
555
+ x
556
+ 100
557
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
558
+ p
559
+ 0
560
+ x
561
+ 17
562
+ reset_primary_key
563
+ M
564
+ 1
565
+ n
566
+ n
567
+ x
568
+ 17
569
+ reset_primary_key
570
+ i
571
+ 25
572
+ 5
573
+ 5
574
+ 48
575
+ 0
576
+ 49
577
+ 1
578
+ 0
579
+ 47
580
+ 49
581
+ 2
582
+ 1
583
+ 19
584
+ 0
585
+ 15
586
+ 5
587
+ 20
588
+ 0
589
+ 47
590
+ 49
591
+ 3
592
+ 1
593
+ 15
594
+ 20
595
+ 0
596
+ 11
597
+ I
598
+ 3
599
+ I
600
+ 1
601
+ I
602
+ 0
603
+ I
604
+ 0
605
+ n
606
+ p
607
+ 4
608
+ x
609
+ 10
610
+ base_class
611
+ x
612
+ 4
613
+ name
614
+ x
615
+ 15
616
+ get_primary_key
617
+ x
618
+ 15
619
+ set_primary_key
620
+ p
621
+ 9
622
+ I
623
+ -1
624
+ I
625
+ 18
626
+ I
627
+ 0
628
+ I
629
+ 19
630
+ I
631
+ e
632
+ I
633
+ 1a
634
+ I
635
+ 16
636
+ I
637
+ 1b
638
+ I
639
+ 19
640
+ x
641
+ 100
642
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
643
+ p
644
+ 1
645
+ x
646
+ 3
647
+ key
648
+ x
649
+ 15
650
+ get_primary_key
651
+ M
652
+ 1
653
+ n
654
+ n
655
+ x
656
+ 15
657
+ get_primary_key
658
+ i
659
+ 60
660
+ 7
661
+ 0
662
+ 64
663
+ 19
664
+ 1
665
+ 15
666
+ 5
667
+ 48
668
+ 1
669
+ 13
670
+ 7
671
+ 2
672
+ 12
673
+ 49
674
+ 3
675
+ 1
676
+ 9
677
+ 32
678
+ 15
679
+ 20
680
+ 0
681
+ 49
682
+ 4
683
+ 0
684
+ 3
685
+ 49
686
+ 5
687
+ 1
688
+ 19
689
+ 1
690
+ 8
691
+ 56
692
+ 13
693
+ 7
694
+ 6
695
+ 12
696
+ 49
697
+ 3
698
+ 1
699
+ 9
700
+ 54
701
+ 15
702
+ 20
703
+ 0
704
+ 49
705
+ 4
706
+ 0
707
+ 49
708
+ 5
709
+ 0
710
+ 19
711
+ 1
712
+ 8
713
+ 56
714
+ 15
715
+ 1
716
+ 15
717
+ 20
718
+ 1
719
+ 11
720
+ I
721
+ 5
722
+ I
723
+ 2
724
+ I
725
+ 1
726
+ I
727
+ 1
728
+ n
729
+ p
730
+ 7
731
+ s
732
+ 2
733
+ id
734
+ x
735
+ 23
736
+ primary_key_prefix_type
737
+ x
738
+ 10
739
+ table_name
740
+ x
741
+ 3
742
+ ===
743
+ x
744
+ 4
745
+ to_s
746
+ x
747
+ 11
748
+ foreign_key
749
+ x
750
+ 26
751
+ table_name_with_underscore
752
+ p
753
+ 19
754
+ I
755
+ -1
756
+ I
757
+ 1e
758
+ I
759
+ 0
760
+ I
761
+ 1f
762
+ I
763
+ 6
764
+ I
765
+ 20
766
+ I
767
+ 9
768
+ I
769
+ 21
770
+ I
771
+ 13
772
+ I
773
+ 22
774
+ I
775
+ 20
776
+ I
777
+ 23
778
+ I
779
+ 2a
780
+ I
781
+ 24
782
+ I
783
+ 37
784
+ I
785
+ 20
786
+ I
787
+ 39
788
+ I
789
+ 26
790
+ I
791
+ 3c
792
+ x
793
+ 100
794
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
795
+ p
796
+ 2
797
+ x
798
+ 9
799
+ base_name
800
+ x
801
+ 3
802
+ key
803
+ x
804
+ 15
805
+ set_primary_key
806
+ M
807
+ 1
808
+ n
809
+ n
810
+ x
811
+ 15
812
+ set_primary_key
813
+ i
814
+ 39
815
+ 23
816
+ 0
817
+ 10
818
+ 8
819
+ 1
820
+ 19
821
+ 0
822
+ 15
823
+ 95
824
+ 19
825
+ 1
826
+ 15
827
+ 1
828
+ 38
829
+ 0
830
+ 15
831
+ 5
832
+ 7
833
+ 1
834
+ 20
835
+ 0
836
+ 20
837
+ 1
838
+ 13
839
+ 70
840
+ 10
841
+ 34
842
+ 44
843
+ 43
844
+ 2
845
+ 12
846
+ 49
847
+ 3
848
+ 1
849
+ 47
850
+ 50
851
+ 4
852
+ 2
853
+ 11
854
+ I
855
+ 7
856
+ I
857
+ 2
858
+ I
859
+ 0
860
+ I
861
+ 1
862
+ n
863
+ p
864
+ 5
865
+ x
866
+ 19
867
+ @quoted_primary_key
868
+ x
869
+ 11
870
+ primary_key
871
+ x
872
+ 4
873
+ Proc
874
+ x
875
+ 14
876
+ __from_block__
877
+ x
878
+ 18
879
+ define_attr_method
880
+ p
881
+ 7
882
+ I
883
+ -1
884
+ I
885
+ 30
886
+ I
887
+ c
888
+ I
889
+ 31
890
+ I
891
+ 10
892
+ I
893
+ 32
894
+ I
895
+ 27
896
+ x
897
+ 100
898
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
899
+ p
900
+ 2
901
+ x
902
+ 5
903
+ value
904
+ x
905
+ 5
906
+ block
907
+ x
908
+ 12
909
+ primary_key=
910
+ x
911
+ 12
912
+ alias_method
913
+ p
914
+ 13
915
+ I
916
+ 2
917
+ I
918
+ f
919
+ I
920
+ 10
921
+ I
922
+ 14
923
+ I
924
+ 1e
925
+ I
926
+ 18
927
+ I
928
+ 2c
929
+ I
930
+ 1e
931
+ I
932
+ 3a
933
+ I
934
+ 30
935
+ I
936
+ 48
937
+ I
938
+ 34
939
+ I
940
+ 52
941
+ x
942
+ 100
943
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
944
+ p
945
+ 0
946
+ x
947
+ 13
948
+ attach_method
949
+ p
950
+ 7
951
+ I
952
+ 2
953
+ I
954
+ 4
955
+ I
956
+ d
957
+ I
958
+ 8
959
+ I
960
+ 1b
961
+ I
962
+ c
963
+ I
964
+ 35
965
+ x
966
+ 100
967
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
968
+ p
969
+ 0
970
+ x
971
+ 13
972
+ attach_method
973
+ p
974
+ 3
975
+ I
976
+ 2
977
+ I
978
+ 3
979
+ I
980
+ 1c
981
+ x
982
+ 100
983
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
984
+ p
985
+ 0
986
+ x
987
+ 13
988
+ attach_method
989
+ p
990
+ 3
991
+ I
992
+ 2
993
+ I
994
+ 2
995
+ I
996
+ 1c
997
+ x
998
+ 100
999
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
1000
+ p
1001
+ 0
1002
+ x
1003
+ 13
1004
+ attach_method
1005
+ p
1006
+ 3
1007
+ I
1008
+ 0
1009
+ I
1010
+ 1
1011
+ I
1012
+ 1c
1013
+ x
1014
+ 100
1015
+ /Users/santiago/WyeWorks/Projs/rails/activerecord/lib/active_record/attribute_methods/primary_key.rb
1016
+ p
1017
+ 0