class Marten::DB::Management::Constraint::Unique
- Marten::DB::Management::Constraint::Unique
- Reference
- Object
Overview
Represents a unique constraint used when creating or altering tables.
Included Modules
Defined in:
marten/db/management/constraint/unique.crConstructors
Instance Method Summary
- 
        #==(other : self)
        
          Returns true if the other unique constraint corresponds to the same unique constraint configuration. 
- 
        #clone
        
          Returns a copy of the unique constraint. 
- 
        #column_names : Array(String)
        
          Returns the column names that are part of the unique constraint. 
- 
        #name : String
        
          Returns the unique constraint name. 
- 
        #serialize_args : String
        
          Returns a serialized version of the unique constraint arguments to be used when generating migrations. 
Instance methods inherited from module Marten::DB::CanFormatStringsOrSymbols
  
  
    
      format_string_or_symbol(value : String)
    format_string_or_symbol
    
  
    
    
  
    
    
    
  
    
    
    
  
Constructor Detail
Instance Method Detail
        
        def ==(other : self)
        #
      
      
        Returns true if the other unique constraint corresponds to the same unique constraint configuration.
        
        def serialize_args : String
        #
      
      
        Returns a serialized version of the unique constraint arguments to be used when generating migrations.
The returned string will be used in the context of add_unique_constraint / unique_constraint statements
in generated migrations.