Refactoring SQL executor and column structure manipulation