CoinTaxman icon indicating copy to clipboard operation
CoinTaxman copied to clipboard

Replace sqlite with Sqlalchemy

Open scientes opened this issue 3 years ago • 6 comments

This allows us database agnostic SQL programming and enables us to Support multiple SQL flavors out of the Box (sqlite, MySQL,postgresql are the ones i know that are defintively supported)

scientes avatar Sep 09 '21 08:09 scientes

I think that this is overkill and only adds another dependency.

provinzio avatar Sep 09 '21 09:09 provinzio

could we make it optional? like: if sqlalchemy is not found use sqlite this would need that we make a database class for all operations (_get_price_db etc) which we could switch depending on if sqlalchemy is installed or not:

try: 
    import sqlalchemy
    database=alchemyDB(path)
except ImportError:
    import sqllite3
    database=sqliteDB(path)

i'd someday like to make a small web app out of this and for that an actual db server would be nice, so i do not have the hassle of making sqlite concurrent

but WAL could be a fix for that

scientes avatar Sep 12 '21 13:09 scientes

A wrapper for sqlalchemy is definitely an over-overkill. If it's important for you, we can change to sqlalchemy, but this issue should be our lowest priority.

provinzio avatar Sep 13 '21 07:09 provinzio

Or we i could just make a wrapper for mysql/postgresql and we don't have the Overkill anymore

scientes avatar Sep 13 '21 07:09 scientes

But yes this is far future for me

scientes avatar Sep 13 '21 07:09 scientes

Or we i could just make a wrapper for mysql/postgresql and we don't have the Overkill anymore

Sqlalchemy is exactly what you use in that case

provinzio avatar Sep 13 '21 08:09 provinzio