Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pass
@abstractmethod
def get_chart(self, chart_id):
"returns chart model"
pass
@abstractmethod
def delete_chart(self, chart_id):
pass
@abstractmethod
def list_charts(self):
pass
@abstractmethod
def get_charts(self, page_num=0, page_size=10):
pass
class SQLLiteChartStorage(ChartStorage, Storage):
"Chart storage class for SQLLite PixieDust DB (default)"
CHARTS_TBL_NAME="CHARTS"
def __init__(self):
self._initTable( SQLLiteChartStorage.CHARTS_TBL_NAME,
'''
CHARTID TEXT NOT NULL PRIMARY KEY,
AUTHOR TEXT NOT NULL,
DATE DATETIME NOT NULL,
DESCRIPTION TEXT,
CONTENT BLOB,
RENDERERID TEXT,
THUMBNAIL BLOB
''')
def store_chart(self, payload):
chart_id = str(uuid.uuid4())