Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
7feeac0d78 | |
|
|
aa8a45d147 | |
|
|
4d3001ea5a | |
|
|
df0449763c |
|
|
@ -12,6 +12,7 @@ export interface IndexConfig {
|
|||
type?: 'fulltext' | 'btree' | 'hash' | 'spatial';
|
||||
parser?: 'ngram';
|
||||
tsConfig?: string | string[];
|
||||
chineseParser?: string;
|
||||
}
|
||||
export interface Index<SH extends EntityShape> {
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export interface BBWatcher<ED extends EntityDict & BaseEntityDict, T extends key
|
|||
actionData: ActionData<ED, T> | (() => Promise<ActionData<ED, T>>);
|
||||
singleton?: true;
|
||||
lazy?: true;
|
||||
exclusive?: true;
|
||||
}
|
||||
export interface WBWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
|
||||
type?: 'base';
|
||||
|
|
@ -23,6 +24,7 @@ export interface WBWatcher<ED extends EntityDict & BaseEntityDict, T extends key
|
|||
forUpdate?: true;
|
||||
singleton?: true;
|
||||
lazy?: true;
|
||||
exclusive?: true;
|
||||
}
|
||||
export interface WBFreeWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
|
||||
type: 'free';
|
||||
|
|
@ -34,6 +36,7 @@ export interface WBFreeWatcher<ED extends EntityDict & BaseEntityDict, T extends
|
|||
forUpdate?: true;
|
||||
singleton?: true;
|
||||
lazy?: true;
|
||||
exclusive?: true;
|
||||
}
|
||||
export type Watcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> = BBWatcher<ED, T> | WBWatcher<ED, T, Cxt> | WBFreeWatcher<ED, T, Cxt>;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oak-domain",
|
||||
"version": "5.1.34",
|
||||
"version": "5.1.35",
|
||||
"author": {
|
||||
"name": "XuChang"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export interface IndexConfig {
|
|||
type?: 'fulltext'|'btree'|'hash'|'spatial';
|
||||
parser?: 'ngram'; // MySQL使用paser作为分词器配置
|
||||
tsConfig?: string | string[]; // Postgres中,可以自己指定一个或者多个
|
||||
chineseParser?: string; // Postgres中,使用中文分词器时指定,例如:'zhparser'
|
||||
}
|
||||
|
||||
export interface Index<SH extends EntityShape> {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export interface BBWatcher<ED extends EntityDict & BaseEntityDict, T extends key
|
|||
actionData: ActionData<ED, T> | (() => Promise<ActionData<ED, T>>);
|
||||
singleton?: true; // 置singleton意味着在集群环境中只有一个进程会去执行
|
||||
lazy?: true; // 置lazy意味着在启动时不会立即执行,而是等到第一次调度时才执行
|
||||
exclusive?: true; // 置exclusive意味着在同一实例中不会并发处理同一条数据,而是抛出警告
|
||||
};
|
||||
|
||||
export interface WBWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
|
||||
|
|
@ -27,6 +28,7 @@ export interface WBWatcher<ED extends EntityDict & BaseEntityDict, T extends key
|
|||
forUpdate?: true;
|
||||
singleton?: true; // 置singleton意味着在集群环境中只有一个进程会去执行
|
||||
lazy?: true; // 置lazy意味着在启动时不会立即执行,而是等到第一次调度时才执行
|
||||
exclusive?: true; // 置exclusive意味着在同一实例中不会并发处理同一条数据,而是抛出警告
|
||||
};
|
||||
|
||||
export interface WBFreeWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
|
||||
|
|
@ -39,6 +41,7 @@ export interface WBFreeWatcher<ED extends EntityDict & BaseEntityDict, T extends
|
|||
forUpdate?: true;
|
||||
singleton?: true; // 置singleton意味着在集群环境中只有一个进程会去执行
|
||||
lazy?: true; // 置lazy意味着在启动时不会立即执行,而是等到第一次调度时才执行
|
||||
exclusive?: true; // 置exclusive意味着在同一实例中不会并发处理同一条数据,而是抛出警告
|
||||
};
|
||||
|
||||
export type Watcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> = BBWatcher<ED, T> | WBWatcher<ED, T, Cxt> | WBFreeWatcher<ED, T, Cxt>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue