[TASK] Allow 3rd party extensions to get database connection for a table

Related: #1192