mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(internal): rename link columns (#1213)
from -> source to -> dest "from" is a reserved keyword in sqlite, so we avoid it.
This commit is contained in:
@ -300,21 +300,21 @@
|
||||
|
||||
;; Links
|
||||
(expect (caar (org-roam-db-query [:select (funcall count) :from links
|
||||
:where (= from $s1)]
|
||||
:where (= source $s1)]
|
||||
(test-org-roam--abs-path "foo.org"))) :to-be 1)
|
||||
(expect (caar (org-roam-db-query [:select (funcall count) :from links
|
||||
:where (= from $s1)]
|
||||
:where (= source $s1)]
|
||||
(test-org-roam--abs-path "nested/bar.org"))) :to-be 2)
|
||||
|
||||
;; Links -- File-to
|
||||
(expect (caar (org-roam-db-query [:select (funcall count) :from links
|
||||
:where (= to $s1)]
|
||||
:where (= dest $s1)]
|
||||
(test-org-roam--abs-path "nested/foo.org"))) :to-be 1)
|
||||
(expect (caar (org-roam-db-query [:select (funcall count) :from links
|
||||
:where (= to $s1)]
|
||||
:where (= dest $s1)]
|
||||
(test-org-roam--abs-path "nested/bar.org"))) :to-be 1)
|
||||
(expect (caar (org-roam-db-query [:select (funcall count) :from links
|
||||
:where (= to $s1)]
|
||||
:where (= dest $s1)]
|
||||
(test-org-roam--abs-path "unlinked.org"))) :to-be 0)
|
||||
;; TODO Test titles
|
||||
(expect (org-roam-db-query [:select * :from titles])
|
||||
|
Reference in New Issue
Block a user