forked from vieter-v/vieter
feat(server): partially migrated repos API to sqlite
This commit is contained in:
parent
03318586ed
commit
891a206116
5 changed files with 181 additions and 52 deletions
19
src/db/db.v
Normal file
19
src/db/db.v
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
module db
|
||||
|
||||
import sqlite
|
||||
|
||||
struct VieterDb {
|
||||
conn sqlite.DB
|
||||
}
|
||||
|
||||
pub fn init(db_path string) ?VieterDb {
|
||||
conn := sqlite.connect(db_path) ?
|
||||
|
||||
sql conn {
|
||||
create table GitRepo
|
||||
}
|
||||
|
||||
return VieterDb{
|
||||
conn: conn
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue