Class: ColumnInfo
- Inherits:
-
Object
- Object
- ColumnInfo
- Defined in:
- lib/pea_response.rb
Overview
Represents the concept of metadata for a column of an SQL table on the AS/400 server.
Instance Method Summary collapse
- #column_name ⇒ Object
- #data_type ⇒ Object
-
#initialize(column_name, ordinal_position, data_type, length, numeric_scale, is_nullable, is_updatable, numeric_precision) ⇒ ColumnInfo
constructor
Initialize a new instance of the ColumnInfo class.
- #is_nullable ⇒ Object
- #is_updatable ⇒ Object
- #length ⇒ Object
- #numeric_precision ⇒ Object
- #numeric_scale ⇒ Object
- #ordinal_position ⇒ Object
Constructor Details
#initialize(column_name, ordinal_position, data_type, length, numeric_scale, is_nullable, is_updatable, numeric_precision) ⇒ ColumnInfo
Initialize a new instance of the ColumnInfo class.
Params:
column_name
-
Name of the column.
ordinal_position
-
Ordinal position of the column.
data_type
-
DB2 Type of the data contain in the column.
length
-
Length of the data contain in the column.
numeric_scale
-
Scale of the data contain in the column if numeric type.
is_nullable
-
Y/N depending on the nullability of the field.
is_updatable
-
Y/N depending on the updaptability of the field.
numeric_precision
-
Precision of the data contain in the column if numeric type.
253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/pea_response.rb', line 253 def initialize(column_name, ordinal_position, data_type, length, numeric_scale, is_nullable, is_updatable, numeric_precision) @column_name = column_name @ordinal_position = ordinal_position @data_type = data_type @length = length @numeric_scale = numeric_scale @numeric_precision = numeric_precision @is_nullable = is_nullable @is_updatable = is_updatable @numeric_precision = numeric_precision end |
Instance Method Details
#column_name ⇒ Object
265 266 267 |
# File 'lib/pea_response.rb', line 265 def column_name @column_name end |
#data_type ⇒ Object
273 274 275 |
# File 'lib/pea_response.rb', line 273 def data_type @data_type end |
#is_nullable ⇒ Object
289 290 291 |
# File 'lib/pea_response.rb', line 289 def is_nullable @is_nullable end |
#is_updatable ⇒ Object
293 294 295 |
# File 'lib/pea_response.rb', line 293 def is_updatable @is_updatable end |
#length ⇒ Object
277 278 279 |
# File 'lib/pea_response.rb', line 277 def length @length end |
#numeric_precision ⇒ Object
285 286 287 |
# File 'lib/pea_response.rb', line 285 def numeric_precision @numeric_precision end |
#numeric_scale ⇒ Object
281 282 283 |
# File 'lib/pea_response.rb', line 281 def numeric_scale @numeric_scale end |
#ordinal_position ⇒ Object
269 270 271 |
# File 'lib/pea_response.rb', line 269 def ordinal_position @ordinal_position end |