Class: Rooq::Generator::ColumnInfo
- Inherits:
-
Object
- Object
- Rooq::Generator::ColumnInfo
- Extended by:
- T::Sig
- Defined in:
- lib/rooq/generator/introspector.rb
Instance Attribute Summary collapse
- #default ⇒ String? readonly
- #max_length ⇒ Integer? readonly
- #name ⇒ String readonly
- #nullable ⇒ Boolean readonly
- #pg_type ⇒ String readonly
- #precision ⇒ Integer? readonly
- #scale ⇒ Integer? readonly
- #type ⇒ Symbol readonly
Instance Method Summary collapse
- #initialize(name:, type:, pg_type:, nullable:, default:, max_length:, precision:, scale:) ⇒ void constructor
Constructor Details
#initialize(name:, type:, pg_type:, nullable:, default:, max_length:, precision:, scale:) ⇒ void
199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/rooq/generator/introspector.rb', line 199 def initialize(name:, type:, pg_type:, nullable:, default:, max_length:, precision:, scale:) @name = name @type = type @pg_type = pg_type @nullable = nullable @default = default @max_length = max_length @precision = precision @scale = scale freeze end |
Instance Attribute Details
#default ⇒ String? (readonly)
176 177 178 |
# File 'lib/rooq/generator/introspector.rb', line 176 def default @default end |
#max_length ⇒ Integer? (readonly)
179 180 181 |
# File 'lib/rooq/generator/introspector.rb', line 179 def max_length @max_length end |
#name ⇒ String (readonly)
164 165 166 |
# File 'lib/rooq/generator/introspector.rb', line 164 def name @name end |
#nullable ⇒ Boolean (readonly)
173 174 175 |
# File 'lib/rooq/generator/introspector.rb', line 173 def nullable @nullable end |
#pg_type ⇒ String (readonly)
170 171 172 |
# File 'lib/rooq/generator/introspector.rb', line 170 def pg_type @pg_type end |
#precision ⇒ Integer? (readonly)
182 183 184 |
# File 'lib/rooq/generator/introspector.rb', line 182 def precision @precision end |
#scale ⇒ Integer? (readonly)
185 186 187 |
# File 'lib/rooq/generator/introspector.rb', line 185 def scale @scale end |
#type ⇒ Symbol (readonly)
167 168 169 |
# File 'lib/rooq/generator/introspector.rb', line 167 def type @type end |