Class: UU::ObjectStore::ObjectSchema::ObjectSchemaCreateIndex
- Inherits:
-
UU::OS::REST::DTO
- Object
- UU::OS::REST::DTO
- UU::ObjectStore::ObjectSchema::ObjectSchemaCreateIndex
- Defined in:
- uu_objectstore-0.6.5/lib/uu/object_store/object_schema/object_schema_create_index.rb
Overview
DTO for creation of the new index for object schema.
Instance Attribute Summary (collapse)
-
- (String) name
Index name.
-
- (Array<String>) object_attributes
List of uuObject attributes which compose created index.
-
- (TrueClass, FalseClass) unique
Flag if index is created as unique index.
Method Summary
Methods inherited from UU::OS::REST::DTO
#initialize, #to_hash, #to_json
Constructor Details
This class inherits a constructor from UU::OS::REST::DTO
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class UU::OS::REST::DTO
Instance Attribute Details
- (String) name
Index name. In case name is not given, it is generated from names of indexed attributes and their ordering. Index name must be shorter than 128 characters (so in case of composed indices it might be necessary to provide custom name, because generated one might be longer).
30 31 32 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_schema/object_schema_create_index.rb', line 30 def name @name end |
- (Array<String>) object_attributes
List of uuObject attributes which compose created index. Each attribute may contain ASC or DESC keyword (e.g. "data.name DESC") to specify index order. By default, if order is not given, indices are created as ascending (ASC).
15 16 17 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_schema/object_schema_create_index.rb', line 15 def object_attributes @object_attributes end |
- (TrueClass, FalseClass) unique
Flag if index is created as unique index. If set to true, there can be only one uuObject with particular values of indexed attributes. This parameter is optional, by default it is set to false.
22 23 24 |
# File 'uu_objectstore-0.6.5/lib/uu/object_store/object_schema/object_schema_create_index.rb', line 22 def unique @unique end |