Skip to content

Commit 10737d2

Browse files
committed
todo
1 parent 777c18b commit 10737d2

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

TODO.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## General
44

5+
- use JSDoc to move types back to implementations as much as possible, so subclassing etc works
6+
- probably everything we need is covered by JSDoc now
57
- allow using https://github.com/rqlite/rqlite-js as a backend for a distributed DB
68
- Change the multi-access tests to use `"file:memdb1?mode=memory&cache=shared"` for shared access to the same in-memory db (probably when using better-sqlite, it requires file uri support)
79
- Give DB and ESDB the same API for registering models (.addModel)
@@ -55,19 +57,20 @@
5557

5658
### Important
5759

58-
- [x] .each should get concurrent=5 parameter
59-
- concurrent workers process in-memory queue
60-
- batchSize=50 indicates how many results to load in memory for processing
6160
- [ ] .each() limit should apply to total fetched, breaking change
62-
- [ ] FTS5 support for text searching
63-
- Real columns marked `textSearch: true|string|object` generate a FTS5 index
64-
- one index per textSearch value ("tag")
61+
- FTS5 support for text searching on columns
6562
- It uses the table as a backing table
66-
- FTS options can be passed as an object with `tag` for the textSearch value
67-
- Searching passes the search argument to the tagged FTS5 index limited to the column
68-
- Changes are applied by JM, not triggers. Generating
69-
The tags are there to allow multilingual searching. Another column should be added to allow searching all columns in the tagged index.
70-
Need to come up with nicer configuration keys. Also something for custom tokenizing
63+
- Real columns marked `fts: true|object` generate a FTS5 index
64+
- `true` is shorthand for `{group: 'all', allColumns: false}`
65+
- `group` is a name for the index so you can group columns in separate indexes, for example by language
66+
- `allColumns`, if true, means to search all columns for this group. This can be used on non-real columns
67+
- Content columns have to be real columns, otherwise FTS5 can't refer to them. So, throw an error if the column not real except if `allColumns: true`.
68+
- `textSearch: true` should be deprecated and means `fts: {group: 'all'}` if `real: true`
69+
- other options could be added to configure tokenizing
70+
- one index per `fts.group` value (, defaults to `'all'`)
71+
- Searching passes the search argument to the FTS5 index of the group
72+
- The search is limited to the column unless `allColumns: true`
73+
- ¿Updates to the FTS index are applied by JsonModel, not triggers? why/why not
7174
- [ ] columns using the same path should get the same JSON path. There are some edge cases.
7275
- [ ] falsyBool paging doesn't work because it tries to >= and that fails for null. It should add a "sortable: false" flag
7376

@@ -80,7 +83,7 @@
8083
- [ ] recreate index if expression changes
8184
- [ ] indexes: `[{expression, where}]` extra indexes
8285
- [ ] auto-delete other indexes, API change
83-
- [x] if column value is function, call with `({columnName})` => helpers
86+
- column helpers:
8487
- [ ] objectColumn() helper -> type=JSON, NULL === {}, stringify checks if object (char 0 is `{`)
8588
- [ ] boolColumn() -> `type="INTEGER"; parse = Boolean; stringify=Boolean`
8689
- [ ] falsyColumn() -> implement falsyBool
@@ -118,7 +121,6 @@
118121

119122
### Nice to have
120123

121-
- [x] provide event creators for each type of change
122124
- [ ] .get for the RO ESModel uses .getCached, with a caching-map limiting the amount, cleared when the version changes
123125
- [ ] .changeId (`mv:[[oldId, newId],…]` apply action?)
124126

@@ -130,12 +132,10 @@
130132
- Ideally, the results go in a different db that can be split at will.
131133
- for multi-process, lock the result db exclusively to worker
132134
- re-processing events clears all subevent rows
133-
- [x] Add `transact` phase after the other phases, in which `dispatch` works as well as ESModel dispatches. This enables easier event handling with ESModel changes.
134135
- [ ] Add `beforeApply` phase which runs after all reducers ran so it has access to the state of the DB before the changes are applied.
135136

136137
### Nice to have
137138

138-
- [x] allow passing events to dispatch as objects with type
139139
- [ ] add eventSpy, e.g. `eSDB.debug(boolean|{filter()})`
140140
- [ ] in non-prod, randomly run preprocessor twice (keep event in memory and restart handling) to verify repeatability
141141
- [ ] don't store empty result sub-events

0 commit comments

Comments
 (0)