[Dbix-class] Q: Differing column names in DBIC and SQL

2008-10-21 Thread Bernhard Graf
One common practice to avoid problems with reserved words in column (or table) names is to prefix every name with an underscore. Is there an elegant and working way in DBIC to accomplish this? I already tried __PACKAGE__-add_columns( user = { data_type = 'varchar', name = '_user',

Re: [Dbix-class] Q: Differing column names in DBIC and SQL

2008-10-21 Thread Peter Rabbitson
Bernhard Graf wrote: One common practice to avoid problems with reserved words in column (or table) names is to prefix every name with an underscore. Is there an elegant and working way in DBIC to accomplish this? I already tried __PACKAGE__-add_columns( user = { data_type =

[Dbix-class] Filtering module

2008-10-21 Thread jackal
Hello, This is proposal for a filtering component, similar to DBIx::Class::InflateColumn It can -modify- columns transparently. When you read column - it inflates, when you write - deflates. On creating a new column, whole cycle passed - deflating for DB and inflating for usage. Module can

Re: [Dbix-class] Q: Differing column names in DBIC and SQL

2008-10-21 Thread Bernhard Graf
Peter Rabbitson wrote: Do not mutilate column names, but instead use your tools the way they were intended to be: http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Storage /DBI.pm#quote_char I know these options, but - their values depend on the underlying RDBMS, - AFAIR their

Re: [Dbix-class] Q: Differing column names in DBIC and SQL

2008-10-21 Thread Peter Rabbitson
Bernhard Graf wrote: Peter Rabbitson wrote: Do not mutilate column names, but instead use your tools the way they were intended to be: http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Storage /DBI.pm#quote_char I know these options, but - their values depend on the

[Dbix-class] Filtering module

2008-10-21 Thread jackal
Hello, This is proposal for a filtering component, similar to DBIx::Class::InflateColumn It can -modify- columns transparently. When you read column - it inflates, when you write - deflates. On creating a new column, whole cycle passed - deflating for DB and inflating for usage. Module can