mbrobbel commented on code in PR #3099:
URL: https://github.com/apache/arrow-adbc/pull/3099#discussion_r2196745713
##########
rust/core/src/driver_manager.rs:
##########
@@ -184,6 +279,59 @@ impl ManagedDriver {
Ok(ManagedDriver { inner })
}
+ /// Load a driver either by name, filename, path, or via locating a toml
manifest file.
+ /// The `load_flags` control what directories are searched to locate a
manifest.
+ /// The `entrypoint` allows customizing the name of the driver
initialization function
+ /// if it is not the default `AdbcDriverInit` and isn't described in the
loaded manifest.
+ /// If not provided, an entrypoint will be searched for based on the
driver's name.
+ /// The `version` defines the ADBC revision to attempt to initialize.
+ ///
+ /// The full logic used here is as follows:
+ /// - if `name` has an extension: it is treated as a filename. If the
load_flags does not
+ /// contain `LOAD_FLAG_ALLOW_RELATIVE_PATHS`, then relative paths will
be rejected.
+ /// - if the extension is `toml` then we attempt to load the Driver
Manifest, otherwise
+ /// we defer to the previous logic in load_dynamic_from_filename
which will attempt to
+ /// load the library
+ /// - if `name` does not have an extension but is an absolute path: we
first check to see
+ /// if there is an existing file with the same name that *does* have a
"toml" extension,
+ /// attempting to load that if it exists. Otherwise we just pass it to
load_dynamic_from_filename.
+ /// - Finally, if there's no extension and it is not an absolute path, we
call `find_driver`
Review Comment:
Mentioning a function that's not visible in the docs could be confusing to
users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]