LDIF.Filter (LDIF v0.1.1)

View Source

A collection of simple filters that only return matching Entity structs from an enumerable.

Summary

Functions

Filter the enumerable to only include the specified attribute (with any values)

Filter the enumerable to only include the specified attribute if it contains the specified value

Only return Change entries, not regular entries.

Filter the enumerable to only include the specified objectclass

Only return entries that represent people.

Functions

attribute(enum, attr, bool \\ true)

@spec attribute(enum :: Enumerable.t(), attr :: binary(), bool :: boolean()) ::
  Enumerable.t()

Filter the enumerable to only include the specified attribute (with any values)

Passing false as the final parameter will invert the filter, producing the opposite effect.

attribute_has(enum, attr, value, bool \\ true)

@spec attribute_has(
  enum :: Enumerable.t(),
  attr :: binary(),
  value :: binary(),
  bool :: boolean()
) ::
  Enumerable.t()

Filter the enumerable to only include the specified attribute if it contains the specified value

Passing false as the final parameter will invert the filter, producing the opposite effect.

change(enum, bool \\ true)

@spec change(enum :: Enumerable.t(), bool :: boolean()) :: Enumerable.t()

Only return Change entries, not regular entries.

Passing false as the final parameter will invert the filter, producing the opposite effect.

objectclass(enum, class, bool \\ true)

@spec objectclass(enum :: Enumerable.t(), class :: binary(), bool :: boolean()) ::
  Enumerable.t()

Filter the enumerable to only include the specified objectclass

Passing false as the final parameter will invert the filter, producing the opposite effect.

person(enum, bool \\ true)

@spec person(enum :: Enumerable.t(), bool :: boolean()) :: Enumerable.t()

Only return entries that represent people.

Passing false as the final parameter will invert the filter, producing the opposite effect.