Sha256: 51b8040a402597bb61b2099712ae8acb786f97e4538dc989fc47c0add15c53ad
Contents?: true
Size: 665 Bytes
Versions: 42
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module MySQL class Column < ConnectionAdapters::Column # :nodoc: delegate :extra, to: :sql_type_metadata, allow_nil: true def unsigned? /\bunsigned(?: zerofill)?\z/.match?(sql_type) end def case_sensitive? collation && !collation.end_with?("_ci") end def auto_increment? extra == "auto_increment" end alias_method :auto_incremented_by_db?, :auto_increment? def virtual? /\b(?:VIRTUAL|STORED|PERSISTENT)\b/.match?(extra) end end end end end
Version data entries
42 entries across 42 versions & 5 rubygems