Class: ActiveRecord::ConnectionAdapters::Spanner::Column
- Inherits:
-
ConnectionAdapters::Column
- Object
- ConnectionAdapters::Column
- ActiveRecord::ConnectionAdapters::Spanner::Column
- Defined in:
- lib/active_record/connection_adapters/spanner/column.rb
Instance Method Summary collapse
-
#has_default? ⇒ Boolean
rubocop:disable Naming/PredicateName.
-
#initialize(name, default, sql_type_metadata = nil, null = true, default_function = nil, collation: nil, comment: nil, primary_key: false) ⇒ Column
constructor
rubocop:disable Style/MethodDefParentheses.
- #primary_key? ⇒ Boolean
- #virtual? ⇒ Boolean
Constructor Details
#initialize(name, default, sql_type_metadata = nil, null = true, default_function = nil, collation: nil, comment: nil, primary_key: false) ⇒ Column
rubocop:disable Style/MethodDefParentheses
14 15 16 17 18 19 20 |
# File 'lib/active_record/connection_adapters/spanner/column.rb', line 14 def initialize(name, default, = nil, null = true, default_function = nil, collation: nil, comment: nil, primary_key: false, **) # rubocop:enable Style/MethodDefParentheses super @primary_key = primary_key end |
Instance Method Details
#has_default? ⇒ Boolean
rubocop:disable Naming/PredicateName
22 23 24 |
# File 'lib/active_record/connection_adapters/spanner/column.rb', line 22 def has_default? # rubocop:disable Naming/PredicateName super && !virtual? end |
#primary_key? ⇒ Boolean
30 31 32 |
# File 'lib/active_record/connection_adapters/spanner/column.rb', line 30 def primary_key? @primary_key end |
#virtual? ⇒ Boolean
26 27 28 |
# File 'lib/active_record/connection_adapters/spanner/column.rb', line 26 def virtual? .generated end |