lore 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +19 -0
- data/README +74 -0
- data/aspect.rb +80 -0
- data/behaviours/lockable.rb +41 -0
- data/behaviours/movable.rb +54 -0
- data/behaviours/versioned.rb +24 -0
- data/benchmark.rb +193 -0
- data/bits.rb +52 -0
- data/cache/abstract_entity_cache.rb +82 -0
- data/cache/bits.rb +22 -0
- data/cache/cacheable.rb +202 -0
- data/cache/cached_entities.rb +116 -0
- data/cache/file_index.rb +35 -0
- data/cache/mmap_entity_cache.rb +67 -0
- data/clause.rb +528 -0
- data/connection.rb +155 -0
- data/custom_functions.sql +14 -0
- data/exception/ambiguous_attribute.rb +14 -0
- data/exception/cache_exception.rb +30 -0
- data/exception/invalid_klass_parameters.rb +63 -0
- data/exception/invalid_parameter.rb +42 -0
- data/exception/unknown_typecode.rb +19 -0
- data/file_index.sql +56 -0
- data/gui/erb_template.rb +79 -0
- data/gui/erb_template_helpers.rhtml +19 -0
- data/gui/form.rb +314 -0
- data/gui/form_element.rb +676 -0
- data/gui/form_generator.rb +151 -0
- data/gui/templates/button.rhtml +2 -0
- data/gui/templates/checkbox.rhtml +3 -0
- data/gui/templates/checkbox_row.rhtml +1 -0
- data/gui/templates/file.rhtml +2 -0
- data/gui/templates/file_readonly.rhtml +3 -0
- data/gui/templates/form_element.rhtml +5 -0
- data/gui/templates/form_element_horizontal.rhtml +3 -0
- data/gui/templates/form_element_listed.rhtml +8 -0
- data/gui/templates/form_table.rhtml +3 -0
- data/gui/templates/form_table_blank.rhtml +3 -0
- data/gui/templates/form_table_horizontal.rhtml +8 -0
- data/gui/templates/password.rhtml +2 -0
- data/gui/templates/password_readonly.rhtml +3 -0
- data/gui/templates/radio.rhtml +1 -0
- data/gui/templates/radio_row.rhtml +1 -0
- data/gui/templates/select.rhtml +23 -0
- data/gui/templates/text.rhtml +2 -0
- data/gui/templates/text_readonly.rhtml +3 -0
- data/gui/templates/textarea.rhtml +3 -0
- data/gui/templates/textarea_readonly.rhtml +4 -0
- data/lore.gemspec +40 -0
- data/lore.rb +94 -0
- data/migration.rb +48 -0
- data/model.rb +139 -0
- data/model_factory.rb +202 -0
- data/model_shortcuts.rb +16 -0
- data/query_shortcuts.rb +367 -0
- data/reserved_methods.txt +3 -0
- data/result.rb +100 -0
- data/symbol.rb +58 -0
- data/table_accessor.rb +1926 -0
- data/table_deleter.rb +115 -0
- data/table_inserter.rb +168 -0
- data/table_instance.rb +384 -0
- data/table_selector.rb +314 -0
- data/table_updater.rb +155 -0
- data/test/README +31 -0
- data/test/env.rb +5 -0
- data/test/lore_test.log +8218 -0
- data/test/model.rb +142 -0
- data/test/prepare.rb +37 -0
- data/test/tc_aspect.rb +58 -0
- data/test/tc_cache.rb +80 -0
- data/test/tc_clause.rb +104 -0
- data/test/tc_deep_inheritance.rb +49 -0
- data/test/tc_factory.rb +57 -0
- data/test/tc_filter.rb +37 -0
- data/test/tc_form.rb +32 -0
- data/test/tc_model.rb +86 -0
- data/test/tc_prepare.rb +45 -0
- data/test/tc_refined_query.rb +88 -0
- data/test/tc_table_accessor.rb +265 -0
- data/test/test.log +181 -0
- data/test/test_db.sql +400 -0
- data/test/ts_lore.rb +49 -0
- data/types.rb +55 -0
- data/validation/message.rb +60 -0
- data/validation/parameter_validator.rb +104 -0
- data/validation/reason.rb +54 -0
- data/validation/type_validator.rb +91 -0
- data/validation.rb +65 -0
- metadata +170 -0
data/symbol.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require('lore/clause')
|
2
|
+
|
3
|
+
class Symbol
|
4
|
+
|
5
|
+
def intern
|
6
|
+
self
|
7
|
+
end
|
8
|
+
|
9
|
+
# Do not overload Symbol#==
|
10
|
+
def eq(other)
|
11
|
+
Lore::Clause.new(self.to_s)==(other)
|
12
|
+
end
|
13
|
+
alias is eq
|
14
|
+
def >=(other)
|
15
|
+
Lore::Clause.new(self.to_s)>=(other)
|
16
|
+
end
|
17
|
+
def <=(other)
|
18
|
+
Lore::Clause.new(self.to_s)<=(other)
|
19
|
+
end
|
20
|
+
def >(other)
|
21
|
+
Lore::Clause.new(self.to_s)>(other)
|
22
|
+
end
|
23
|
+
def <(other)
|
24
|
+
Lore::Clause.new(self.to_s)<=(other)
|
25
|
+
end
|
26
|
+
def <=>(other)
|
27
|
+
Lore::Clause.new(self.to_s)<=>(other)
|
28
|
+
end
|
29
|
+
def not(other)
|
30
|
+
Lore::Clause.new(self.to_s)<=>(other)
|
31
|
+
end
|
32
|
+
def like(other)
|
33
|
+
Lore::Clause.new(self.to_s).like(other)
|
34
|
+
end
|
35
|
+
def ilike(other)
|
36
|
+
Lore::Clause.new(self.to_s).ilike(other)
|
37
|
+
end
|
38
|
+
def has_element(other)
|
39
|
+
Lore::Clause.new(self.to_s).has_element(other)
|
40
|
+
end
|
41
|
+
def has_element_like(other)
|
42
|
+
Lore::Clause.new(self.to_s).has_element_like(other)
|
43
|
+
end
|
44
|
+
def has_element_ilike(other)
|
45
|
+
Lore::Clause.new(self.to_s).has_element_ilike(other)
|
46
|
+
end
|
47
|
+
def in(other)
|
48
|
+
Lore::Clause.new(self.to_s).in(other)
|
49
|
+
end
|
50
|
+
def not_in(other)
|
51
|
+
Lore::Clause.new(self.to_s).not_in(other)
|
52
|
+
end
|
53
|
+
def between(s,e)
|
54
|
+
Lore::Clause.new(self.to_s).between(s,e)
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|