| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | queryparse: fix NOT | 2021-07-27 | 1 | -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 search | 2021-07-26 | 2 | -12/+28 | |
| | | | | | | As of right now NOT queries do not work correctly for cards with more than one tag. | ||||
| * | natargs: add missing import | 2021-07-26 | 1 | -0/+2 | |
| | | |||||
| * | queryparse: remove literal set | 2021-07-26 | 2 | -17/+14 | |
| | | |||||
| * | queryparse: add function to build SQL queries | 2021-07-26 | 2 | -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 expression | 2021-07-26 | 2 | -1/+17 | |
| | | |||||
| * | update README.md | 2021-07-26 | 1 | -0/+10 | |
| | | |||||
| * | queryparse: collect literals into set and return it | 2021-07-26 | 2 | -16/+22 | |
| | | |||||
| * | gitea wants .md suffixes for web rendering | 2021-07-26 | 2 | -0/+0 | |
| | | |||||
| * | example/query.md: change to what the code actually implements | 2021-07-26 | 1 | -3/+3 | |
| | | |||||
| * | add COPYING | 2021-07-26 | 1 | -0/+124 | |
| | | |||||
| * | add README | 2021-07-26 | 1 | -0/+4 | |
| | | |||||
| * | queryparse: fix tagglob and titleglob, fix encapsulating literals | 2021-07-26 | 2 | -9/+12 | |
| | | |||||
| * | queryparse: fix infinite recursion in '[' e1 ']' | 2021-07-26 | 2 | -1/+2 | |
| | | |||||
| * | queryparse: lift encapsulate() calls into loops to make cleaner parse trees | 2021-07-26 | 1 | -2/+2 | |
| | | |||||
| * | queryparse: fix error in returning from NOT | 2021-07-26 | 2 | -2/+4 | |
| | | |||||
| * | queryparse: fix mistaken command in AND | 2021-07-26 | 2 | -1/+2 | |
| | | |||||
| * | start query parser | 2021-07-26 | 3 | -0/+145 | |
| | | |||||
| * | move SQL schema setup to variable | 2021-07-26 | 1 | -9/+9 | |
| | | |||||
| * | add list tags and list cards | 2021-07-26 | 3 | -57/+24 | |
| | | |||||
| * | underwriter: start new argument parser | 2021-07-26 | 4 | -32/+110 | |
| | | |||||
| * | add inspect_tagmap.md | 2021-07-26 | 1 | -0/+12 | |
| | | |||||
| * | add renaming | 2021-07-26 | 3 | -1/+17 | |
| | | |||||
| * | add more documentation cards | 2021-07-26 | 1 | -0/+0 | |
| | | |||||
| * | add 'list tags' and 'list cards' | 2021-07-26 | 1 | -0/+56 | |
| | | |||||
| * | use an actual schema for storing tag data | 2021-07-26 | 4 | -77/+78 | |
| | | |||||
| * | untag: actually remove note from tag lists | 2021-07-26 | 1 | -0/+4 | |
| | | |||||
| * | modify examples and add tag_idempotent.md | 2021-07-26 | 3 | -2/+7 | |
| | | |||||
| * | fix removing tags from a card | 2021-07-26 | 1 | -10/+8 | |
| | | |||||
| * | make sure tagging does not add a tag more than once | 2021-07-26 | 4 | -6/+12 | |
| | | |||||
| * | add ability to add cards to database | 2021-07-26 | 3 | -0/+154 | |
