Damien Elmes
46cd7f23f5
added needs to use milliseconds
2020-03-20 21:15:23 +10:00
Damien Elmes
089e059951
tolerate some string IDs
2020-03-20 21:15:23 +10:00
Damien Elmes
1e21fa325b
handle empty searches and leading/trailing whitespace
2020-03-20 21:15:23 +10:00
Damien Elmes
61391a760c
add remaining tests and fix some clippy lints
2020-03-20 21:15:23 +10:00
Damien Elmes
ed009e4fbb
fix rated and state searches
2020-03-20 21:15:23 +10:00
Damien Elmes
986f6c4437
fix tags, more tests
2020-03-20 21:15:23 +10:00
Damien Elmes
274e0ef315
fix cards
2020-03-20 21:15:23 +10:00
Damien Elmes
c3c56d7cf2
fix decks
2020-03-20 21:15:23 +10:00
Damien Elmes
518836e434
fix added
2020-03-20 21:15:23 +10:00
Damien Elmes
3fb5066152
fix qualified search
2020-03-20 21:15:23 +10:00
Damien Elmes
ac8534f4ee
fix escape handling, and handle sql wildcards
2020-03-20 21:15:23 +10:00
Damien Elmes
8f38ad8aa2
avoid extra sql binding in unqualified search
2020-03-20 21:15:23 +10:00
Damien Elmes
b087ebc845
start on search tests
2020-03-20 21:15:23 +10:00
Damien Elmes
f36857ae27
prototype of integration
...
no ordering yet, and no tests
2020-03-20 21:15:23 +10:00
Damien Elmes
6c469a96eb
finish the remaining searches
...
Searches that require multiple deck or note type lookups won't perform
very well at the moment - it either needs caching or to be split up
at the DB level.
Nothing tested yet.
2020-03-20 21:15:23 +10:00
Damien Elmes
a85646bb05
ctx->req
2020-03-20 21:15:23 +10:00
Damien Elmes
3227fc1b9b
add timing to search
2020-03-20 21:15:23 +10:00
Damien Elmes
4f1c85bf8a
add v1 and v2 legacy timing code
2020-03-20 21:15:23 +10:00
Damien Elmes
1b2ebfcf6f
deck searching
...
A bit more complicated than it needs to be, as we don't have the
full deck manager infrastructure yet.
2020-03-20 21:15:23 +10:00
Damien Elmes
91270251bf
address some clippy lints
2020-03-20 21:15:23 +10:00
Damien Elmes
490e2b3cd3
move html stripping out of field_checksum into caller
2020-03-20 21:15:23 +10:00
Damien Elmes
eef158b20c
add field_at_index() sql func
2020-03-20 21:15:23 +10:00
Damien Elmes
445fa4876a
more searching work
2020-03-20 21:15:23 +10:00
Damien Elmes
3b6fef5613
add card queue/type enums
2020-03-20 21:15:23 +10:00
Damien Elmes
4217031780
separate out template ordinal and name search
2020-03-20 21:15:23 +10:00
Damien Elmes
0b33131971
use .eq_ignore_ascii_case() to avoid allocating
2020-03-20 21:15:23 +10:00
Damien Elmes
1b2af8054a
field_checksum needs to strip HTML
2020-03-20 21:15:23 +10:00
Damien Elmes
819d432e12
start of searching sql
2020-03-20 21:15:23 +10:00
Damien Elmes
4014e054a9
ensure rated ease in range
2020-03-20 21:15:23 +10:00
Damien Elmes
28defd2b3c
ensure id list not empty
2020-03-20 21:15:23 +10:00
Damien Elmes
02af7b2ab1
decode search terms in parser
2020-03-20 21:15:23 +10:00
Damien Elmes
c12ebc6124
split up searches with a qualifier
2020-03-20 21:15:23 +10:00
Damien Elmes
43f21b8135
basic search parsing
2020-03-20 21:15:23 +10:00
Damien Elmes
5a20d9da79
release mutex before beginning media sync
...
And check media sync is not running on close
2020-03-20 21:15:23 +10:00
Damien Elmes
a321efe9db
fix media sync being logged to console
2020-03-20 21:15:23 +10:00
Damien Elmes
5aba5c3ab9
drop the separate i18n backend
2020-03-20 21:15:23 +10:00
Damien Elmes
e5f883d1c3
support opening and closing the DB while keeping backend alive
...
This is safer than just dropping the backend, as .close() will
block if something else is holding the mutex. Also means we can
drop the extra I18nBackend code.
Media syncing still needs fixing.
2020-03-20 21:15:23 +10:00
Damien Elmes
c710580604
move media folder/db paths into collection
...
this breaks background media syncing for now
2020-03-20 21:15:23 +10:00
Damien Elmes
8c8674f57b
drop unused col_path
2020-03-20 21:15:23 +10:00
Damien Elmes
3cacc00fc3
make the collection optional
2020-03-20 21:15:23 +10:00
Damien Elmes
116f7fa3f1
support first_row_only
2020-03-20 21:15:23 +10:00
Damien Elmes
7e5f713f05
proper implementation of executemany(); drop executescript()
2020-03-20 21:15:23 +10:00
Damien Elmes
121687ea91
wrap the collection in a mutex so DB access is thread safe
2020-03-20 21:15:23 +10:00
Damien Elmes
e72d21e09e
move note code into notes.rs, add ability to rollback when unchanged
2020-03-20 21:15:23 +10:00
Damien Elmes
3f3a45e2ba
add Collection struct, and get media check working again
...
- media check no longer needs collection to be closed
- use savepoints for operations initiated by Rust, so they are
atomic without forcing a commit
2020-03-20 21:15:23 +10:00
Damien Elmes
700d713f80
add begin/commit/rollback, and support creating collections
...
all but one unit test is now passing
2020-03-20 21:15:23 +10:00
Damien Elmes
bd7ded18c3
drop the protobuf prototype
2020-03-20 21:15:23 +10:00
Damien Elmes
38d4ea5311
use (or)json for DB bridge
...
Some initial testing with orjson indicates performance varies from
slightly better than pysqlite to about 2x slower depending on the type
of query.
Performance could be improved by building the Python list in rspy
instead of sending back json that needs to be decoded, but it may make
more sense to rewrite the hotspots in Rust instead. More testing is
required in any case.
2020-03-20 21:15:23 +10:00
Damien Elmes
a129b8f8cf
initial work on DB handling in Rust
...
committing the Protobuf implementation for posterity, but will replace
it with json, as Protobuf measures about 6x slower for some workloads
like 'select * from notes'
2020-03-20 21:15:23 +10:00
Damien Elmes
1d6c084c2b
fix clippy lint on other platforms
2020-03-19 10:58:52 +10:00