joellubi commented on PR #1590:
URL: https://github.com/apache/arrow-adbc/pull/1590#issuecomment-1978806626
@lidavidm
I'm in the process of putting things back together after having torn them
apart a bit in my PR so far. I think I now better understand the goals of the
driverbase and how it is meant to be used. Some parts like the Driver and
Database should go back to looking more like they did previously, with some
additions. Though perhaps it would be helpful to confirm my current
understanding. Using Connection as an example:
- The `ConnectionImpl` interface describes the set of methods that that a
driver author must provide implementations for when using the "driverbase SDK",
so to speak.
- Some of these methods MAY be identical to methods required for
`adbc.Connection` in which case we likely just proxy those calls directly when
actually using the resulting `connection` instance.
- Some of the methods are different, for example simplified helper
methods. In this case the author implements them and gets the more complicated
behavior (e.g. GetObjects) "for free" on the resulting `connection` instance.
- By using the provided constructors and embedding a `ConnectionImplBase`,
the author actually has a "working" `connection` that compiles without having
to implement any methods since `ConnectionImplBase` fully implements
`ConnectionImpl`, though mostly with stubs.
- Then the driver author can incrementally provide implementations for
methods they care about, overriding the "base" implementations. The actual
`connection` instance that's used by users is still the one produced by the
`NewConnection` constructor, and it either:
- Fully provides its own implementation for a method
- Fully delegates to the driver author's provided `impl`
- Or some combination where additional business logic is applied to the
driver author's implementation of a method(s) to produce the result of an
`adbc.Connection` method.
Is that an accurate summary?
--
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]