Exemplo n.º 1
0
    def _js_sqlite3(self, target):

        def export_js(fetched):
            return "window.BOTTLE_LIST = {};".format(
                json.dumps(fetched, sort_keys = False, indent = 4)
            )

        return utils.export_db(self.cursor, self.TABLE_NAME, target, export_js)
Exemplo n.º 2
0
    def _json_sqlite3(self, target):
        def export_json(fetched):
            return json.dumps(fetched, sort_keys = False, indent = 4)

        return utils.export_db(self.cursor, self.TABLE_NAME, target, export_json)