fix: wrap database operations to run without db.