On 31 Oct 2006, at 18:20, [EMAIL PROTECTED] wrote:
1. How do I do direct sql query. (I want to do "TRUNCATE TABLE" for
now. In Class::DBI it was trought Ima::DBI afaik)
You can get the dbh (DB handle) through $schema->storage->dbi
Thats a DBI object so you can do any DBI operation through it.
In the case of TRUNCATE TABLE it may be worth checking the comparison of
that against DELETE FROM TABLE - if you are doing this without a WHERE
clause the 2 may be equivalent and the DELETE form can be expressed as a
resultset operation.
2. How can I save the classes generated from the ::Loader to files on
disk. (can I do it selectively i.e. save only tables X,Y,Z?).
See dump_to_dir in DBIx::Class::Schema::Loader (and
DBIx::Class::Schema::Loader::Base)
3. Is it possible to create table on the fly and after that generate
class for it, i mean runtime ? an example if possible will be good !
You can create a class and create the table from it. Examples of this
can be found in the DBIx::Class test suite and some documentation in
DBIx::Class::Schema (deploy)
Nigel.
--
[ Nigel Metheringham [EMAIL PROTECTED] ]
[ - Comments in this message are my own and not ITO opinion/policy - ]
_______________________________________________
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]/