FaaPz / PDO

Just another PDO database library
MIT License
316 stars 103 forks source link

TRUNCATE & DROP TABLE #97

Closed dotmra closed 5 years ago

dotmra commented 6 years ago

Hello,

Is there a method to truncate or drop a table using SlimPDO? Something like $db->truncate(TABLE) or $db->drop(TABLE)?

kwhat commented 5 years ago

Not yet, but it maybe useful. It also begs the question, should create table be supported? There is quite a bit of complicity with create.

dotmra commented 5 years ago

Its okay. I made the TRUNCATE function myself, directly in the code. (I know, I should have forked the project and then done a PR). But at the time, I needed a fast solution, so decided to make it directly in the project.

It took less than 5 min to do so.

And yes, there is quite a bit of complivity with create. (That I can't make, but if it becomes a part of the wrapper, I'd love to see how it gets done) :)

dotmra commented 5 years ago

PR #113