chrislu
|
2b35cca9bd
|
refactor: Split sql_functions.go into smaller, focused files
**File Structure Before:**
- sql_functions.go (850+ lines)
- sql_functions_test.go (1,205+ lines)
**File Structure After:**
- function_helpers.go (105 lines) - shared utility functions
- arithmetic_functions.go (205 lines) - arithmetic operators & math functions
- datetime_functions.go (170 lines) - date/time functions & constants
- string_functions.go (335 lines) - string manipulation functions
- arithmetic_functions_test.go (560 lines) - tests for arithmetic & math
- datetime_functions_test.go (370 lines) - tests for date/time functions
- string_functions_test.go (270 lines) - tests for string functions
**Benefits:**
✅ Better organization by functional domain
✅ Easier to find and maintain specific function types
✅ Smaller, more manageable file sizes
✅ Clear separation of concerns
✅ Improved code readability and navigation
✅ All tests passing - no functionality lost
**Total:** 7 focused files (1,455 lines) vs 2 monolithic files (2,055+ lines)
This refactoring improves maintainability while preserving all functionality.
|
5 days ago |