Types, better-sqlite3, and worker_threads for our sqlite
This commit is contained in:
parent
fc3004a183
commit
37c8c1727f
24 changed files with 2823 additions and 3121 deletions
|
@ -5,6 +5,10 @@ import { omit, reject } from 'lodash';
|
|||
|
||||
import { normalize } from '../../types/PhoneNumber';
|
||||
import { cleanSearchTerm } from '../../util/cleanSearchTerm';
|
||||
import {
|
||||
ClientSearchResultMessageType,
|
||||
ClientInterface,
|
||||
} from '../../sql/Interface';
|
||||
import dataInterface from '../../sql/Client';
|
||||
import { makeLookup } from '../../util/makeLookup';
|
||||
import { BodyRangesType } from '../../types/Util';
|
||||
|
@ -23,7 +27,7 @@ const {
|
|||
searchConversations: dataSearchConversations,
|
||||
searchMessages: dataSearchMessages,
|
||||
searchMessagesInConversation,
|
||||
} = dataInterface;
|
||||
}: ClientInterface = dataInterface;
|
||||
|
||||
// State
|
||||
|
||||
|
@ -244,7 +248,10 @@ function updateSearchTerm(query: string): UpdateSearchTermActionType {
|
|||
};
|
||||
}
|
||||
|
||||
async function queryMessages(query: string, searchConversationId?: string) {
|
||||
async function queryMessages(
|
||||
query: string,
|
||||
searchConversationId?: string
|
||||
): Promise<Array<ClientSearchResultMessageType>> {
|
||||
try {
|
||||
const normalized = cleanSearchTerm(query);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue