in reply to 'automating' SQL queries, use Class::DBI?

There is nothing that will do a good job of generating SQL for complicated outer joins and the like. Class::DBI does a good job of mapping tables to objects and letting you address your data in an OO way. It can generate SQL for simple things like what you show above, and it can take arbitrary SQL and handle to busy-work of fetching the data and turning it into objects that you can work with.
  • Comment on Re: 'automating' SQL queries, use Class::DBI?

Replies are listed 'Best First'.
Re: Re: 'automating' SQL queries, use Class::DBI?
by geektron (Curate) on Jan 28, 2004 at 02:16 UTC
    i don't expect there to be a good way of generating everything should of a lot of concatenation ... :-(

    and i'm not particularly fond of table --> object mapping ( if it's a one-to-one relationship ). i've already had to deal with a 'home-grown' solution with a previous job that just became unmaintainable, unweildy, slow, and excessively complicated.

      Class::DBI is better than most homegrown versions of this sort of application, which is why people use it.