RFC: Resolve "Improve connection mgmt in `dbconn.BaseClient`"
Closes #12 (closed)
BaseClient
- (uses: username, database, host, port, password args)
- has
conn_url
prop
Engine Based (mostly SQLAlchemy based):
- PgClient
- MySqlClient
- OracleClient
- SqliteClient
- SqlServerClient
Special case
- HiveClient
Client based:
- MongoClient
- IbisClient
- BigQueryClient
Feature requests
- AthenaClient (ClientBased?)
- TeradataClient (ClientBased?)
Commons for all clients
- methods
- execute query (
execute
) - get data from query to dataframe (
to_frame
) - insert data from dataframe (
insert_from_frame
)
- execute query (
- properties
conn_url
BaseClient
should implement this interface.
Engine based clients
These clients should create and destroy connections on the fly as to not have dangling connections.
get_engine
A new SessionBaseClient
should implement this interface.
Transactions
We should discuss whether we need transactions to be implemented or are needed at all. In such case, we should implement that logic, but that's out of scope.
ToDo
Client Based Clients (clientception)
- Ibis
- Mongo
- BigQuery
Edited by Javi M