code: function deleteOverlengthMessagesIfLimitIsSet(ws, device_address, handle){
  	if (ws.max_message_length)
  		db.query("DELETE FROM device_messages WHERE device_address=? AND LENGTH(message)>?", [device_address, ws.max_message_length], function(){
  			return handle();
  		});
  	else
  		return handle();
  }
docs: hub