5P by xguru 2020-07-05 | favorite | 댓글과 토론

- go-git 을 이용해서 Repo 내용을 SQLite 의 Virtual Table 로 구현
- gitqlite "SELECT * from commits" 처럼 사용 가능
- 테이블 & 필드 :
ㅤ→ commits : id, message, summary, author, commiter, parent_id..
ㅤ→ files : commit_id, name, type, contents..
ㅤ→ refs : name, type, hash
- SELECT count(*) AS commits, SUM(additions) AS additions, SUM(deletions) AS deletions, author_email FROM commits GROUP BY author_email ORDER BY commits