Method: Simple::SQL::Reflection#timestamp_columns
- Defined in:
- lib/simple/sql/reflection.rb
#timestamp_columns(table_name) ⇒ Object
timestamp_columns are columns that will be set automatically after inserting or updating a record. This includes:
-
inserted_at (for Ecto)
-
created_at (for ActiveRecord)
-
updated_at (for Ecto and ActiveRecord)
33 34 35 |
# File 'lib/simple/sql/reflection.rb', line 33 def (table_name) columns(table_name) & TIMESTAMP_COLUMN_NAMES end |