Class: Rooq::Generator::TableInfo
- Inherits:
-
Object
- Object
- Rooq::Generator::TableInfo
- Extended by:
- T::Sig
- Defined in:
- lib/rooq/generator/introspector.rb
Instance Attribute Summary collapse
- #columns ⇒ Array<ColumnInfo> readonly
- #foreign_keys ⇒ Array<ForeignKeyInfo> readonly
- #name ⇒ String readonly
- #primary_keys ⇒ Array<String> readonly
Instance Method Summary collapse
Constructor Details
#initialize(name:, columns:, primary_keys:, foreign_keys:) ⇒ void
256 257 258 259 260 261 262 |
# File 'lib/rooq/generator/introspector.rb', line 256 def initialize(name:, columns:, primary_keys:, foreign_keys:) @name = name @columns = T.let(columns.freeze, T::Array[ColumnInfo]) @primary_keys = T.let(primary_keys.freeze, T::Array[String]) @foreign_keys = T.let(foreign_keys.freeze, T::Array[ForeignKeyInfo]) freeze end |
Instance Attribute Details
#columns ⇒ Array<ColumnInfo> (readonly)
240 241 242 |
# File 'lib/rooq/generator/introspector.rb', line 240 def columns @columns end |
#foreign_keys ⇒ Array<ForeignKeyInfo> (readonly)
246 247 248 |
# File 'lib/rooq/generator/introspector.rb', line 246 def foreign_keys @foreign_keys end |
#name ⇒ String (readonly)
237 238 239 |
# File 'lib/rooq/generator/introspector.rb', line 237 def name @name end |
#primary_keys ⇒ Array<String> (readonly)
243 244 245 |
# File 'lib/rooq/generator/introspector.rb', line 243 def primary_keys @primary_keys end |