A utility function to extract complete SQL statements from TypeORM QueryBuilder instances with all parameters substituted.
When working with TypeORM's QueryBuilder, you often need to see the complete SQL query with all parameters substituted for debugging, logging, or analysis purposes. This utility function converts a TypeORM SelectQueryBuilder into a complete SQL string with all parameters properly substituted.