Store more commit info in db
This commit is contained in:
parent
0f3cf296f1
commit
0d3cd15b03
9 changed files with 82 additions and 43 deletions
12
.sqlx/query-35e5c16c2952f550783b234f27839cf5110d11798d749f523d0e0c98a77194f5.json
generated
Normal file
12
.sqlx/query-35e5c16c2952f550783b234f27839cf5110d11798d749f523d0e0c98a77194f5.json
generated
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\nINSERT OR IGNORE INTO commits (hash, author, author_date, committer, committer_date, message)\nVALUES (?, ?, ?, ?, ?, ?)\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 6
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "35e5c16c2952f550783b234f27839cf5110d11798d749f523d0e0c98a77194f5"
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\nWITH RECURSIVE reachable(hash) AS (\n SELECT hash FROM tracked_refs\n UNION\n SELECT parent FROM commit_links\n JOIN reachable ON hash = child\n)\n\nUPDATE commits\nSET tracked = (hash IN reachable)\n",
|
||||
"query": "\nWITH RECURSIVE reachable(hash) AS (\n SELECT hash FROM tracked_refs\n UNION\n SELECT parent FROM commit_links\n JOIN reachable ON hash = child\n)\n\nUPDATE commits\nSET reachable = (hash IN reachable)\n",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
|
|
@ -8,5 +8,5 @@
|
|||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "6398e5b1dce1142d3460f9d067588bcb42b0be5278ce7524280a4786c8b41786"
|
||||
"hash": "afe943820305632281456f0a629065b3221314c59b1865c50b9bff51529c93d7"
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "INSERT OR IGNORE INTO commits (hash) VALUES (?)",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "d06de282a27e84bae58b7ea73fce0f0e205e82b8c17406b4f613066a7f3979da"
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\nSELECT child, tracked FROM commit_links\nJOIN commits ON hash = child\nWHERE parent = ?\n ",
|
||||
"query": "\nSELECT child, reachable FROM commit_links\nJOIN commits ON hash = child\nWHERE parent = ?\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"name": "tracked",
|
||||
"name": "reachable",
|
||||
"ordinal": 1,
|
||||
"type_info": "Int64"
|
||||
}
|
||||
|
|
@ -22,5 +22,5 @@
|
|||
false
|
||||
]
|
||||
},
|
||||
"hash": "2846970f979d84f4ba4ba2cd659fc37347ea280ebdf584bc535f135f63610a66"
|
||||
"hash": "e58a4211444bfe1c965c021085f0e204ca93fd93778b360730976a76e299ffef"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue