class
LDAP::Request::Filter
- LDAP::Request::Filter
- Reference
- Object
Defined in:
ldap/request/filter.crConstant Summary
-
ESCAPE_RE =
Regex.new(String.build do |str| str << "[" ESCAPES.keys.each do |e| str << (Regex.escape(e)) end str << "]" end) -
Compiled character class regexp using the keys from the above hash.
-
ESCAPES =
{"\u0000" => "\\00", "*" => "\\2A", "(" => "\\28", ")" => "\\29", "\\" => "\\5C"}
Constructors
Class Method Summary
-
.approx(object : String, value, escaped : Bool = false)
approxMatch [8] — like an equality assertion, but the server applies its approximate-matching rule for the attribute (RFC 4511 §4.5.1.7.6).
- .begins(attribute : String, value)
-
.conjoin(left : BER, right : BER)
Logical AND [0] of two filters (see also
#&). -
.conjoin(left : Filter, right : Filter)
Logical AND [0] of two filters (see also
#&). - .contains(attribute : String, value)
-
.disjoin(left : BER, right : BER)
Logical OR [1] of two filters (see also
#|). -
.disjoin(left : Filter, right : Filter)
Logical OR [1] of two filters (see also
#|). - .ends(attribute : String, value)
- .equal(object : String, value, escaped : Bool = false)
-
.escape(string : String) : String
Escape a string for use in an LDAP filter
-
.extensible(value, *, attribute : String | Nil = nil, rule : String | Nil = nil, dn_attributes : Bool = false)
extensibleMatch [9] MatchingRuleAssertion (RFC 4511 §4.5.1.7.7): { matchingRule [1] OPT, type [2] OPT, matchValue [3], dnAttributes [4] BOOLEAN DEFAULT FALSE } At least one of attribute (type) or rule (matchingRule) must be present.
- .greater_than(object : String, value)
- .less_than(object : String, value)
- .negate(filter : Filter)
- .negate(filter : BER)
- .not_equal(object : String, value, escaped : Bool = false)
- .present?(attribute : String)
- .unescape(value : String, escaped : Bool = false) : String
Instance Method Summary
-
#&(other)
Joins two or more filters so that all conditions must be true.
-
#|(other)
Selects entries where either the left or right side are true.
-
#~
Negates a filter.
- #operation : Type
- #to_ber : ASN1::BER
- #to_slice
Constructor Detail
Class Method Detail
approxMatch [8] — like an equality assertion, but the server applies its approximate-matching rule for the attribute (RFC 4511 §4.5.1.7.6).
Logical AND [0] of two filters (see also #&).
Renamed from the misleading join before 1.0.
Logical AND [0] of two filters (see also #&).
Renamed from the misleading join before 1.0.
Logical OR [1] of two filters (see also #|).
Renamed from the misleading intersect before 1.0.
Logical OR [1] of two filters (see also #|).
Renamed from the misleading intersect before 1.0.
extensibleMatch [9] MatchingRuleAssertion (RFC 4511 §4.5.1.7.7): { matchingRule [1] OPT, type [2] OPT, matchValue [3], dnAttributes [4] BOOLEAN DEFAULT FALSE } At least one of attribute (type) or rule (matchingRule) must be present. value is a literal assertion value (the parser unescapes before calling).