Module: EnhancedSQLite3::SupportsVirtualColumns::SchemaCreation
- Defined in:
- lib/enhanced_sqlite3/supports_virtual_columns.rb
Instance Method Summary collapse
Instance Method Details
#add_column_options!(sql, options) ⇒ Object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/enhanced_sqlite3/supports_virtual_columns.rb', line 145 def (sql, ) if [:collation] sql << " COLLATE \"#{[:collation]}\"" end if (as = [:as]) sql << " GENERATED ALWAYS AS (#{as})" sql << if [:stored] " STORED" else " VIRTUAL" end end super end |