aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* queryparse: fix NOTGravatar Peter McGoron 2021-07-271-7/+8
| | | | | NOT queries are now two-step: the list is queries and then all elements in the cards table that are also in the query are discarded.
* add command line option for searchGravatar Peter McGoron 2021-07-262-12/+28
| | | | | As of right now NOT queries do not work correctly for cards with more than one tag.
* natargs: add missing importGravatar Peter McGoron 2021-07-261-0/+2
|
* queryparse: remove literal setGravatar Peter McGoron 2021-07-262-17/+14
|
* queryparse: add function to build SQL queriesGravatar Peter McGoron 2021-07-262-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLite allows for UNIONs and INTERSECTIONs between SELECT statements, but it does not support grouping them. By recursively applying DeMorgan's laws, the parser can reduce the parse tree to only * Literals * NOT literals (i.e. "all items not belonging to this tag") * ANDs * ORs What SQLite /can/ do is have SELECT statements come from other SELECT statements. A query like (X & Y & Z) | (A & B & C) in pseudo-SQLite becomes SELECT * FROM ( SELECT * FROM tbl WHERE name IN X INTERSECTION SELECT * FROM tbl WHERE name IN Y INTERSECTION SELECT * FROM tbl WHERE name IN Z ) UNION SELECT * FROM ( SELECT * FROM tbl WHERE name IN A INTERSECTION SELECT * FROM tbl WHERE name IN B INTERSECTION SELECT * FROM tbl WHERE name IN C ) One future optimization would be to group all literals at a certain level with each other, so that there are less direct queries to the entire tag table.
* queryparse: use demorgan's laws to simplify parsed expressionGravatar Peter McGoron 2021-07-262-1/+17
|
* update README.mdGravatar Peter McGoron 2021-07-261-0/+10
|
* queryparse: collect literals into set and return itGravatar Peter McGoron 2021-07-262-16/+22
|
* gitea wants .md suffixes for web renderingGravatar Peter McGoron 2021-07-262-0/+0
|
* example/query.md: change to what the code actually implementsGravatar Peter McGoron 2021-07-261-3/+3
|
* add COPYINGGravatar Peter McGoron 2021-07-261-0/+124
|
* add READMEGravatar Peter McGoron 2021-07-261-0/+4
|
* queryparse: fix tagglob and titleglob, fix encapsulating literalsGravatar Peter McGoron 2021-07-262-9/+12
|
* queryparse: fix infinite recursion in '[' e1 ']'Gravatar Peter McGoron 2021-07-262-1/+2
|
* queryparse: lift encapsulate() calls into loops to make cleaner parse treesGravatar Peter McGoron 2021-07-261-2/+2
|
* queryparse: fix error in returning from NOTGravatar Peter McGoron 2021-07-262-2/+4
|
* queryparse: fix mistaken command in ANDGravatar Peter McGoron 2021-07-262-1/+2
|
* start query parserGravatar Peter McGoron 2021-07-263-0/+145
|
* move SQL schema setup to variableGravatar Peter McGoron 2021-07-261-9/+9
|
* add list tags and list cardsGravatar Peter McGoron 2021-07-263-57/+24
|
* underwriter: start new argument parserGravatar Peter McGoron 2021-07-264-32/+110
|
* add inspect_tagmap.mdGravatar Peter McGoron 2021-07-261-0/+12
|
* add renamingGravatar Peter McGoron 2021-07-263-1/+17
|
* add more documentation cardsGravatar Peter McGoron 2021-07-261-0/+0
|
* add 'list tags' and 'list cards'Gravatar Peter McGoron 2021-07-261-0/+56
|
* use an actual schema for storing tag dataGravatar Peter McGoron 2021-07-264-77/+78
|
* untag: actually remove note from tag listsGravatar Peter McGoron 2021-07-261-0/+4
|
* modify examples and add tag_idempotent.mdGravatar Peter McGoron 2021-07-263-2/+7
|
* fix removing tags from a cardGravatar Peter McGoron 2021-07-261-10/+8
|
* make sure tagging does not add a tag more than onceGravatar Peter McGoron 2021-07-264-6/+12
|
* add ability to add cards to databaseGravatar Peter McGoron 2021-07-263-0/+154