Gabriel Horner
15b8e5e9df
Setup CI jobs that are only for graph-parser
...
Also move all non graph-parser fns to frontend thanks to carve lint
2022-05-26 18:04:45 -04:00
Gabriel Horner
fec0b755a8
Upgrade cljs + shadow
...
- Upgraded shadow to keep goog compiler versions the same
- Converted some safe-parse-int's to parse-long
- Converted some safe-parse-float's to parse-double
- Simplified impl of safe-parse-* fns
2022-05-19 14:58:33 +08:00
Tienson Qin
7f256b8872
fix: sample query
2022-05-16 15:35:43 +08:00
Gabriel Horner
5b0d5fb8b5
Decouple graph-parser util from app util usage
...
For tiny util heavily used fns like safe-re-find and uuid-string?,
decouple graph-parser from so much of the app
2022-05-13 16:17:44 -04:00
Gabriel Horner
65804b4183
Split out text ns to graph-parser
2022-05-10 20:22:48 -04:00
Gabriel Horner
85bd1fecb2
Move first batch of util fns to graph-parser.util
...
Still need to fix external.roam
2022-05-04 12:02:36 -04:00
Gabriel Horner
6b935a8d58
Fix page-ref rule which was not bindable and failed fast
...
- page-ref had a :block/name embedded lookup ref which failed fast.
datomic advises against this -
https://docs.datomic.com/on-prem/schema/identity.html#:~:text=You%20cannot%20use%20them%20in%20the%20body%20of%20a%20query%2C%20use%20datalog%20clauses%20instead
- page-ref can handle binding args like last commit for page
- page-ref not failing fast on non-existing pages means that user can get meaningful results
in more complex queries as seen in test
- Also remove try/catch as there should be no more queries that
unintentionally cause the 'Nothing found for entity' error
- Also fixed lookup ref in srs cards which can be seen in stacktrace of
#4576
2022-03-17 16:15:04 +08:00
Gabriel Horner
96da98e5bd
Fix Tienson's nested not case
2022-03-16 16:04:59 +08:00
Gabriel Horner
a41dd0abfc
Remove parse catch for consistent error handling
...
For advanced queries we error when invalid queries are written. We
should do the same for simple query.
Also add a test for tag query format
2022-03-16 16:04:59 +08:00
Gabriel Horner
e615423e6a
Fix full text search without quotes not working
...
Decoupled query-dsl from search/block-search. This coupling added
unnecessary complexity as srs, custom queries and the api all depend
on query-dsl and don't need to be coupled to search/block-search
2022-03-16 16:04:59 +08:00
Gabriel Horner
8468602881
query-dsl + tests cleanup
...
Remove old string checks that no longer apply. Also added another blank
string case that causes an issue
2022-03-16 16:04:59 +08:00
Gabriel Horner
5f0efcf2d8
Fix another nested boolean case
...
Also removed or nested complexity from
903a757ce2 that no longer seems necessary
2022-03-16 16:04:59 +08:00
Gabriel Horner
3a19687988
Fix nested boolean case - close #4510
2022-03-16 16:04:59 +08:00
Gabriel Horner
6a1bcec82c
Make db/query react aliases consistent
...
These namespaces had conflicting aliases which led to confusing reading
2022-03-10 15:43:07 +08:00
Gabriel Horner
79bbf21f7d
Allow advanced queries to pull in dsl rules as needed
...
- Remove unused query' and when checks from custom-query
- Update bb command to use correct watch
- Provide $EXAMPLE mode in query dsl test to document rule usage
2022-03-10 15:43:07 +08:00
Gabriel Horner
d955918525
Display explicit error for one remaining react-query (advanced query)
...
This is a follow up to #4434 . I've now confirmed that all uses of
react/react-query benefit from an explicit exception as they will now
see an explicit error instead of 0 results which is confusing for the
user and harder for us to debug
2022-03-09 14:10:38 +08:00
Gabriel Horner
2286ef71bc
Rules must be present for srs since it uses the same dsl-query helper
...
Closes #4497 and #4500
2022-03-09 14:10:38 +08:00
Gabriel Horner
f9cb132482
Fix simple queries not working in advanced query - close #4498
...
Also removed unused repo fn in query-dsl ns and configured custom-query
to throw exception
2022-03-09 14:10:38 +08:00
Gabriel Horner
4c777fc502
Convert remaining query operators to use rules
...
- Removed counter and uniq-symbol as those are no longer needed
- build-query cleanly maps conditions to their fns
- Query dsl tests have been fully decoupled
2022-03-08 16:27:30 +08:00
Gabriel Horner
198c3363f7
More query dsl improvements
...
- Add tests for 5 operators that weren't tested
- Converted all operators to rules except two
2022-03-08 16:27:30 +08:00
Gabriel Horner
bcfb9d99ee
Move *page-tags operators to rules
...
Also converted their tests to the new format and finally made test-parse
small enough to be considered more readable
2022-03-08 16:27:30 +08:00
Gabriel Horner
80ef31f4c0
Fixes #4101 by moving todo/task and priority to rules
...
Task and priority weren't composable in most boolean settings. Rules
fixes that
2022-03-08 16:27:30 +08:00
Gabriel Horner
3987395ab5
Merge branch 'master' into fix/dsl-query-boolean-operators
2022-03-04 09:54:23 -05:00
Gabriel Horner
4eaca080dd
Display error if dsl query fails hard
...
By making failure more explicit, it's easier for us to debug the type of
failure
2022-03-04 10:36:28 +08:00
Gabriel Horner
12395c61fb
Introduce rules to query-dsl
...
Fixes #4217 as each use of page-property have unique bindings that don't
clobber each other
2022-03-01 16:46:27 -05:00
Gabriel Horner
b248c95ce3
Split out query operators that are tested
2022-03-01 16:42:19 -05:00
Gabriel Horner
c6d03b67ab
Merge branch 'master' into dev/var-sizes-linter
2022-02-08 12:02:39 -05:00
Gabriel Horner
1df386ecca
Add regression tests for querying properties with links
...
These tests were fixed by f1728c48cb
Also cleaned up more of query and tests i.e. split up large fns
2022-02-08 14:47:08 +08:00
Gabriel Horner
5a126027eb
Fix #4007 to allow linked integer page links to match property query
2022-02-08 14:47:08 +08:00
Gabriel Horner
e81678fc69
Mark most vars as cleanup-todo
...
Fixed a few that I knew how to QA and were low risk
2022-02-04 16:57:49 -05:00
Tienson Qin
21f2237227
fix: lint errors
2022-01-16 13:06:54 +08:00
Tienson Qin
2401ce9e9a
fix: property regression : # should be a delimiter
...
Close #3916
Tests added.
2022-01-16 12:39:41 +08:00
Gabriel Horner
7497d8b396
Lint a good chunk of src/main/frontend
...
Left some TODOs to discuss with others and others for me to finish
2022-01-11 17:34:54 -05:00
Junyi Du
e5dcb014e1
enhance: yet another page-name sanity improve
2022-01-10 13:29:40 +08:00
Junyi Du
7505b0dde6
fix: introduce more page-name sanity
2022-01-10 13:29:40 +08:00
Tienson Qin
a175b51684
fix: nested and query issues and full-text search in nested queries
...
Related to #3630 .
Full text search example in a nested query:
(and [[page]] "query")
2021-12-30 00:32:56 +08:00
Tienson Qin
09a00ab93d
fix: #tag query
2021-12-10 20:48:23 +08:00
Tienson Qin
4ede5eaeb3
fix: query filters are case sensitive
2021-11-23 17:15:24 +08:00
Tienson Qin
b4212173fc
fix: disable query in another query
2021-10-09 22:51:24 +08:00
Tienson Qin
68be42e005
fix: sample query
2021-09-29 18:58:56 +08:00
Tienson Qin
5dee92f95b
feat: add (sample n) query
2021-09-29 18:50:05 +08:00
Tienson Qin
d965394be2
feat: add namespace query support
2021-09-15 11:28:39 +08:00
llcc
fef5bbf068
enhance(clock): support recording in repeated block // cleanup unused namespaces ( #2777 )
...
* enhance(clock): support recording in repeated block
* cleanup: unused namespaces
* cleanup: missing-else-branch if --> when
* enhance: wider search results window for mobile browser
* fix: namespace requirement
2021-09-08 10:23:16 +08:00
Tienson Qin
9abad43ff2
enhance: nested queries
2021-07-26 18:23:12 +08:00
Tienson Qin
cac9470fbe
feat: bring block timestamps back
2021-07-13 15:24:20 +08:00
Tienson Qin
99db2bd503
fix: nested queries bugs
...
close #2218
2021-06-18 00:19:06 +08:00
Tienson Qin
903a757ce2
fix: or nested queries
...
related to #2218
2021-06-17 23:57:30 +08:00
Tienson Qin
4a339384ca
fix: CI
2021-05-30 12:25:47 +08:00
Tienson Qin
e7879c5388
fix: query dsl
2021-05-25 20:12:50 +08:00
Tienson Qin
6c70914150
chore: replace re-find with safe-re-find
2021-05-23 13:05:35 +08:00