class LDAP::Request::Filter

Defined in:

ldap/request/filter.cr

Constant 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

Instance Method Summary

Constructor Detail

def self.new(operation : Type, filter : BER) #

[View source]

Class Method Detail

def self.begins(attribute : String, value) #

[View source]
def self.contains(attribute : String, value) #

[View source]
def self.ends(attribute : String, value) #

[View source]
def self.equal(object : String, value, escaped : Bool = false) #

[View source]
def self.escape(string : String) : String #

Escape a string for use in an LDAP filter


[View source]
def self.greater_than(object : String, value) #

[View source]
def self.intersect(left : BER, right : BER) #

[View source]
def self.intersect(left : Filter, right : Filter) #

[View source]
def self.join(left : BER, right : BER) #

[View source]
def self.join(left : Filter, right : Filter) #

[View source]
def self.less_than(object : String, value) #

[View source]
def self.negate(filter : Filter) #

[View source]
def self.negate(filter : BER) #

[View source]
def self.not_equal(object : String, value, escaped : Bool = false) #

[View source]
def self.present?(attribute : String) #

[View source]
def self.unescape(value : String, escaped : Bool = false) : String #

[View source]

Instance Method Detail

def &(filter) #

Joins two or more filters so that all conditions must be true.


[View source]
def |(filter) #

Selects entries where either the left or right side are true.


[View source]
def ~ #

Negates a filter.


[View source]
def operation : Type #

[View source]
def to_ber : ASN1::BER #

[View source]
def to_slice #

[View source]