I’m working on making an ActiveRecord adaptor for FrontBase.
I got things working under the stable code base. Now I’m trying to port it to the trunk code so I can commit. Some regressions in the unit tests though. It looks like 1.1 will require migration support, so I can’t defer that until later.
PASSING: (34)
P aaa_create_tables_test.rb
P adapter_test.rb
P aggregations_test.rb
P ar_schema_test.rb
P association_callbacks_test.rb
P associations_extensions_test.rb
P associations_go_eager_test.rb
P associations_join_model_test.rb
P associations_test.rb
P base_test.rb
P binary_test.rb
P callbacks_test.rb
P class_inheritable_attributes_test.rb
P column_alias_test.rb
P defaults_test.rb
P deprecated_associations_test.rb
P deprecated_finder_test.rb
P finder_test.rb
P inheritance_test.rb
P lifecycle_test.rb
P locking_test.rb
P method_scoping_test.rb
P mixin_nested_set_test.rb
P mixin_test.rb
P modules_test.rb
P multiple_db_test.rb
P pk_test.rb
P readonly_test.rb
P reflection_test.rb
P schema_dumper_test.rb
P threaded_connections_test.rb
P transactions_test.rb
P unconnected_test.rb
P validations_test.rb
ERRORS: (2)
E calculations_test.rb (14 failures, 6 errors)
E migration_test.rb (13 failures, 7 errors)
FAILING: (1)
F fixtures_test.rb (0 failures, 2 errors) (Breaks in MySQL too… http://dev.rubyonrails.org/ticket/4077)
I’ll try to deal with the test cases one at a time. Hopefully I’ll hit a threshold point and most of the exceptions/failures will just disappear once the implementation is functional enough.
I had to make a change to Rails code itself to get things working this far. Fixtures.value_list doesn’t pass the column in to the quote method and without a column, it is impossible to distinguish between date/time/timestamp values.
Maybe I just don’t understand Rails deep enough?
This is my new implementation:
def value_list list = [] klass = eval(@class_name) @fixture.each_pair do |key, value| col = klass.columns_hash[key] element = ActiveRecord::Base.connection.quote(value,col).gsub('\\n', "\n").gsub('\\r', "\r") list << element end list = list.join(", ") list end
I’m working on making an ActiveRecord adaptor for FrontBase.
I got things working under the stable code base. Now I’m trying to port it to the trunk code so I can commit. Some regressions in the unit tests though. It looks like 1.1 will require migration support, so I can’t defer that until later.
PASSING: (34)
P aaa_create_tables_test.rb
P adapter_test.rb
P aggregations_test.rb
P ar_schema_test.rb
P association_callbacks_test.rb
P associations_extensions_test.rb
P associations_go_eager_test.rb
P associations_join_model_test.rb
P associations_test.rb
P base_test.rb
P binary_test.rb
P callbacks_test.rb
P class_inheritable_attributes_test.rb
P column_alias_test.rb
P defaults_test.rb
P deprecated_associations_test.rb
P deprecated_finder_test.rb
P finder_test.rb
P inheritance_test.rb
P lifecycle_test.rb
P locking_test.rb
P method_scoping_test.rb
P mixin_nested_set_test.rb
P mixin_test.rb
P modules_test.rb
P multiple_db_test.rb
P pk_test.rb
P readonly_test.rb
P reflection_test.rb
P schema_dumper_test.rb
P threaded_connections_test.rb
P transactions_test.rb
P unconnected_test.rb
P validations_test.rb
ERRORS: (2)
E calculations_test.rb (14 failures, 6 errors)
E migration_test.rb (13 failures, 7 errors)
FAILING: (1)
F fixtures_test.rb (0 failures, 2 errors) (Breaks in MySQL too… http://dev.rubyonrails.org/ticket/4077)
I’ll try to deal with the test cases one at a time. Hopefully I’ll hit a threshold point and most of the exceptions/failures will just disappear once the implementation is functional enough.
I had to make a change to Rails code itself to get things working this far. Fixtures.value_list doesn’t pass the column in to the quote method and without a column, it is impossible to distinguish between date/time/timestamp values.
Maybe I just don’t understand Rails deep enough?
This is my new implementation:
def value_list list = [] klass = eval(@class_name) @fixture.each_pair do |key, value| col = klass.columns_hash[key] element = ActiveRecord::Base.connection.quote(value,col).gsub('\\n', "\n").gsub('\\r', "\r") list << element end list = list.join(", ") list end