skip_activerecord_callbacks 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/README.md +27 -0
- data/lib/skip_activerecord_callbacks/model_helpers.rb +3 -2
- data/lib/skip_activerecord_callbacks/version.rb +1 -1
- data/test/dummy/log/test.log +897 -0
- data/test/skip_activerecord_callbacks_test.rb +64 -38
- metadata +19 -19
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -14,6 +14,7 @@ little while longer. I'm sorry.
|
|
14
14
|
## Usage
|
15
15
|
|
16
16
|
product.update_without_callbacks
|
17
|
+
product.destroy_without_callbacks
|
17
18
|
|
18
19
|
## Implementation
|
19
20
|
|
@@ -24,6 +25,9 @@ which case it deletes itself, replaces the original `run_callbacks`
|
|
24
25
|
method, and yields to the given block to do the work of saving the
|
25
26
|
model.
|
26
27
|
|
28
|
+
The `destroy_without_callbacks` method does the same ninja editing for
|
29
|
+
`destroy`.
|
30
|
+
|
27
31
|
## Seriously?
|
28
32
|
|
29
33
|
Yeah, I know. But it seems to work just fine. The undecoration is the first
|
@@ -33,3 +37,26 @@ the only way this could not work is if ActiveRecord failed to call the
|
|
33
37
|
method twice in a save for some reason. Or if ActiveSupport stopped
|
34
38
|
implementing callbacks with the `run_callbacks method`, but the tests
|
35
39
|
should catch that.
|
40
|
+
|
41
|
+
## What Could Possibly Go Wrong?
|
42
|
+
|
43
|
+
`destroy_without_callbacks` seems to behave a little bit differently
|
44
|
+
than the Rails 2 version. In Rails 2, it would apparently not call the
|
45
|
+
model's `destroy` method if it happened to define one. In the project
|
46
|
+
for which I wrote this, we had a guard protecting models from being
|
47
|
+
destroyed except via `destroy_without_callbacks`:
|
48
|
+
|
49
|
+
def destroy
|
50
|
+
raise "hell"
|
51
|
+
end
|
52
|
+
|
53
|
+
This is trivially fixable by moving the guard to a `before_destroy`
|
54
|
+
callback, or more correctly by moving the persistent object lifecycle
|
55
|
+
concerns up into a service model.
|
56
|
+
|
57
|
+
`update_without_callbacks` used to save the model without updating its
|
58
|
+
dirty attribute changes hash. This is no longer the case. I regard the
|
59
|
+
new behavior as more correct, to the extent that a hack built on a pile
|
60
|
+
of hacks can be considered to exhibit correctness, but if it's
|
61
|
+
problematic, it would be relatively easy to clone the changes hash and
|
62
|
+
push it back afterwards.
|
@@ -11,18 +11,19 @@ module SkipActiveRecordCallbacks
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
# TODO: The cut and paste is sad
|
15
14
|
class ModelDecorator
|
16
15
|
def self.override_run_callbacks_to_skip_save_once(model)
|
17
16
|
class << model
|
18
17
|
alias :run_callbacks_orig :run_callbacks
|
19
18
|
def run_callbacks(name, &block)
|
20
|
-
if name == :
|
19
|
+
if name == :update || name == :create
|
21
20
|
class << self
|
22
21
|
undef :run_callbacks
|
23
22
|
alias :run_callbacks :run_callbacks_orig
|
24
23
|
end
|
25
24
|
yield
|
25
|
+
elsif name == :save
|
26
|
+
yield
|
26
27
|
else
|
27
28
|
run_callbacks_orig(name, &block)
|
28
29
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -524,3 +524,900 @@ undefined local variable or method `action' for #<Product id: nil, name: "foo">
|
|
524
524
|
[1m[35m (0.0ms)[0m begin transaction
|
525
525
|
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
526
526
|
[1m[35m (0.0ms)[0m commit transaction
|
527
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
528
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
529
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
530
|
+
[1m[35m (0.0ms)[0m begin transaction
|
531
|
+
[1m[36mSQL (2.9ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
532
|
+
[1m[35m (0.0ms)[0m commit transaction
|
533
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
534
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
535
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
536
|
+
[1m[35m (0.0ms)[0m begin transaction
|
537
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 2[0m
|
538
|
+
[1m[35m (0.0ms)[0m commit transaction
|
539
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
540
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
541
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
542
|
+
[1m[35m (0.0ms)[0m begin transaction
|
543
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "foo"]]
|
544
|
+
[1m[35m (0.0ms)[0m commit transaction
|
545
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
546
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 4
|
547
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
548
|
+
[1m[35m (0.0ms)[0m begin transaction
|
549
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
550
|
+
[1m[35m (0.0ms)[0m commit transaction
|
551
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
552
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "products" WHERE "products"."id" = ? [["id", 5]]
|
553
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
554
|
+
[1m[35m (0.0ms)[0m begin transaction
|
555
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
556
|
+
[1m[35m (0.0ms)[0m commit transaction
|
557
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
558
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
559
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
560
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
561
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
562
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
563
|
+
[1m[35m (0.0ms)[0m begin transaction
|
564
|
+
[1m[36mSQL (3.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
565
|
+
[1m[35m (0.0ms)[0m commit transaction
|
566
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
567
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
568
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
569
|
+
[1m[35m (0.0ms)[0m begin transaction
|
570
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
571
|
+
[1m[35m (0.0ms)[0m commit transaction
|
572
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
573
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
574
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
575
|
+
[1m[35m (0.0ms)[0m begin transaction
|
576
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 3[0m
|
577
|
+
[1m[35m (0.0ms)[0m commit transaction
|
578
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
579
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
580
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
581
|
+
[1m[35m (0.0ms)[0m begin transaction
|
582
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
583
|
+
[1m[35m (0.0ms)[0m commit transaction
|
584
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
585
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "products" WHERE "products"."id" = ? [["id", 5]]
|
586
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
587
|
+
[1m[35m (0.0ms)[0m begin transaction
|
588
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
589
|
+
[1m[35m (0.0ms)[0m commit transaction
|
590
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
591
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
592
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
593
|
+
[1m[35m (0.0ms)[0m begin transaction
|
594
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 7[0m
|
595
|
+
[1m[35m (0.0ms)[0m commit transaction
|
596
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
597
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
598
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
599
|
+
[1m[35m (0.0ms)[0m begin transaction
|
600
|
+
[1m[36mSQL (2.2ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
601
|
+
[1m[35m (0.0ms)[0m commit transaction
|
602
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
603
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
604
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
605
|
+
[1m[35m (0.0ms)[0m begin transaction
|
606
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
607
|
+
[1m[35m (0.0ms)[0m commit transaction
|
608
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
609
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
610
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
611
|
+
[1m[35m (0.0ms)[0m begin transaction
|
612
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
613
|
+
[1m[35m (0.0ms)[0m commit transaction
|
614
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
615
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 4
|
616
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
617
|
+
[1m[35m (0.0ms)[0m begin transaction
|
618
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
619
|
+
[1m[35m (0.0ms)[0m commit transaction
|
620
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
621
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
622
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
623
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
624
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
625
|
+
[1m[35m (0.0ms)[0m begin transaction
|
626
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
627
|
+
[1m[35m (0.0ms)[0m commit transaction
|
628
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
629
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
630
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
631
|
+
[1m[35m (0.0ms)[0m begin transaction
|
632
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
633
|
+
[1m[35m (0.0ms)[0m commit transaction
|
634
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
635
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
636
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
637
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
638
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
639
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
640
|
+
[1m[35m (0.0ms)[0m begin transaction
|
641
|
+
[1m[36mSQL (2.4ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
642
|
+
[1m[35m (0.0ms)[0m commit transaction
|
643
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
644
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
645
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
646
|
+
[1m[35m (0.0ms)[0m begin transaction
|
647
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
648
|
+
[1m[35m (0.0ms)[0m commit transaction
|
649
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
650
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
651
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
652
|
+
[1m[35m (0.0ms)[0m begin transaction
|
653
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
654
|
+
[1m[35m (0.0ms)[0m commit transaction
|
655
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
656
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 4
|
657
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
658
|
+
[1m[35m (0.0ms)[0m begin transaction
|
659
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
660
|
+
[1m[35m (0.0ms)[0m commit transaction
|
661
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
662
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
663
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
664
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
665
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
666
|
+
[1m[35m (0.0ms)[0m begin transaction
|
667
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
668
|
+
[1m[35m (0.0ms)[0m commit transaction
|
669
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
670
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
671
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
672
|
+
[1m[35m (0.0ms)[0m begin transaction
|
673
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
674
|
+
[1m[35m (0.0ms)[0m commit transaction
|
675
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
676
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
677
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
678
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
679
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
680
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
681
|
+
[1m[35m (0.0ms)[0m begin transaction
|
682
|
+
[1m[36mSQL (1.5ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
683
|
+
[1m[35m (0.0ms)[0m commit transaction
|
684
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
685
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
686
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
687
|
+
[1m[35m (0.0ms)[0m begin transaction
|
688
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
689
|
+
[1m[35m (0.0ms)[0m commit transaction
|
690
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
691
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
692
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
693
|
+
[1m[35m (0.0ms)[0m begin transaction
|
694
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
695
|
+
[1m[35m (0.0ms)[0m commit transaction
|
696
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
697
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 4
|
698
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
699
|
+
[1m[35m (0.0ms)[0m begin transaction
|
700
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
701
|
+
[1m[35m (0.0ms)[0m commit transaction
|
702
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
703
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
704
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
705
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
706
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
707
|
+
[1m[35m (0.0ms)[0m begin transaction
|
708
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
709
|
+
[1m[35m (0.0ms)[0m commit transaction
|
710
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
711
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
712
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
713
|
+
[1m[35m (0.0ms)[0m begin transaction
|
714
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
715
|
+
[1m[35m (0.0ms)[0m commit transaction
|
716
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
717
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
718
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
719
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
720
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
721
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
722
|
+
[1m[35m (0.0ms)[0m begin transaction
|
723
|
+
[1m[36mSQL (9.9ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
724
|
+
[1m[35m (0.1ms)[0m commit transaction
|
725
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
726
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
727
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
728
|
+
[1m[35m (0.0ms)[0m begin transaction
|
729
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
730
|
+
[1m[35m (0.0ms)[0m commit transaction
|
731
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
732
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
733
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
734
|
+
[1m[35m (0.0ms)[0m begin transaction
|
735
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
736
|
+
[1m[35m (0.0ms)[0m commit transaction
|
737
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
738
|
+
[1m[35m (0.1ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 4
|
739
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
740
|
+
[1m[35m (0.0ms)[0m begin transaction
|
741
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
742
|
+
[1m[35m (0.0ms)[0m commit transaction
|
743
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
744
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
745
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
746
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
747
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
748
|
+
[1m[35m (0.0ms)[0m begin transaction
|
749
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
750
|
+
[1m[35m (0.0ms)[0m commit transaction
|
751
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
752
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
753
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
754
|
+
[1m[35m (0.0ms)[0m begin transaction
|
755
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
756
|
+
[1m[35m (0.0ms)[0m commit transaction
|
757
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
758
|
+
[1m[35m (0.1ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
759
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
760
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
761
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
762
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
763
|
+
[1m[35m (0.0ms)[0m begin transaction
|
764
|
+
[1m[36mSQL (1.6ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
765
|
+
[1m[35m (0.0ms)[0m commit transaction
|
766
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
767
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
768
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
769
|
+
[1m[35m (0.0ms)[0m begin transaction
|
770
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
771
|
+
[1m[35m (0.0ms)[0m commit transaction
|
772
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
773
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
774
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
775
|
+
[1m[35m (0.0ms)[0m begin transaction
|
776
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
777
|
+
[1m[35m (0.0ms)[0m commit transaction
|
778
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
779
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 4
|
780
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
781
|
+
[1m[35m (0.0ms)[0m begin transaction
|
782
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
783
|
+
[1m[35m (0.0ms)[0m commit transaction
|
784
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
785
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
786
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
787
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
788
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
789
|
+
[1m[35m (0.0ms)[0m begin transaction
|
790
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
791
|
+
[1m[35m (0.0ms)[0m commit transaction
|
792
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
793
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
794
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
795
|
+
[1m[35m (0.0ms)[0m begin transaction
|
796
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 7[0m
|
797
|
+
[1m[35m (0.0ms)[0m commit transaction
|
798
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
799
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
800
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
801
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
802
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
803
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
804
|
+
[1m[35m (0.0ms)[0m begin transaction
|
805
|
+
[1m[36mSQL (1.5ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
806
|
+
[1m[35m (0.0ms)[0m commit transaction
|
807
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
808
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
809
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
810
|
+
[1m[35m (0.0ms)[0m begin transaction
|
811
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
812
|
+
[1m[35m (0.0ms)[0m commit transaction
|
813
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
814
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
815
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
816
|
+
[1m[35m (0.0ms)[0m begin transaction
|
817
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
818
|
+
[1m[35m (0.0ms)[0m commit transaction
|
819
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
820
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
821
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
822
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
823
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
824
|
+
[1m[35m (0.0ms)[0m begin transaction
|
825
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 5[0m
|
826
|
+
[1m[35m (0.0ms)[0m commit transaction
|
827
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
828
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
829
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
830
|
+
[1m[35m (0.0ms)[0m begin transaction
|
831
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
832
|
+
[1m[35m (0.0ms)[0m commit transaction
|
833
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
834
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
835
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
836
|
+
[1m[35m (0.0ms)[0m begin transaction
|
837
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 7[0m
|
838
|
+
[1m[35m (0.0ms)[0m commit transaction
|
839
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
840
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
841
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
842
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
843
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
844
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
845
|
+
[1m[35m (0.0ms)[0m begin transaction
|
846
|
+
[1m[36mSQL (1.5ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
847
|
+
[1m[35m (0.0ms)[0m commit transaction
|
848
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
849
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
850
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
851
|
+
[1m[35m (0.0ms)[0m begin transaction
|
852
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
853
|
+
[1m[35m (0.0ms)[0m commit transaction
|
854
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
855
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
856
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
857
|
+
[1m[35m (0.0ms)[0m begin transaction
|
858
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
859
|
+
[1m[35m (0.0ms)[0m commit transaction
|
860
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
861
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 4
|
862
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
863
|
+
[1m[35m (0.0ms)[0m begin transaction
|
864
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
865
|
+
[1m[35m (0.0ms)[0m commit transaction
|
866
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
867
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
868
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
869
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
870
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
871
|
+
[1m[35m (0.0ms)[0m begin transaction
|
872
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
873
|
+
[1m[35m (0.0ms)[0m commit transaction
|
874
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
875
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
876
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
877
|
+
[1m[35m (0.0ms)[0m begin transaction
|
878
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
879
|
+
[1m[35m (0.0ms)[0m commit transaction
|
880
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
881
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
882
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
883
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
884
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
885
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
886
|
+
[1m[35m (0.0ms)[0m begin transaction
|
887
|
+
[1m[36mSQL (1.5ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
888
|
+
[1m[35m (0.0ms)[0m commit transaction
|
889
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
890
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
891
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
892
|
+
[1m[35m (0.0ms)[0m begin transaction
|
893
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
894
|
+
[1m[35m (0.1ms)[0m begin transaction
|
895
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "foo"]]
|
896
|
+
[1m[35m (0.0ms)[0m commit transaction
|
897
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
898
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
899
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
900
|
+
[1m[35m (0.0ms)[0m begin transaction
|
901
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
902
|
+
[1m[35m (0.0ms)[0m begin transaction
|
903
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
904
|
+
[1m[35m (0.0ms)[0m commit transaction
|
905
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
906
|
+
[1m[35m (0.1ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 5
|
907
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
908
|
+
[1m[35m (0.0ms)[0m begin transaction
|
909
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
910
|
+
[1m[35m (0.0ms)[0m commit transaction
|
911
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
912
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "products" WHERE "products"."id" = ? [["id", 6]]
|
913
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
914
|
+
[1m[35m (0.0ms)[0m begin transaction
|
915
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
916
|
+
[1m[35m (0.0ms)[0m commit transaction
|
917
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
918
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
919
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
920
|
+
[1m[35m (0.0ms)[0m begin transaction
|
921
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8[0m
|
922
|
+
[1m[35m (0.0ms)[0m commit transaction
|
923
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
924
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
925
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
926
|
+
[1m[35m (0.0ms)[0m begin transaction
|
927
|
+
[1m[36mSQL (1.6ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
928
|
+
[1m[35m (0.0ms)[0m commit transaction
|
929
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
930
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
931
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
932
|
+
[1m[35m (0.0ms)[0m begin transaction
|
933
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
934
|
+
[1m[35m (0.1ms)[0m begin transaction
|
935
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "foo"]]
|
936
|
+
[1m[35m (0.0ms)[0m commit transaction
|
937
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
938
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
939
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
940
|
+
[1m[35m (0.0ms)[0m begin transaction
|
941
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
942
|
+
[1m[35m (0.0ms)[0m begin transaction
|
943
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
944
|
+
[1m[35m (0.0ms)[0m commit transaction
|
945
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
946
|
+
[1m[35m (0.1ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 5
|
947
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
948
|
+
[1m[35m (0.0ms)[0m begin transaction
|
949
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
950
|
+
[1m[35m (0.0ms)[0m commit transaction
|
951
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
952
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "products" WHERE "products"."id" = ? [["id", 6]]
|
953
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
954
|
+
[1m[35m (0.0ms)[0m begin transaction
|
955
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
956
|
+
[1m[35m (0.0ms)[0m commit transaction
|
957
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
958
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
959
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
960
|
+
[1m[35m (0.0ms)[0m begin transaction
|
961
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8[0m
|
962
|
+
[1m[35m (0.0ms)[0m commit transaction
|
963
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
964
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
965
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
966
|
+
[1m[35m (0.0ms)[0m begin transaction
|
967
|
+
[1m[36mSQL (1.6ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
968
|
+
[1m[35m (0.0ms)[0m commit transaction
|
969
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
970
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
971
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
972
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
973
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
974
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
975
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
976
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
977
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
978
|
+
[1m[35m (0.0ms)[0m begin transaction
|
979
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
980
|
+
[1m[35m (0.0ms)[0m begin transaction
|
981
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
982
|
+
[1m[35m (0.0ms)[0m commit transaction
|
983
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
984
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
985
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
986
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
987
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
988
|
+
[1m[35m (0.0ms)[0m begin transaction
|
989
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 4]]
|
990
|
+
[1m[35m (0.0ms)[0m commit transaction
|
991
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
992
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
993
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
994
|
+
[1m[35m (0.0ms)[0m begin transaction
|
995
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 5[0m
|
996
|
+
[1m[35m (0.0ms)[0m commit transaction
|
997
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
998
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
999
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1000
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1001
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1002
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1003
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1004
|
+
[1m[36mSQL (1.6ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1005
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1006
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1007
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
1008
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1009
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1010
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
1011
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1012
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1013
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
1014
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1015
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1016
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1017
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1018
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1019
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1020
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1021
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1022
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1023
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1024
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 5[0m
|
1025
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1026
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1027
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1028
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1029
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1030
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
1031
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1032
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1033
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1034
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1035
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1036
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1037
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1038
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1039
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
1040
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1041
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1042
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1043
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1044
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1045
|
+
[1m[36mSQL (1.6ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1046
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1047
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1048
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1049
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1050
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1051
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1052
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1053
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1054
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1055
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1056
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1057
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1058
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1059
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1060
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1061
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1062
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1063
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1064
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1065
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1066
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1067
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1068
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "products" WHERE "products"."id" = ? [["id", 5]]
|
1069
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1070
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1071
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1072
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1073
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1074
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1075
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1076
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1077
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 7[0m
|
1078
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1079
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1080
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1081
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1082
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1083
|
+
[1m[36mSQL (1.5ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1084
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1085
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1086
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
1087
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1088
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1089
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
1090
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1091
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1092
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
1093
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1094
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1095
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1096
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1097
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1098
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1099
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1100
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1101
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1102
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1103
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 5[0m
|
1104
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1105
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1106
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1107
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1108
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1109
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
1110
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1111
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1112
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1113
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1114
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1115
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1116
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1117
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1118
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
1119
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1120
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1121
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1122
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1123
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1124
|
+
[1m[36mSQL (1.6ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1125
|
+
[1m[35m (0.1ms)[0m commit transaction
|
1126
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1127
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
1128
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1129
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1130
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 2[0m
|
1131
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1132
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1133
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "foo"]]
|
1134
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1135
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1136
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1137
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1138
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1139
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 4
|
1140
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1141
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1142
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1143
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1144
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1145
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1146
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1147
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1148
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1149
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1150
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 6]]
|
1151
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1152
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1153
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", "bar"]]
|
1154
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1155
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1156
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", "bar"]]
|
1157
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1158
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1159
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'bar' WHERE "products"."id" = 8
|
1160
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1161
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1162
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1163
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1164
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1165
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1166
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1167
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1168
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1169
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1170
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1171
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1172
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1173
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1174
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1175
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1176
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1177
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1178
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1179
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1180
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1181
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1182
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1183
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1184
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1185
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1186
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1187
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1188
|
+
[1m[35mSQL (1.7ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1189
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1190
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1191
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1192
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1193
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1194
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1195
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1196
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1197
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1198
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1199
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1200
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1201
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1202
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1203
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1204
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1205
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1206
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1207
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1208
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1209
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1210
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1211
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1212
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1213
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1214
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1215
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1216
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1217
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1218
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1219
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1220
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1221
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1222
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1223
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 2]]
|
1224
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1225
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1226
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1227
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1228
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1229
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1230
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1231
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1232
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1233
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1234
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1235
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1236
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1237
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1238
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1239
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1240
|
+
[1m[35m (0.1ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 6
|
1241
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1242
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1243
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1244
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1245
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1246
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 7
|
1247
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1248
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1249
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1250
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1251
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1252
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 8
|
1253
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1254
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1255
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1256
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1257
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1258
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1259
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1260
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1261
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1262
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1263
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1264
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 2]]
|
1265
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1266
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1267
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1268
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1269
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1270
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1271
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1272
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1273
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1274
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1275
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1276
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1277
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1278
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1279
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1280
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1281
|
+
[1m[35m (0.1ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 6
|
1282
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1283
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1284
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1285
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1286
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1287
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 7
|
1288
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1289
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1290
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1291
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1292
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1293
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 8
|
1294
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1295
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1296
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1297
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1298
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1299
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1300
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1301
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1302
|
+
[1m[35mSQL (30.9ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1303
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1304
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1305
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 2]]
|
1306
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1307
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1308
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1309
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1310
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1311
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1312
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1313
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1314
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1315
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1316
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1317
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1318
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1319
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1320
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1321
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1322
|
+
[1m[35m (0.1ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 6
|
1323
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1324
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1325
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1326
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1327
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1328
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 7
|
1329
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1330
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1331
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1332
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1333
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1334
|
+
[1m[35m (0.0ms)[0m UPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 8
|
1335
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1336
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1337
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1338
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1339
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1340
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1341
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1342
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1343
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1344
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1345
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1346
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 2]]
|
1347
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1348
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1349
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1350
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1351
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1352
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1353
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1354
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1355
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1356
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1357
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1358
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1359
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1360
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1361
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1362
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1363
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1364
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1365
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1366
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 7[0m
|
1367
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1368
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1369
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1370
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1371
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1372
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 8[0m
|
1373
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1374
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1375
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1376
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1377
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1378
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 9[0m
|
1379
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1380
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1381
|
+
[1m[35mSQL (1.7ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1382
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1383
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1384
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 1]]
|
1385
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1386
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1387
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1388
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1389
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1390
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "products" WHERE "products"."id" = ?[0m [["id", 2]]
|
1391
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1392
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1393
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1394
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1395
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1396
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1397
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1398
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1399
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1400
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1401
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1402
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1403
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1404
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "products" ("name") VALUES (?)[0m [["name", nil]]
|
1405
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1406
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1407
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1408
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1409
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1410
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 7[0m
|
1411
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1412
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1413
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1414
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1415
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1416
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 8[0m
|
1417
|
+
[1m[35m (0.0ms)[0m commit transaction
|
1418
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1419
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "products" ("name") VALUES (?) [["name", nil]]
|
1420
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
1421
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1422
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "products" SET "name" = 'foo' WHERE "products"."id" = 9[0m
|
1423
|
+
[1m[35m (0.0ms)[0m commit transaction
|
@@ -1,74 +1,100 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class Notifier
|
4
|
+
def self.product_was_saved(product)
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.product_was_updated(product)
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.product_was_created(product)
|
11
|
+
end
|
12
|
+
|
4
13
|
def self.product_was_destroyed(product)
|
5
14
|
end
|
6
15
|
end
|
7
16
|
|
8
17
|
class Product < ActiveRecord::Base
|
9
|
-
|
18
|
+
after_save do |product|
|
19
|
+
Notifier.product_was_saved(product)
|
20
|
+
end
|
10
21
|
|
11
|
-
|
12
|
-
product
|
22
|
+
after_update do |product|
|
23
|
+
Notifier.product_was_updated(product)
|
13
24
|
end
|
14
25
|
|
15
|
-
|
16
|
-
|
26
|
+
after_create do |product|
|
27
|
+
Notifier.product_was_created(product)
|
17
28
|
end
|
18
29
|
|
19
30
|
after_destroy do |product|
|
20
|
-
|
31
|
+
Notifier.product_was_destroyed(product)
|
21
32
|
end
|
22
33
|
end
|
23
34
|
|
24
35
|
describe SkipActiverecordCallbacks do
|
25
|
-
let(:product) { Product.new
|
26
|
-
|
27
|
-
describe "normal save" do
|
28
|
-
it "sets the product name to 'Bar'" do
|
29
|
-
product.save
|
30
|
-
product.name.must_equal 'Bar'
|
31
|
-
product.new_record?.must_equal false
|
32
|
-
end
|
33
|
-
end
|
36
|
+
let(:product) { Product.new }
|
34
37
|
|
35
38
|
describe "#update_without_callbacks" do
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
39
|
+
describe "on create" do
|
40
|
+
it "saves the record" do
|
41
|
+
product.update_without_callbacks
|
42
|
+
product.new_record?.must_equal false
|
43
|
+
end
|
44
|
+
|
45
|
+
it "skips the :save callbacks" do
|
46
|
+
Notifier.expects(:product_was_saved).never
|
47
|
+
product.update_without_callbacks
|
48
|
+
end
|
49
|
+
|
50
|
+
it "skips the :create callbacks" do
|
51
|
+
Notifier.expects(:product_was_created).never
|
52
|
+
product.update_without_callbacks
|
53
|
+
end
|
40
54
|
end
|
41
55
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
56
|
+
describe "update" do
|
57
|
+
before do
|
58
|
+
product.save
|
59
|
+
product.name = 'foo'
|
60
|
+
end
|
61
|
+
|
62
|
+
it "saves the record" do
|
63
|
+
product.update_without_callbacks
|
64
|
+
product.changes.empty?.must_equal true
|
65
|
+
end
|
66
|
+
|
67
|
+
it "skips the :save callbacks" do
|
68
|
+
Notifier.expects(:product_was_saved).never
|
69
|
+
product.update_without_callbacks
|
70
|
+
end
|
71
|
+
|
72
|
+
it "skips the :update callbacks" do
|
73
|
+
Notifier.expects(:product_was_updated).never
|
74
|
+
product.update_without_callbacks
|
75
|
+
end
|
48
76
|
end
|
49
77
|
|
50
78
|
it "restores the callbacks afterwards" do
|
51
79
|
product.update_without_callbacks
|
80
|
+
Notifier.expects(:product_was_saved).with(product)
|
52
81
|
product.save
|
53
|
-
product.name.must_equal 'Bar'
|
54
82
|
end
|
55
83
|
end
|
56
84
|
|
57
|
-
describe "
|
58
|
-
|
85
|
+
describe "#destroy_without_callbacks" do
|
86
|
+
before do
|
59
87
|
product.save
|
60
|
-
DestructionNotifier.expects(:product_was_destroyed).with(product)
|
61
|
-
product.destroy
|
62
|
-
assert product.destroyed?
|
63
88
|
end
|
64
|
-
end
|
65
89
|
|
66
|
-
|
67
|
-
|
68
|
-
product.
|
69
|
-
|
90
|
+
it "destroys the model" do
|
91
|
+
product.destroy_without_callbacks
|
92
|
+
product.destroyed?.must_equal true
|
93
|
+
end
|
94
|
+
|
95
|
+
it "skips the :destroy callbacks" do
|
96
|
+
Notifier.expects(:product_was_destroyed).never
|
70
97
|
product.destroy_without_callbacks
|
71
|
-
assert product.destroyed?
|
72
98
|
end
|
73
99
|
end
|
74
100
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skip_activerecord_callbacks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Donald Ball
|
@@ -15,12 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-04-
|
18
|
+
date: 2012-04-19 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
21
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
22
|
none: false
|
25
23
|
requirements:
|
26
24
|
- - ~>
|
@@ -31,11 +29,11 @@ dependencies:
|
|
31
29
|
- 2
|
32
30
|
version: "3.2"
|
33
31
|
name: rails
|
34
|
-
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
type: :development
|
32
|
+
type: :runtime
|
37
33
|
prerelease: false
|
38
|
-
requirement:
|
34
|
+
requirement: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
37
|
none: false
|
40
38
|
requirements:
|
41
39
|
- - ">="
|
@@ -45,11 +43,11 @@ dependencies:
|
|
45
43
|
- 0
|
46
44
|
version: "0"
|
47
45
|
name: sqlite3
|
48
|
-
version_requirements: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
46
|
type: :development
|
51
47
|
prerelease: false
|
52
|
-
requirement:
|
48
|
+
requirement: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
53
51
|
none: false
|
54
52
|
requirements:
|
55
53
|
- - ">="
|
@@ -59,11 +57,11 @@ dependencies:
|
|
59
57
|
- 0
|
60
58
|
version: "0"
|
61
59
|
name: minitest
|
62
|
-
version_requirements: *id003
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
60
|
type: :development
|
65
61
|
prerelease: false
|
66
|
-
requirement:
|
62
|
+
requirement: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
67
65
|
none: false
|
68
66
|
requirements:
|
69
67
|
- - ">="
|
@@ -73,7 +71,9 @@ dependencies:
|
|
73
71
|
- 0
|
74
72
|
version: "0"
|
75
73
|
name: mocha
|
76
|
-
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
requirement: *id004
|
77
77
|
description: Provides support for the deprecated update_without_callbacks method from rails 2
|
78
78
|
email:
|
79
79
|
- donald.ball@gmail.com
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
requirements: []
|
154
154
|
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 1.8.
|
156
|
+
rubygems_version: 1.8.21
|
157
157
|
signing_key:
|
158
158
|
specification_version: 3
|
159
159
|
summary: Lets you save activerecord models without callbacks
|