Yet Another DBI Extention
Recently I’ve found a simple DBI wrapper – DBIx::DWIW – Do What I Want. It seems this module contains a set of methods which have more native syntax and original features.
There are a couple methods which I have seen and found interesting:
- FlatArray(sql_string) – passes a SQL string and returns a record set as simple flat array. It’s very useful for example if a query returns one column and many rows (SHOW TABLE)
- Scalar(sql_string) – passes a SQL string and returns a simple scalar. It’s a case when query returns only one value (SELECT count(*) FROM table)
- CSV(sql_string) – passes a SQL string and returns values as CSV (Comma Separated Value) string.
Have a look that module. Hope it will help you in your work.