How does Dapper work

My question is not exactly related to how the workflow of Dapper works but rather how it's extension methods work

I recently got into partial classes and extension methods and I was wondering how Dapper is able to add a Query<T>() function into all sorts of SQL connectors, wouldn't that mean Dapper would need to link every single SQL connector as a dependency in order to target to the object to extend on?
Because I would like to make an extension library based on another project I once made but I don't want to end up linking a version of my library into it that is a dependency which eventually becomes outdated while nothing on its extending part changes simply because the linked dependency is not up to date anymore
Was this page helpful?