Skip to content

Commit f6abfa3

Browse files
luis-dkclaude
andcommitted
refactor(connection): reuse DEFAULT_MAX_QUERY_CHARS constant
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b6e8f29 commit f6abfa3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

testgen/common/database/connection_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from sqlalchemy.exc import DatabaseError, DBAPIError
2727

2828
from testgen.common.database.database_service import empty_cache, get_flavor_service
29-
from testgen.common.models.connection import Connection
29+
from testgen.common.models.connection import DEFAULT_MAX_QUERY_CHARS, Connection
3030
from testgen.ui.services.database_service import fetch_from_target_db
3131

3232
try:
@@ -142,4 +142,4 @@ def apply_connection_defaults(connection: Connection) -> None:
142142
"""Fill flavor-dependent defaults for fields the caller didn't supply."""
143143
if connection.max_query_chars is None:
144144
# Salesforce Data 360's Hyper engine has a lower expression-depth limit
145-
connection.max_query_chars = 15000 if connection.sql_flavor_code == "salesforce_data360" else 20000
145+
connection.max_query_chars = 15000 if connection.sql_flavor_code == "salesforce_data360" else DEFAULT_MAX_QUERY_CHARS

0 commit comments

Comments
 (0)