sqliteDb.py 360 B

12345678910111213
  1. import sqlite3
  2. class SqliteDB:
  3. def __init__(self):
  4. self.con = sqlite3.connect('sqlite3.db')
  5. with self.con.cursor() as cur:
  6. cur.execute("CREATE TABLE current (timestamp text, source text, channel int, value real")
  7. cur.commit()
  8. def write(self, meas):
  9. with self.con.cursor() as cur:
  10. cur.execute("INSERT INTO current VALUES (")