Module: SchemaPlus::ActiveRecord::ConnectionAdapters::Sqlite3Adapter::AddColumnOptions

Defined in:
lib/schema_plus/active_record/connection_adapters/sqlite3_adapter.rb

Instance Method Summary collapse

Instance Method Details

#default_expr_valid?(expr) ⇒ Boolean

Returns:

  • (Boolean)

172
173
174
# File 'lib/schema_plus/active_record/connection_adapters/sqlite3_adapter.rb', line 172

def default_expr_valid?(expr)
  true # arbitrary sql is okay
end

#sql_for_function(function) ⇒ Object


176
177
178
179
180
181
# File 'lib/schema_plus/active_record/connection_adapters/sqlite3_adapter.rb', line 176

def sql_for_function(function)
  case function
    when :now
      "(DATETIME('now'))"
  end
end