Skip to content

Commit cb4829d

Browse files
committed
Enforce declared limits and explicit drivers
1 parent 3cf7dd0 commit cb4829d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/openstatspec/sql/capabilities.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .dolt_conformance import DoltConformanceSource, effective_limits as dolt_effective_limits
1414
from .normative import catalog
1515
from .profiles import DOLT, MYSQL, POSTGRESQL, SQLITE, MYSQL_WIRE_PROFILES, SqlProfile
16-
from .profiles import profile_for_url
16+
from .profiles import validate_connection_url
1717
from ..core import UnsupportedOperationError
1818

1919
# Release/build automation must bind this to the exact commit used to build
@@ -256,7 +256,7 @@ def effective_profile(
256256
) -> tuple[SqlProfile, dict[str, Any]]:
257257
"""Resolve and enforce the profile used by import preflight."""
258258
source = _conformance_source(dolt_conformance_source)
259-
configured = profile_for_url(database_url)
259+
configured = validate_connection_url(database_url)
260260
active = active_connection(database_url, dolt_conformance_source=source)
261261
if configured is not MYSQL and active["profile"] != configured.name:
262262
raise UnsupportedOperationError("The active SQL server does not match the configured profile.")
@@ -288,6 +288,7 @@ def effective_profile(
288288
return replace(
289289
configured,
290290
name=active["profile"],
291+
identifier_limit=int(limits["identifier_limit"]["value"]),
291292
max_source_variables=int(limits["maximum_source_variables"]),
292293
max_text_value_bytes=int(limits["maximum_value_bytes"]),
293294
max_row_bytes=(

0 commit comments

Comments
 (0)