Class: ROM::LDAP::Relation
- Inherits:
-
Relation
- Object
- Relation
- ROM::LDAP::Relation
- Extended by:
- Notifications::Listener
- Includes:
- ROM::LDAP, DSMLExport, MsgPackExport, OptimisedJSON, Exporting, Reading, Writing
- Defined in:
- lib/rom/ldap/relation.rb,
lib/rom/ldap/relation/reading.rb,
lib/rom/ldap/relation/writing.rb,
lib/rom/ldap/relation/exporting.rb
Defined Under Namespace
Modules: Exporting, Reading, Writing
Constant Summary
Constants included from ROM::LDAP
ABSTRACTS, ALL_ATTRS, BIN_FILE_REGEX, BOOLEAN_MATCHERS, BindError, CONNECTION_FAILURES, CONSTRUCTORS, CONSTRUCTOR_REGEX, ConnectionError, DEFAULT_FILTER, DEFAULT_FORMATTER, DEFAULT_PK, DEREF_ALL, DEREF_ALWAYS, DEREF_FIND, DEREF_NEVER, DEREF_SEARCH, DN_REGEX, DistinguishedNameError, ESCAPES, ESCAPE_REGEX, EXTENSIBLE_REGEX, FILTER_REGEX, INTEGER_MATCHERS, LDAPURI_REGEX, LDIF_LINE_REGEX, MAJOR, MINOR, MessageQueue, NEW_LINE, OID, OID_TYPE_MAP, OPERATORS, OPERATOR_REGEX, OP_ATTRS, PERCENT_SPACE, PasswordError, RESPONSES, RESPONSES_PATH, ResponseError, SCOPES, SCOPE_BASE, SCOPE_ONE, SCOPE_SUB, SINCE_1601, SPACE, STRING_MATCHERS, SUCCESS_CODES, SecureBindError, TEN_MILLION, TIMESTAMPS, TIME_MATCHERS, TINY, UNESCAPE_REGEX, VALUES_MAP, VAL_REGEX, VERSION, WILDCARD
Class Method Summary collapse
- .associations ⇒ Object
-
.base ⇒ Object
Per relation override for the search base.
-
.branches ⇒ Object
Alternative search bases by name.
Instance Method Summary collapse
- #assoc(name) ⇒ Relation
-
#base ⇒ String
Expose the search base currently in use.
-
#primary_key ⇒ Symbol
Fallsback to ‘entrydn’ operational value.
-
#to_filter ⇒ String
Current dataset in LDAP filter format.
-
#transaction(opts = EMPTY_OPTS) {|t| ... } ⇒ Mixed
LDAP Transactions (LDAPTXN) is an experimental RFC.
Methods included from OptimisedJSON
Methods included from MsgPackExport
Methods included from DSMLExport
Methods included from Exporting
Methods included from Writing
Methods included from Reading
#all?, #any?, #authenticate, #branch, #by_pk, #count, #fetch, #first, #grep, #last, #limit, #list, #map, #none?, #one?, #operational, #order, #pluck, #random, #rename, #reverse, #search, #select, #select_append, #total, #unfiltered, #unwrap, #where, #whole_tree, #with_base
Methods included from ROM::LDAP
LDIF, formatter, use_formatter
Class Method Details
.associations ⇒ Object
101 102 103 |
# File 'lib/rom/ldap/relation.rb', line 101 def self.associations schema.associations end |
.base ⇒ String .base(value) ⇒ Object
Per relation override for the search base.
32 |
# File 'lib/rom/ldap/relation.rb', line 32 defines :base |
.branches ⇒ Hash .branches(value) ⇒ Object
Alternative search bases by name.
43 |
# File 'lib/rom/ldap/relation.rb', line 43 defines :branches |
Instance Method Details
#assoc(name) ⇒ Relation
108 109 110 |
# File 'lib/rom/ldap/relation.rb', line 108 def assoc(name) associations[name].call end |
#base ⇒ String
Expose the search base currently in use.
87 88 89 |
# File 'lib/rom/ldap/relation.rb', line 87 def base dataset.opts[:base] end |
#primary_key ⇒ Symbol
Fallsback to ‘entrydn’ operational value.
72 73 74 75 76 77 78 79 80 |
# File 'lib/rom/ldap/relation.rb', line 72 def primary_key attribute = schema.find(&:primary_key?) if attribute attribute.alias || attribute.name else DEFAULT_PK end end |
#to_filter ⇒ String
Current dataset in LDAP filter format.
96 97 98 |
# File 'lib/rom/ldap/relation.rb', line 96 def to_filter dataset.opts[:filter] end |
#transaction(opts = EMPTY_OPTS) {|t| ... } ⇒ Mixed
LDAP Transactions (LDAPTXN) is an experimental RFC. The latest revision can be found at tools.ietf.org/rfc/rfc5805.txt
122 123 124 |
# File 'lib/rom/ldap/relation.rb', line 122 def transaction(opts = EMPTY_OPTS, &block) Transaction.new(dataset.directory).run(opts, &block) end |