Order parents and children
This commit is contained in:
parent
520ee0f7da
commit
b8c3ce5d47
3 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"db_name": "SQLite",
|
"db_name": "SQLite",
|
||||||
"query": "SELECT hash, message, reachable FROM commits JOIN commit_links ON hash = parent WHERE child = ? ",
|
"query": "SELECT hash, message, reachable FROM commits JOIN commit_links ON hash = parent WHERE child = ? ORDER BY reachable DESC, unixepoch(committer_date) ASC ",
|
||||||
"describe": {
|
"describe": {
|
||||||
"columns": [
|
"columns": [
|
||||||
{
|
{
|
||||||
|
|
@ -28,5 +28,5 @@
|
||||||
false
|
false
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"hash": "167a3c4e2ea3540b2608b75019a112916c8f4c413355366cca8b3e41715081c6"
|
"hash": "3fae2fec2ed76f5ce7a8a3127280030e0adb25c62a1f30c7c97e435ee3d148f6"
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"db_name": "SQLite",
|
"db_name": "SQLite",
|
||||||
"query": "SELECT hash, message, reachable FROM commits JOIN commit_links ON hash = child WHERE parent = ? ",
|
"query": "SELECT hash, message, reachable FROM commits JOIN commit_links ON hash = child WHERE parent = ? ORDER BY reachable DESC, unixepoch(committer_date) ASC ",
|
||||||
"describe": {
|
"describe": {
|
||||||
"columns": [
|
"columns": [
|
||||||
{
|
{
|
||||||
|
|
@ -28,5 +28,5 @@
|
||||||
false
|
false
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"hash": "73bdd8a83f317d9f815d5d00215de3f740730b01048f73e62f8931e5dafa3d2f"
|
"hash": "b8557950e066a215dd53ad69a031d487ab55f01c9c3a2a3a1bd5ffe1889d0e44"
|
||||||
}
|
}
|
||||||
|
|
@ -60,6 +60,7 @@ pub async fn get(
|
||||||
SELECT hash, message, reachable FROM commits \
|
SELECT hash, message, reachable FROM commits \
|
||||||
JOIN commit_links ON hash = parent \
|
JOIN commit_links ON hash = parent \
|
||||||
WHERE child = ? \
|
WHERE child = ? \
|
||||||
|
ORDER BY reachable DESC, unixepoch(committer_date) ASC \
|
||||||
",
|
",
|
||||||
hash
|
hash
|
||||||
)
|
)
|
||||||
|
|
@ -73,6 +74,7 @@ pub async fn get(
|
||||||
SELECT hash, message, reachable FROM commits \
|
SELECT hash, message, reachable FROM commits \
|
||||||
JOIN commit_links ON hash = child \
|
JOIN commit_links ON hash = child \
|
||||||
WHERE parent = ? \
|
WHERE parent = ? \
|
||||||
|
ORDER BY reachable DESC, unixepoch(committer_date) ASC \
|
||||||
",
|
",
|
||||||
hash
|
hash
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue