vieter/src/db/db.v

22 lines
295 B
Coq
Raw Normal View History

module db
import sqlite
struct VieterDb {
conn sqlite.DB
}
// init initializes a database & adds the correct tables.
pub fn init(db_path string) ?VieterDb {
2022-05-14 20:06:08 +02:00
conn := sqlite.connect(db_path)?
sql conn {
create table GitRepo
2022-05-07 14:16:30 +02:00
create table BuildLog
}
return VieterDb{
conn: conn
}
}