getConnectionDbmsInfoJson method
Live DBMS introspection (v2.1). Returns the JSON document produced by
odbc_get_connection_dbms_info for the given connection id, or null
when the FFI is unavailable / the call fails.
Far more accurate than getDriverCapabilitiesJson because it queries
the actual driver via SQLGetInfo(SQL_DBMS_NAME) instead of parsing
the connection string.
Implementation
String? getConnectionDbmsInfoJson(int connectionId) {
if (!_bindings.supportsConnectionDbmsInfoApi) {
return null;
}
final data = callWithBuffer(
(buf, bufLen, outWritten) => _bindings.odbc_get_connection_dbms_info(
connectionId,
buf,
bufLen,
outWritten,
),
);
if (data == null) {
return null;
}
return utf8.decode(data);
}