Class: RDBr::Metadata::CheckConstraint
- Inherits:
-
Data
- Object
- Data
- RDBr::Metadata::CheckConstraint
- Defined in:
- lib/rdbr/metadata/constraints.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(expression:, name: nil) ⇒ CheckConstraint
constructor
A new instance of CheckConstraint.
Constructor Details
#initialize(expression:, name: nil) ⇒ CheckConstraint
Returns a new instance of CheckConstraint.
17 18 19 20 21 22 |
# File 'lib/rdbr/metadata/constraints.rb', line 17 def initialize(expression:, name: nil) super( name: Values.optional_name(name, field: 'check constraint name'), expression: Values.name(expression, field: 'check constraint expression') ) end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression
16 17 18 |
# File 'lib/rdbr/metadata/constraints.rb', line 16 def expression @expression end |
#name ⇒ Object (readonly)
Returns the value of attribute name
16 17 18 |
# File 'lib/rdbr/metadata/constraints.rb', line 16 def name @name end |