isUnstableNativeBcpEnabled top-level property

bool get isUnstableNativeBcpEnabled

Mirrors the native ODBC_ENABLE_UNSTABLE_NATIVE_BCP guardrail.

Native SQL Server BCP (sqlserver-bcp feature) is compiled out of default builds and disabled at runtime unless this variable is set to a truthy value (1, true, yes, case-insensitive). Use isNativeBcpAvailable with DriverCapabilities.supportsNativeBcp from odbc_get_driver_capabilities JSON for end-to-end eligibility checks.

Implementation

bool get isUnstableNativeBcpEnabled {
  final raw = Platform.environment['ODBC_ENABLE_UNSTABLE_NATIVE_BCP'];
  if (raw == null || raw.trim().isEmpty) {
    return false;
  }
  switch (raw.trim().toLowerCase()) {
    case '1':
    case 'true':
    case 'yes':
      return true;
    default:
      return false;
  }
}