Class: ColumnInfo

Inherits:
Object
  • Object
show all
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

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_nameObject



265
266
267
# File 'lib/pea_response.rb', line 265

def column_name
    @column_name
end

#data_typeObject



273
274
275
# File 'lib/pea_response.rb', line 273

def data_type
    @data_type
end

#is_nullableObject



289
290
291
# File 'lib/pea_response.rb', line 289

def is_nullable
    @is_nullable
end

#is_updatableObject



293
294
295
# File 'lib/pea_response.rb', line 293

def is_updatable
    @is_updatable
end

#lengthObject



277
278
279
# File 'lib/pea_response.rb', line 277

def length
    @length
end

#numeric_precisionObject



285
286
287
# File 'lib/pea_response.rb', line 285

def numeric_precision
    @numeric_precision
end

#numeric_scaleObject



281
282
283
# File 'lib/pea_response.rb', line 281

def numeric_scale
    @numeric_scale
end

#ordinal_positionObject



269
270
271
# File 'lib/pea_response.rb', line 269

def ordinal_position
    @ordinal_position
end