Changes:
TableStructure::Iterator
TableStructure::Writer
TableStructure::CSV::Writer
- Add
header: { step: n }
option. Header rows are output at intervals of step number.- e.g.
TableStructure::Iterator.new(schema, header: { step: 10 })
- e.g.
- Add
Changes:
- Remove deprecated methods, arguments and options.
- It is recommended that you update to
0.3.23
first. If you get warnings or errors, fix them and then update to0.4.0
.
Changes:
TableStructure::CSV::Writer
- Fix not to output wrong warning.
Changes:
TableStructure::Schema
- DSL
column_converter
- Using
lambda
has been deprecated. Useblock
instead.
- Using
context_builder
- Using
lambda
has been deprecated. Useblock
instead.
- Using
- DSL
Changes:
- Add
TableStructure::Table
- This provides methods for converting data with the schema.
- Use
TableStructure::Table.new
instead ofTableStructure::Schema#create_table
.
TableStructure::Schema
TableStructure::Schema#create_table
has been deprecated. UseTableStructure::Table.new
instead.
Changes:
TableStructure::Schema
- Fix case where
context_builder
for:table
do not apply.
- Fix case where
Changes:
TableStructure::Writer
header_omitted: true
option has been deprecated. Useheader: false
option instead.
TableStructure::CSV::Writer
header_omitted: true
option has been deprecated. Useheader: false
option instead.
TableStructure::Iterator
header_omitted: true
option has been deprecated. Useheader: false
option instead.
Changes:
- Minor improvements.
Changes:
TableStructure::Schema
:row
option forcolumn_converter
DSL has been deprecated. Use:body
option instead.:result_type
option ofcreate_table
method has been deprecated. Use:row_type
option instead.
TableStructure::Schema::Table
rows
method has been deprecated. Usebody
method instead.
TableStructure::Writer
:result_type
option has been deprecated. Use:row_type
option instead.
TableStructure::Iterator
:result_type
option has been deprecated. Use:row_type
option instead.
Changes:
TableStructure::Schema
- Enable to add definitions in a block when initializing the schema.
- Add
merge
class method. - Change
+
class method not to overwrite the definitions (column_converter
,context_builder
) by the last one with the same name. If you expect the same behavior as before, usemerge
instead.
Changes:
TableStructure::Schema
- Add
+
as class method. this method concatenates the schemas.
- Add
Changes:
- Support Ruby 2.7.
Changes:
- Minor improvements.
Changes:
TableStructure::Schema
- Fix
:name_prefix
and:name_suffix
options so that they are applied after the column converters defined in the schema.
- Fix
Changes:
TableStructure::CSV::Writer
- Add
:csv_options
option. This option's value is simply passed to::CSV.new
as options'.
- Add
Changes:
TableStructure::Writer
- Fix an issue that objects with both
call
andeach
methods could not be enumerated.
- Fix an issue that objects with both
TableStructure::CSV::Writer
- Fix
write
method's block to work.
- Fix
Changes:
- Add
TableStructure::CSV::Writer
. This is a wrapper forTableStructure::Writer
.
Changes:
TableStructure::Schema
- Add
:nil_definitions_ignored
option.- This defaults to
false
, which is same behavior as before. - If
true
is set, the column definitions evaluated tonil
are ignored. this behaves like as if to defineomitted: true
in the column definition.
- This defaults to
- Add
Changes:
TableStructure::Schema
- Improve performance when
result_type: :array
(default) option is set. - Improve performance when
column_converter
is not defined.
- Improve performance when
Changes:
TableStructure::Schema
- Improve performance when
context_builder
is not defined.
- Improve performance when
Changes:
TableStructure::Schema
- Add following options:
:name_prefix
:name_suffix
- DSL
column_converter
- Add
:header
and:row
options.- If
header: false
, the converter is not applied to header values. - If
row: false
, the converter is not applied to body values. - Both options default to
true
, which is same behavior as before.
- If
- Add
- Add following options:
Changes:
TableStructure::Writer
- Fix broken
:result_type
option.
- Fix broken
TableStructure::Iterator
- Fix broken
:result_type
option.
- Fix broken
Changes:
TableStructure::Schema
- Improve designs and performance. You can ignore the following changes unless you have been using the schema instance method directly.
- Add
TableStructure::Schema#create_table
method. It returnsTableStructure::Schema::Table
instance. - Remove
TableStructure::Schema#header
method. UseTableStructure::Schema::Table#header
method instead. - Remove
TableStructure::Schema#row
method. UseTableStructure::Schema::Table#row
method instead.
- Add
- Improve designs and performance. You can ignore the following changes unless you have been using the schema instance method directly.
Changes:
TableStructure::Writer
- When
result_type: :hash
option is specified andcolumn(s)
:key
of the schema is undefined, index number is used as the key.
- When
Changes:
TableStructure::Writer
- Make
:result_type
option available.
- Make
TableStructure::Iterator
- Make
:result_type
option available.
- Make
Changes:
TableStructure::Schema
- Add following options:
:key_prefix
:key_suffix
- DSL
column(s)
- Add
:omitted
option. - Support nested schemas.
- Add
- Add following options:
Changes:
- Add
TableStructure::Iterator
.
- First version