-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
The original rotatelib supports rotating database tables that have date-based names. This would need a means to let users pass DB credentials and interface with a database via JS. Perhaps something like this:
var rotatelib = require('js-rotatelib');
var params = {
before: "-7 days",
database: {
type: 'mysql',
user: 'root',
password: 'secret',
name: 'example'
}
};
rotatelib
.list(params)
.then(function(items) {
rotatelib.removeItems(items, params)
.then(function() {
var plural = items.length !== 1 ? 's' : '';
console.log('Removed ' + items.length + ' table' + plural);
});
});Reactions are currently unavailable