The code inferring column types by querying the database causes numerous issues and I would like to move it from the runtime (DBIx::Class::ResultSource) to the DBIx::Class::Loader. The reasons for this are following:
1) The DBIx::Class schema objects are quite independent from the database so you can have a schema that is not connected to a database or connected to a database that does not have the tables that you declare (this last is case is happening in t/cdbi-t/01- columns.t). I can imagine that one could also clone a schema and connect it to a different database with different types. This all creates many exceptions and complicates both the code design and the usage documentation.
2) For efficiency we cannot query the database about the column type each time user accesses the type field - but rather cache the first answer. This is even further complicated by the cases when the database does not return the column info because of for example the wrong case of the column name.
This all should be much cleaner if we rely only on the types explicitly declared in the schema classes or built by the Loader.
I need your feedback to decide if such a move would not break to much code relying on the current functionality.
--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
