Opened 4 years ago

Closed 4 years ago

#63 closed enhancement (fixed)

Add a truncate() method to the DB class

Reported by: cito Owned by:
Priority: minor Milestone: 5.0
Component: Classic API Version: 4.1
Keywords: Cc:


I thought it could be useful to have a truncate(table, cascade=False, restart=False) method in the DB class that would execute the TRUNCATE command on a table.

This method for quickly clearing a table would nicely complement the inserttable method for quickly filling a table. Therefore I wonder if it should be called "truncatetable". However, I don't like the concatenation of words without camelcase or underscore, and contrary to insert there is no single-row operation that truncate could be confused with anyway. So currently I prefer simply "truncate" as the name of the method.

Change History (2)

comment:1 Changed 4 years ago by cito

Implemented in r748

comment:2 Changed 4 years ago by cito

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.