Module: EnhancedSQLite3::SupportsVirtualColumns::Column
- Defined in:
- lib/enhanced_sqlite3/supports_virtual_columns.rb
Instance Method Summary collapse
- #has_default? ⇒ Boolean
- #initialize(auto_increment: nil, rowid: false, generated_type: nil) ⇒ Object
- #virtual? ⇒ Boolean
- #virtual_stored? ⇒ Boolean
Instance Method Details
#has_default? ⇒ Boolean
139 140 141 |
# File 'lib/enhanced_sqlite3/supports_virtual_columns.rb', line 139 def has_default? super && !virtual? end |
#initialize(auto_increment: nil, rowid: false, generated_type: nil) ⇒ Object
126 127 128 129 |
# File 'lib/enhanced_sqlite3/supports_virtual_columns.rb', line 126 def initialize(*, auto_increment: nil, rowid: false, generated_type: nil, **) super @generated_type = generated_type end |
#virtual? ⇒ Boolean
131 132 133 |
# File 'lib/enhanced_sqlite3/supports_virtual_columns.rb', line 131 def virtual? @generated_type.present? end |
#virtual_stored? ⇒ Boolean
135 136 137 |
# File 'lib/enhanced_sqlite3/supports_virtual_columns.rb', line 135 def virtual_stored? virtual? && @generated_type == :stored end |