Replies: 1 comment 1 reply
-
I broadly agree with the value in update queries as the next logical step in Dataview, though I'm mostly concerned with a few things we should iron out:
The syntax I think seems fine, though we should start by adding mutable JavaScript APIs for testing purposes before we implement the general DQL API. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dataview currently solves, in an amazing fashion, for the
R
in dataCRUD
. As I've been writing both DQL and JS, I've regularly wantedCUD
capabilities. My general use case/pattern in these situations is:a. use Dataview to generate... subpar CLI scripts like
echo ${template} > "${noteName}.md"
for each file I'd like createdb. click each link, update as fast as possible manually, wish for an as-seen-on-tv-simple tool
I think it'd be a valuable addition to Dataview to:
a. frontmatter
b. metadata
c. non-frontmatter content.
d. full content
e. create/modify dates (keep existing or set explicit)
a. full file delta
b. frontmatter only
c. text only
d. parsed metadata only
e. files to be deleted
a. automated snapshotting integrations, if possible
b. events to notify other plugins
c. plaintext log of changes to be made, machine/human readable for automated undo/understanding context
I'm currently thinking about something like this:
Experience
I'd expect something like:
This should be accessible via both DQL and JS, and both should support pre-populated queries/actions.
Examples
Create Notes
I capture a number of quotes and create "homepages" for authors that don't have them weekly or so.
Update Notes
I accidentally created a number of notes with
person: true
rather thanrecord: person
and wanted to fix.When using Bear, I had a tag that I prefixed with an underscore to force its sorting. In Obsidian, I don't need this anymore, so:
Then there are just some times where I may want to execute sweeping change and easily visualize it.
Maybe I do want to set the create or modification date:
Or I want to backdate some creations:
I've finished a project and can delete its notes, capturing the file list in
finished-project
just in case.Additionally, it probably makes sense to support tasks as a first-class citizen. Perhaps that means it would be worth supporting
create|delete|update page|task
or similar.Feedback on any of the above is certainly welcomed. I've got a very clear set of examples I keep running into, but I expect other perspectives will differ, particularly with changes as impactful as content updates or deletes.
I've been otherwise occupied and unable to contribute for a bit, @blacksmithgu, but if this sounds interesting to you, I'd be interested in helping to implement.
Beta Was this translation helpful? Give feedback.
All reactions