| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This bundles the data and filename into the cards table, with a
CHECK enforcing that both cannot be set. They are unset when they
are NULL. Cards can have both data and filename be NULL, meaning
that there is nothing associated with the title. These cards can
still be tagged like normal.
When inserting a new blob (or filename), the program checks if there
is currently a filename (or blob, when you insert a filename) associated
with the card. The program will then prompt you if you want to overwrite
the blob or filename.
|
| |
|
|
|
|
|
|
|
| |
The new schema can now store blobs and file strings (which can be
URLs or other names). These are different tables.
In the future the cards table can have two columns, where one and
only one must be NULL, with a CHECK to confirm that. Then coalesce()
can be used to retrieve data from the table.
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
As of right now NOT queries do not work correctly for cards with more
than one tag.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|