Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 72370
Status: rejected
Priority: 0/
Queue: SQL-Statement

People
Owner: Nobody in particular
Requestors: BBYRD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Support for TRUNCATE TABLE
TRUNCATE TABLE is currently not supported, but should be easy to implement. It is a SQL:2008 standard command now. At the very least, the TRUNCATE sub could just reword it into "DELETE FROM X;" and let delete handle it. Though, if there's a more effective method of dropping everything, that should be called instead. Actually, there's a "truncate" method set to be defined within the DBD::XXX:Table module (according to SQL::Eval), so the TRUNCATE sub should just call "$table->truncate($data);", if it is available.
Please read the "Bugs and Limitations" section of the documentation carefully. The DBD::File::Table::truncate method has nothing to do with a TRUNCATE TABLE. Please use "DELETE * FROM TABLE" - it fullfil your requirements or provide a full patch with tests.