has_many_booleans 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +7 -6
- data/Rakefile +2 -2
- data/lib/has_many_booleans.rb +3 -2
- data/test/debug.log +241 -0
- data/test/has_many_booleans_plugin.sqlite3 +0 -0
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
== ActiveRecord plugin: has_many_booleans
|
2
2
|
<em>has_many_booleans creates virtual boolean attributes for a model.
|
3
|
-
When the object gets saved, the plugin transforms all attributes into a single integer, using a {bitset}[http://
|
3
|
+
When the object gets saved, the plugin transforms all attributes into a single integer, using a {bitset}[http://rbjl.net/2-storing-an-array-of-indices-in-an-integer]. So you can easily add new attributes without changing the database structure.</em>
|
4
4
|
|
5
5
|
|
6
6
|
=== Setup
|
7
7
|
Install the plugin with
|
8
|
-
* Rails 2: <tt>script/plugin install
|
9
|
-
* Rails 3: <tt>rails
|
10
|
-
* Or as a gem: <tt>gem install has_many_booleans</tt>
|
8
|
+
* Rails 2: <tt>script/plugin install git://github.com/janlelis/has_many_booleans</tt>
|
9
|
+
* Rails 3: <tt>rails plugin install git://github.com/janlelis/has_many_booleans</tt>
|
10
|
+
* Or as a gem: <tt>gem install has_many_booleans</tt> (and add it to your environment.rb/Gemfile)
|
11
11
|
|
12
12
|
Add an integer field with the name +booleans+ to your the model's database table.
|
13
13
|
|
@@ -67,8 +67,9 @@ The plugin also generates a <tt>.true</tt> and a <tt>.false</tt> scope for the m
|
|
67
67
|
Model.true(:name).true(:password) # :name and :password must be true
|
68
68
|
|
69
69
|
=== Further reading
|
70
|
-
For a more detailed description of the options, see the rdoc for the
|
70
|
+
For a more detailed description of the options, see the rdoc for the has_many_booleans method.
|
71
|
+
|
72
|
+
Code available at http://github.com/janlelis/has_many_booleans
|
71
73
|
|
72
74
|
Copyright (c) 2010 Jan Lelis, http://rbjl.net, released under the MIT license
|
73
|
-
available at http://github.com/janlelis/has_many_booleans
|
74
75
|
|
data/Rakefile
CHANGED
@@ -27,10 +27,10 @@ end
|
|
27
27
|
PKG_FILES = FileList[ '[a-zA-Z]*', 'lib/**/*', 'rails/**/*', 'test/**/*' ]
|
28
28
|
spec = Gem::Specification.new do |s|
|
29
29
|
s.name = "has_many_booleans"
|
30
|
-
s.version = "0.9"
|
30
|
+
s.version = "0.9.1"
|
31
31
|
s.author = "Jan Lelis"
|
32
32
|
s.email = "mail@janlelis.de"
|
33
|
-
s.homepage = "http://
|
33
|
+
s.homepage = "http://github.com/janlelis/has_many_booleans"
|
34
34
|
s.platform = Gem::Platform::RUBY
|
35
35
|
s.summary = "This Rails plugin/gem allows you to generate virtual boolean attributes, which get saved in the database as a single bitset integer"
|
36
36
|
s.files = PKG_FILES.to_a
|
data/lib/has_many_booleans.rb
CHANGED
@@ -330,6 +330,7 @@ end
|
|
330
330
|
# activate instance methods
|
331
331
|
ActiveRecord::Base.send :include, HasManyBooleans
|
332
332
|
|
333
|
-
#
|
334
|
-
#
|
333
|
+
#Code available at http://github.com/janlelis/has_many_booleans
|
334
|
+
#
|
335
|
+
#Copyright (c) 2010 Jan Lelis, http://rbjl.net, released under the MIT license
|
335
336
|
|
data/test/debug.log
CHANGED
@@ -708,3 +708,244 @@
|
|
708
708
|
[4;36;1mHasManyBooleansTest::Scope Load (0.4ms)[0m [0;1mSELECT * FROM "scopes" WHERE ((booleans & 4) AND (booleans & 2)) [0m
|
709
709
|
[4;35;1mHasManyBooleansTest::ValidateTest Create (8.3ms)[0m [0mINSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)[0m
|
710
710
|
[4;36;1mHasManyBooleansTest::ValidateTest Create (2.3ms)[0m [0;1mINSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)[0m
|
711
|
+
[4;36;1mSQL (0.9ms)[0m [0;1mselect sqlite_version(*)[0m
|
712
|
+
[4;35;1mSQL (7.1ms)[0m [0m SELECT name
|
713
|
+
FROM sqlite_master
|
714
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
715
|
+
[0m
|
716
|
+
[4;36;1mSQL (142.0ms)[0m [0;1mDROP TABLE "appends"[0m
|
717
|
+
[4;35;1mSQL (111.4ms)[0m [0mCREATE TABLE "appends" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
718
|
+
[4;36;1mSQL (4.1ms)[0m [0;1m SELECT name
|
719
|
+
FROM sqlite_master
|
720
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
721
|
+
[0m
|
722
|
+
[4;35;1mSQL (189.7ms)[0m [0mDROP TABLE "append_nils"[0m
|
723
|
+
[4;36;1mSQL (96.0ms)[0m [0;1mCREATE TABLE "append_nils" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
724
|
+
[4;35;1mSQL (3.9ms)[0m [0m SELECT name
|
725
|
+
FROM sqlite_master
|
726
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
727
|
+
[0m
|
728
|
+
[4;36;1mSQL (94.2ms)[0m [0;1mDROP TABLE "defaults"[0m
|
729
|
+
[4;35;1mSQL (102.0ms)[0m [0mCREATE TABLE "defaults" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
730
|
+
[4;36;1mSQL (3.7ms)[0m [0;1m SELECT name
|
731
|
+
FROM sqlite_master
|
732
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
733
|
+
[0m
|
734
|
+
[4;35;1mSQL (108.7ms)[0m [0mDROP TABLE "many_options"[0m
|
735
|
+
[4;36;1mSQL (104.5ms)[0m [0;1mCREATE TABLE "many_options" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
736
|
+
[4;35;1mSQL (4.3ms)[0m [0m SELECT name
|
737
|
+
FROM sqlite_master
|
738
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
739
|
+
[0m
|
740
|
+
[4;36;1mSQL (107.7ms)[0m [0;1mDROP TABLE "no_options"[0m
|
741
|
+
[4;35;1mSQL (104.2ms)[0m [0mCREATE TABLE "no_options" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
742
|
+
[4;36;1mSQL (3.7ms)[0m [0;1m SELECT name
|
743
|
+
FROM sqlite_master
|
744
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
745
|
+
[0m
|
746
|
+
[4;35;1mSQL (96.8ms)[0m [0mDROP TABLE "hmbs"[0m
|
747
|
+
[4;36;1mSQL (104.3ms)[0m [0;1mCREATE TABLE "hmbs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
748
|
+
[4;35;1mSQL (4.2ms)[0m [0m SELECT name
|
749
|
+
FROM sqlite_master
|
750
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
751
|
+
[0m
|
752
|
+
[4;36;1mSQL (107.4ms)[0m [0;1mDROP TABLE "suffix_nones"[0m
|
753
|
+
[4;35;1mSQL (105.1ms)[0m [0mCREATE TABLE "suffix_nones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
754
|
+
[4;36;1mSQL (3.9ms)[0m [0;1m SELECT name
|
755
|
+
FROM sqlite_master
|
756
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
757
|
+
[0m
|
758
|
+
[4;35;1mSQL (111.9ms)[0m [0mDROP TABLE "suffix_question_onlies"[0m
|
759
|
+
[4;36;1mSQL (111.7ms)[0m [0;1mCREATE TABLE "suffix_question_onlies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
760
|
+
[4;35;1mSQL (3.9ms)[0m [0m SELECT name
|
761
|
+
FROM sqlite_master
|
762
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
763
|
+
[0m
|
764
|
+
[4;36;1mSQL (110.3ms)[0m [0;1mDROP TABLE "suffix_equal_onlies"[0m
|
765
|
+
[4;35;1mSQL (106.9ms)[0m [0mCREATE TABLE "suffix_equal_onlies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
766
|
+
[4;36;1mSQL (4.3ms)[0m [0;1m SELECT name
|
767
|
+
FROM sqlite_master
|
768
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
769
|
+
[0m
|
770
|
+
[4;35;1mSQL (95.9ms)[0m [0mDROP TABLE "suffix_exclamation_onlies"[0m
|
771
|
+
[4;36;1mSQL (100.9ms)[0m [0;1mCREATE TABLE "suffix_exclamation_onlies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
772
|
+
[4;35;1mSQL (3.7ms)[0m [0m SELECT name
|
773
|
+
FROM sqlite_master
|
774
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
775
|
+
[0m
|
776
|
+
[4;36;1mSQL (107.6ms)[0m [0;1mDROP TABLE "selves"[0m
|
777
|
+
[4;35;1mSQL (98.9ms)[0m [0mCREATE TABLE "selves" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
778
|
+
[4;36;1mSQL (3.9ms)[0m [0;1m SELECT name
|
779
|
+
FROM sqlite_master
|
780
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
781
|
+
[0m
|
782
|
+
[4;35;1mSQL (105.6ms)[0m [0mDROP TABLE "self_append_nils"[0m
|
783
|
+
[4;36;1mSQL (106.6ms)[0m [0;1mCREATE TABLE "self_append_nils" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
784
|
+
[4;35;1mSQL (4.7ms)[0m [0m SELECT name
|
785
|
+
FROM sqlite_master
|
786
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
787
|
+
[0m
|
788
|
+
[4;36;1mSQL (103.1ms)[0m [0;1mDROP TABLE "self_names"[0m
|
789
|
+
[4;35;1mSQL (98.5ms)[0m [0mCREATE TABLE "self_names" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
790
|
+
[4;36;1mSQL (4.1ms)[0m [0;1m SELECT name
|
791
|
+
FROM sqlite_master
|
792
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
793
|
+
[0m
|
794
|
+
[4;35;1mSQL (113.9ms)[0m [0mDROP TABLE "ar_callbacks"[0m
|
795
|
+
[4;36;1mSQL (97.8ms)[0m [0;1mCREATE TABLE "ar_callbacks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
796
|
+
[4;35;1mSQL (3.5ms)[0m [0m SELECT name
|
797
|
+
FROM sqlite_master
|
798
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
799
|
+
[0m
|
800
|
+
[4;36;1mSQL (103.8ms)[0m [0;1mDROP TABLE "lazy_falses"[0m
|
801
|
+
[4;35;1mSQL (109.8ms)[0m [0mCREATE TABLE "lazy_falses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
802
|
+
[4;36;1mSQL (3.7ms)[0m [0;1m SELECT name
|
803
|
+
FROM sqlite_master
|
804
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
805
|
+
[0m
|
806
|
+
[4;35;1mSQL (113.0ms)[0m [0mDROP TABLE "booleans_as_hashes"[0m
|
807
|
+
[4;36;1mSQL (109.5ms)[0m [0;1mCREATE TABLE "booleans_as_hashes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
808
|
+
[4;35;1mSQL (3.1ms)[0m [0m SELECT name
|
809
|
+
FROM sqlite_master
|
810
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
811
|
+
[0m
|
812
|
+
[4;36;1mSQL (104.1ms)[0m [0;1mDROP TABLE "single_hashes"[0m
|
813
|
+
[4;35;1mSQL (98.2ms)[0m [0mCREATE TABLE "single_hashes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
814
|
+
[4;36;1mSQL (4.0ms)[0m [0;1m SELECT name
|
815
|
+
FROM sqlite_master
|
816
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
817
|
+
[0m
|
818
|
+
[4;35;1mSQL (106.6ms)[0m [0mDROP TABLE "validate_tests"[0m
|
819
|
+
[4;36;1mSQL (94.6ms)[0m [0;1mCREATE TABLE "validate_tests" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
820
|
+
[4;35;1mSQL (3.9ms)[0m [0m SELECT name
|
821
|
+
FROM sqlite_master
|
822
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
823
|
+
[0m
|
824
|
+
[4;36;1mSQL (105.5ms)[0m [0;1mDROP TABLE "false_values"[0m
|
825
|
+
[4;35;1mSQL (100.5ms)[0m [0mCREATE TABLE "false_values" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
826
|
+
[4;36;1mSQL (3.9ms)[0m [0;1m SELECT name
|
827
|
+
FROM sqlite_master
|
828
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
829
|
+
[0m
|
830
|
+
[4;35;1mSQL (100.7ms)[0m [0mDROP TABLE "scopes"[0m
|
831
|
+
[4;36;1mSQL (95.4ms)[0m [0;1mCREATE TABLE "scopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) [0m
|
832
|
+
[4;35;1mSQL (4.8ms)[0m [0m SELECT name
|
833
|
+
FROM sqlite_master
|
834
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
835
|
+
[0m
|
836
|
+
[4;36;1mSQL (107.5ms)[0m [0;1mDROP TABLE "fields"[0m
|
837
|
+
[4;35;1mSQL (109.2ms)[0m [0mCREATE TABLE "fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "bools" integer) [0m
|
838
|
+
[4;36;1mSQL (4.3ms)[0m [0;1m SELECT name
|
839
|
+
FROM sqlite_master
|
840
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
841
|
+
[0m
|
842
|
+
[4;35;1mSQL (0.8ms)[0m [0mSELECT version FROM "schema_migrations"[0m
|
843
|
+
[4;36;1mHasManyBooleansTest::ArCallback Create (2.6ms)[0m [0;1mINSERT INTO "ar_callbacks" ("name", "booleans") VALUES('matz', 0)[0m
|
844
|
+
[4;35;1mHasManyBooleansTest::AppendNil Create (2.2ms)[0m [0mINSERT INTO "append_nils" ("name", "booleans") VALUES('Yukihiro', 0)[0m
|
845
|
+
[4;36;1mHasManyBooleansTest::AppendNil Load (0.9ms)[0m [0;1mSELECT * FROM "append_nils" ORDER BY append_nils.id DESC LIMIT 1[0m
|
846
|
+
[4;35;1mHasManyBooleansTest::Default Create (2.1ms)[0m [0mINSERT INTO "defaults" ("name", "booleans") VALUES(NULL, 4)[0m
|
847
|
+
[4;36;1mHasManyBooleansTest::Default Load (1.5ms)[0m [0;1mSELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1[0m
|
848
|
+
[4;35;1mHasManyBooleansTest::Default Update (2.9ms)[0m [0mUPDATE "defaults" SET "booleans" = 6 WHERE "id" = 1[0m
|
849
|
+
[4;36;1mHasManyBooleansTest::Default Load (1.2ms)[0m [0;1mSELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1[0m
|
850
|
+
[4;35;1mHasManyBooleansTest::Default Update (1.6ms)[0m [0mUPDATE "defaults" SET "booleans" = 2 WHERE "id" = 1[0m
|
851
|
+
[4;36;1mHasManyBooleansTest::Default Load (1.2ms)[0m [0;1mSELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1[0m
|
852
|
+
[4;35;1mHasManyBooleansTest::Default Update (3.3ms)[0m [0mUPDATE "defaults" SET "booleans" = 6 WHERE "id" = 1[0m
|
853
|
+
[4;36;1mHasManyBooleansTest::Default Load (1.5ms)[0m [0;1mSELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1[0m
|
854
|
+
[4;35;1mHasManyBooleansTest::ManyOption Create (2.1ms)[0m [0mINSERT INTO "many_options" ("name", "booleans") VALUES(NULL, 4)[0m
|
855
|
+
[4;36;1mHasManyBooleansTest::ManyOption Load (1.1ms)[0m [0;1mSELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1[0m
|
856
|
+
[4;35;1mHasManyBooleansTest::ManyOption Update (3.9ms)[0m [0mUPDATE "many_options" SET "booleans" = 20 WHERE "id" = 1[0m
|
857
|
+
[4;36;1mHasManyBooleansTest::ManyOption Load (2.1ms)[0m [0;1mSELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1[0m
|
858
|
+
[4;35;1mHasManyBooleansTest::ManyOption Load (0.8ms)[0m [0mSELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1[0m
|
859
|
+
[4;36;1mHasManyBooleansTest::ManyOption Update (1.6ms)[0m [0;1mUPDATE "many_options" SET "booleans" = 52 WHERE "id" = 1[0m
|
860
|
+
[4;35;1mHasManyBooleansTest::ManyOption Load (1.2ms)[0m [0mSELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1[0m
|
861
|
+
[4;36;1mHasManyBooleansTest::NoOption Create (4.1ms)[0m [0;1mINSERT INTO "no_options" ("name", "booleans") VALUES(NULL, 0)[0m
|
862
|
+
[4;35;1mHasManyBooleansTest::NoOption Load (1.9ms)[0m [0mSELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1[0m
|
863
|
+
[4;36;1mHasManyBooleansTest::NoOption Update (3.0ms)[0m [0;1mUPDATE "no_options" SET "booleans" = 2 WHERE "id" = 1[0m
|
864
|
+
[4;35;1mHasManyBooleansTest::NoOption Load (1.2ms)[0m [0mSELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1[0m
|
865
|
+
[4;36;1mHasManyBooleansTest::NoOption Load (0.5ms)[0m [0;1mSELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1[0m
|
866
|
+
[4;35;1mHasManyBooleansTest::NoOption Update (1.5ms)[0m [0mUPDATE "no_options" SET "booleans" = 6 WHERE "id" = 1[0m
|
867
|
+
[4;36;1mHasManyBooleansTest::NoOption Load (0.7ms)[0m [0;1mSELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1[0m
|
868
|
+
[4;35;1mHasManyBooleansTest::BooleansAsHash Create (3.5ms)[0m [0mINSERT INTO "booleans_as_hashes" ("name", "booleans") VALUES(NULL, 0)[0m
|
869
|
+
[4;36;1mHasManyBooleansTest::BooleansAsHash Load (1.6ms)[0m [0;1mSELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1[0m
|
870
|
+
[4;35;1mHasManyBooleansTest::BooleansAsHash Update (1.6ms)[0m [0mUPDATE "booleans_as_hashes" SET "booleans" = 8388608 WHERE "id" = 1[0m
|
871
|
+
[4;36;1mHasManyBooleansTest::BooleansAsHash Load (1.4ms)[0m [0;1mSELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1[0m
|
872
|
+
[4;35;1mHasManyBooleansTest::BooleansAsHash Load (1.0ms)[0m [0mSELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1[0m
|
873
|
+
[4;36;1mHasManyBooleansTest::BooleansAsHash Update (1.9ms)[0m [0;1mUPDATE "booleans_as_hashes" SET "booleans" = 8388672 WHERE "id" = 1[0m
|
874
|
+
[4;35;1mHasManyBooleansTest::BooleansAsHash Load (0.8ms)[0m [0mSELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1[0m
|
875
|
+
[4;36;1mHasManyBooleansTest::Hmb Create (3.1ms)[0m [0;1mINSERT INTO "hmbs" ("name", "booleans") VALUES(NULL, 0)[0m
|
876
|
+
[4;35;1mHasManyBooleansTest::Hmb Load (1.3ms)[0m [0mSELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1[0m
|
877
|
+
[4;36;1mHasManyBooleansTest::Hmb Update (1.6ms)[0m [0;1mUPDATE "hmbs" SET "booleans" = 2 WHERE "id" = 1[0m
|
878
|
+
[4;35;1mHasManyBooleansTest::Hmb Load (1.2ms)[0m [0mSELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1[0m
|
879
|
+
[4;36;1mHasManyBooleansTest::Hmb Load (1.0ms)[0m [0;1mSELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1[0m
|
880
|
+
[4;35;1mHasManyBooleansTest::Hmb Update (1.6ms)[0m [0mUPDATE "hmbs" SET "booleans" = 6 WHERE "id" = 1[0m
|
881
|
+
[4;36;1mHasManyBooleansTest::Hmb Load (1.2ms)[0m [0;1mSELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1[0m
|
882
|
+
[4;35;1mHasManyBooleansTest::Append Create (3.7ms)[0m [0mINSERT INTO "appends" ("name", "booleans") VALUES(NULL, 0)[0m
|
883
|
+
[4;36;1mHasManyBooleansTest::Append Load (0.7ms)[0m [0;1mSELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1[0m
|
884
|
+
[4;35;1mHasManyBooleansTest::Append Update (1.5ms)[0m [0mUPDATE "appends" SET "booleans" = 2 WHERE "id" = 1[0m
|
885
|
+
[4;36;1mHasManyBooleansTest::Append Load (1.1ms)[0m [0;1mSELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1[0m
|
886
|
+
[4;35;1mHasManyBooleansTest::Append Load (1.0ms)[0m [0mSELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1[0m
|
887
|
+
[4;36;1mHasManyBooleansTest::Append Update (2.9ms)[0m [0;1mUPDATE "appends" SET "booleans" = 6 WHERE "id" = 1[0m
|
888
|
+
[4;35;1mHasManyBooleansTest::Append Load (1.5ms)[0m [0mSELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1[0m
|
889
|
+
[4;36;1mHasManyBooleansTest::Field Create (4.2ms)[0m [0;1mINSERT INTO "fields" ("name", "bools") VALUES(NULL, 0)[0m
|
890
|
+
[4;35;1mHasManyBooleansTest::Field Load (1.1ms)[0m [0mSELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1[0m
|
891
|
+
[4;36;1mHasManyBooleansTest::Field Update (1.6ms)[0m [0;1mUPDATE "fields" SET "bools" = 2 WHERE "id" = 1[0m
|
892
|
+
[4;35;1mHasManyBooleansTest::Field Load (1.3ms)[0m [0mSELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1[0m
|
893
|
+
[4;36;1mHasManyBooleansTest::Field Load (0.9ms)[0m [0;1mSELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1[0m
|
894
|
+
[4;35;1mHasManyBooleansTest::Field Update (1.6ms)[0m [0mUPDATE "fields" SET "bools" = 6 WHERE "id" = 1[0m
|
895
|
+
[4;36;1mHasManyBooleansTest::Field Load (1.2ms)[0m [0;1mSELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1[0m
|
896
|
+
[4;35;1mHasManyBooleansTest::SuffixEqualOnly Create (2.9ms)[0m [0mINSERT INTO "suffix_equal_onlies" ("name", "booleans") VALUES(NULL, 0)[0m
|
897
|
+
[4;36;1mHasManyBooleansTest::SuffixEqualOnly Load (1.2ms)[0m [0;1mSELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1[0m
|
898
|
+
[4;35;1mHasManyBooleansTest::SuffixEqualOnly Update (1.6ms)[0m [0mUPDATE "suffix_equal_onlies" SET "booleans" = 2 WHERE "id" = 1[0m
|
899
|
+
[4;36;1mHasManyBooleansTest::SuffixEqualOnly Load (1.2ms)[0m [0;1mSELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1[0m
|
900
|
+
[4;35;1mHasManyBooleansTest::SuffixEqualOnly Load (0.9ms)[0m [0mSELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1[0m
|
901
|
+
[4;36;1mHasManyBooleansTest::SuffixEqualOnly Update (2.1ms)[0m [0;1mUPDATE "suffix_equal_onlies" SET "booleans" = 6 WHERE "id" = 1[0m
|
902
|
+
[4;35;1mHasManyBooleansTest::SuffixEqualOnly Load (1.3ms)[0m [0mSELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1[0m
|
903
|
+
[4;36;1mHasManyBooleansTest::Self Create (4.5ms)[0m [0;1mINSERT INTO "selves" ("name", "booleans") VALUES(NULL, 0)[0m
|
904
|
+
[4;35;1mHasManyBooleansTest::Self Load (1.3ms)[0m [0mSELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1[0m
|
905
|
+
[4;36;1mHasManyBooleansTest::Self Update (1.9ms)[0m [0;1mUPDATE "selves" SET "booleans" = 2 WHERE "id" = 1[0m
|
906
|
+
[4;35;1mHasManyBooleansTest::Self Load (1.2ms)[0m [0mSELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1[0m
|
907
|
+
[4;36;1mHasManyBooleansTest::Self Load (0.6ms)[0m [0;1mSELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1[0m
|
908
|
+
[4;35;1mHasManyBooleansTest::Self Update (1.7ms)[0m [0mUPDATE "selves" SET "booleans" = 6 WHERE "id" = 1[0m
|
909
|
+
[4;36;1mHasManyBooleansTest::Self Load (1.2ms)[0m [0;1mSELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1[0m
|
910
|
+
[4;35;1mHasManyBooleansTest::SelfName Create (4.6ms)[0m [0mINSERT INTO "self_names" ("name", "booleans") VALUES(NULL, 1)[0m
|
911
|
+
[4;36;1mHasManyBooleansTest::SelfName Load (1.3ms)[0m [0;1mSELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1[0m
|
912
|
+
[4;35;1mHasManyBooleansTest::SelfName Update (2.9ms)[0m [0mUPDATE "self_names" SET "booleans" = 3 WHERE "id" = 1[0m
|
913
|
+
[4;36;1mHasManyBooleansTest::SelfName Load (1.2ms)[0m [0;1mSELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1[0m
|
914
|
+
[4;35;1mHasManyBooleansTest::SelfName Load (0.9ms)[0m [0mSELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1[0m
|
915
|
+
[4;36;1mHasManyBooleansTest::SelfName Update (2.9ms)[0m [0;1mUPDATE "self_names" SET "booleans" = 7 WHERE "id" = 1[0m
|
916
|
+
[4;35;1mHasManyBooleansTest::SelfName Load (1.1ms)[0m [0mSELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1[0m
|
917
|
+
[4;36;1mHasManyBooleansTest::ArCallback Create (3.9ms)[0m [0;1mINSERT INTO "ar_callbacks" ("name", "booleans") VALUES('matz', 0)[0m
|
918
|
+
[4;35;1mHasManyBooleansTest::ArCallback Load (1.3ms)[0m [0mSELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1[0m
|
919
|
+
[4;36;1mHasManyBooleansTest::ArCallback Update (3.3ms)[0m [0;1mUPDATE "ar_callbacks" SET "booleans" = 2 WHERE "id" = 2[0m
|
920
|
+
[4;35;1mHasManyBooleansTest::ArCallback Load (1.1ms)[0m [0mSELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1[0m
|
921
|
+
[4;36;1mHasManyBooleansTest::ArCallback Load (1.1ms)[0m [0;1mSELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1[0m
|
922
|
+
[4;35;1mHasManyBooleansTest::ArCallback Update (1.6ms)[0m [0mUPDATE "ar_callbacks" SET "booleans" = 6 WHERE "id" = 2[0m
|
923
|
+
[4;36;1mHasManyBooleansTest::ArCallback Load (1.2ms)[0m [0;1mSELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1[0m
|
924
|
+
[4;35;1mHasManyBooleansTest::LazyFalse Create (4.2ms)[0m [0mINSERT INTO "lazy_falses" ("name", "booleans") VALUES(NULL, 0)[0m
|
925
|
+
[4;36;1mHasManyBooleansTest::LazyFalse Load (1.1ms)[0m [0;1mSELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1[0m
|
926
|
+
[4;35;1mHasManyBooleansTest::LazyFalse Update (3.1ms)[0m [0mUPDATE "lazy_falses" SET "booleans" = 2 WHERE "id" = 1[0m
|
927
|
+
[4;36;1mHasManyBooleansTest::LazyFalse Load (1.2ms)[0m [0;1mSELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1[0m
|
928
|
+
[4;35;1mHasManyBooleansTest::LazyFalse Load (1.0ms)[0m [0mSELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1[0m
|
929
|
+
[4;36;1mHasManyBooleansTest::LazyFalse Update (1.7ms)[0m [0;1mUPDATE "lazy_falses" SET "booleans" = 6 WHERE "id" = 1[0m
|
930
|
+
[4;35;1mHasManyBooleansTest::LazyFalse Load (1.5ms)[0m [0mSELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1[0m
|
931
|
+
[4;36;1mHasManyBooleansTest::FalseValue Create (2.9ms)[0m [0;1mINSERT INTO "false_values" ("name", "booleans") VALUES(NULL, 0)[0m
|
932
|
+
[4;35;1mHasManyBooleansTest::FalseValue Load (1.1ms)[0m [0mSELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1[0m
|
933
|
+
[4;36;1mHasManyBooleansTest::FalseValue Update (3.0ms)[0m [0;1mUPDATE "false_values" SET "booleans" = 2 WHERE "id" = 1[0m
|
934
|
+
[4;35;1mHasManyBooleansTest::FalseValue Load (1.2ms)[0m [0mSELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1[0m
|
935
|
+
[4;36;1mHasManyBooleansTest::FalseValue Load (1.1ms)[0m [0;1mSELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1[0m
|
936
|
+
[4;35;1mHasManyBooleansTest::FalseValue Update (3.0ms)[0m [0mUPDATE "false_values" SET "booleans" = 6 WHERE "id" = 1[0m
|
937
|
+
[4;36;1mHasManyBooleansTest::FalseValue Load (1.3ms)[0m [0;1mSELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1[0m
|
938
|
+
[4;35;1mHasManyBooleansTest::Scope Create (2.2ms)[0m [0mINSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 0)[0m
|
939
|
+
[4;36;1mHasManyBooleansTest::Scope Create (2.7ms)[0m [0;1mINSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 5)[0m
|
940
|
+
[4;35;1mHasManyBooleansTest::Scope Create (4.3ms)[0m [0mINSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 1)[0m
|
941
|
+
[4;36;1mHasManyBooleansTest::Scope Create (4.6ms)[0m [0;1mINSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 4)[0m
|
942
|
+
[4;35;1mHasManyBooleansTest::Scope Create (3.5ms)[0m [0mINSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 2)[0m
|
943
|
+
[4;36;1mHasManyBooleansTest::Scope Load (1.3ms)[0m [0;1mSELECT * FROM "scopes" WHERE ("scopes"."id" = 5) [0m
|
944
|
+
[4;35;1mHasManyBooleansTest::Scope Load (1.0ms)[0m [0mSELECT * FROM "scopes" WHERE (booleans & 2) [0m
|
945
|
+
[4;36;1mHasManyBooleansTest::Scope Load (0.9ms)[0m [0;1mSELECT * FROM "scopes" WHERE ("scopes"."id" IN (1,4,5)) [0m
|
946
|
+
[4;35;1mHasManyBooleansTest::Scope Load (0.8ms)[0m [0mSELECT * FROM "scopes" WHERE (booleans & 1 < 1) [0m
|
947
|
+
[4;36;1mHasManyBooleansTest::Scope Load (0.8ms)[0m [0;1mSELECT * FROM "scopes" WHERE ("scopes"."id" IN (2,4,5)) [0m
|
948
|
+
[4;35;1mHasManyBooleansTest::Scope Load (0.9ms)[0m [0mSELECT * FROM "scopes" WHERE (booleans & 2 or booleans & 4) [0m
|
949
|
+
[4;36;1mHasManyBooleansTest::Scope Load (0.4ms)[0m [0;1mSELECT * FROM "scopes" WHERE ((booleans & 4) AND (booleans & 2)) [0m
|
950
|
+
[4;35;1mHasManyBooleansTest::ValidateTest Create (2.1ms)[0m [0mINSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)[0m
|
951
|
+
[4;36;1mHasManyBooleansTest::ValidateTest Create (5.8ms)[0m [0;1mINSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)[0m
|
Binary file
|
metadata
CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
|
8
|
+
- 1
|
9
|
+
version: 0.9.1
|
9
10
|
platform: ruby
|
10
11
|
authors:
|
11
12
|
- Jan Lelis
|
@@ -42,7 +43,7 @@ files:
|
|
42
43
|
- test/has_many_booleans_plugin.sqlite3
|
43
44
|
- test/database.yml
|
44
45
|
has_rdoc: true
|
45
|
-
homepage: http://
|
46
|
+
homepage: http://github.com/janlelis/has_many_booleans
|
46
47
|
licenses: []
|
47
48
|
|
48
49
|
post_install_message:
|