Class: App42::Storage::QueryBuilder::Operator
- Inherits:
-
App42Response
- Object
- App42Response
- App42::Storage::QueryBuilder::Operator
- Defined in:
- lib/storage/QueryBuilder.rb
Constant Summary collapse
- EQUALS =
"\$eq"
- NOT_EQUALS =
"\$ne"
- GREATER_THAN =
"\$gt"
- LESS_THAN =
"\$lt"
- GREATER_THAN_EQUALTO =
"\$gte"
- LESS_THAN_EQUALTO =
"\$lte"
- LIKE =
"\$lk"
- AND =
"\$and"
- OR =
"\$or"
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from App42Response
#isResponseSuccess, #strResponse, #totalRecords
Instance Method Summary collapse
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
14 15 16 |
# File 'lib/storage/QueryBuilder.rb', line 14 def value @value end |
Instance Method Details
#enum(string) ⇒ Object
45 46 47 |
# File 'lib/storage/QueryBuilder.rb', line 45 def enum(string) return Operator.const_get(string) end |
#isAvailable(string) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/storage/QueryBuilder.rb', line 49 def isAvailable(string) if(string == "\$eq") return "EQUALS" elsif(string == "\$ne") return "NOT_EQUALS"; elsif(string == "\$gt") return "GREATER_THAN" elsif(string == "\$lt") return "LESS_THAN" elsif(string == "\$gte") return "GREATER_THAN_EQUALTO" elsif(string == "\$lte") return "LESS_THAN_EQUALTO" elsif(string == "\$lk") return "LIKE" elsif(string == "\$and") return "AND" elsif(string == "\$or") return "OR"; else return nil end end |