make db.DuckDB().__init__(self, ...) use db.DuckDB().read(self, location) for reading file data

This commit is contained in:
randomuser 2021-07-20 23:55:24 -05:00
parent 6389478750
commit 6bf490ead4
1 changed files with 1 additions and 4 deletions

5
db.py
View File

@ -2,10 +2,7 @@ class DuckDB:
def __init__(self, location=None): def __init__(self, location=None):
self.location = location self.location = location
self.db = [] self.db = []
if location != None: if location != None: read(location)
fd = open(location, "r")
self.parse(fd)
fd.close()
def parse(self, fd): def parse(self, fd):
lines = [i.rstrip() for i in fd.readlines()] lines = [i.rstrip() for i in fd.readlines()]