1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-28 00:01:31 +02:00

add index.d.ts for persistent adapter

This commit is contained in:
Thomas Wilkerling
2025-05-06 09:01:12 +02:00
parent 042ef7f067
commit 58c1a09cfd
6 changed files with 246 additions and 0 deletions

41
src/db/clickhouse/index.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
declare module "flexsearch/db/clickhouse" {
type IdType =
"text" |
"char" |
"varchar" |
"string" |
"number" |
"numeric" |
"integer" |
"smallint" |
"tinyint" |
"mediumint" |
"int" |
"int8" |
"uint8" |
"int16" |
"uint16" |
"int32" |
"uint32" |
"int64" |
"uint64" |
"bigint";
type PersistentOptions = {
name?: string;
type?: IdType;
db?: any;
};
export default class StorageInterface {
constructor(name: string, config: PersistentOptions);
constructor(config: string | PersistentOptions);
//mount(index: Index | Document) : Promise<void>;
open() : Promise<void>;
close() : Promise<void>;
destroy() : Promise<void>;
clear() : Promise<void>;
db: any;
}
}

41
src/db/indexeddb/index.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
declare module "flexsearch/db/indexeddb" {
type IdType =
"text" |
"char" |
"varchar" |
"string" |
"number" |
"numeric" |
"integer" |
"smallint" |
"tinyint" |
"mediumint" |
"int" |
"int8" |
"uint8" |
"int16" |
"uint16" |
"int32" |
"uint32" |
"int64" |
"uint64" |
"bigint";
type PersistentOptions = {
name?: string;
type?: IdType;
db?: IDBDatabase;
};
export default class StorageInterface {
constructor(name: string, config: PersistentOptions);
constructor(config: string | PersistentOptions);
//mount(index: Index | Document) : Promise<void>;
open() : Promise<void>;
close() : Promise<void>;
destroy() : Promise<void>;
clear() : Promise<void>;
db: IDBDatabase;
}
}

41
src/db/mongodb/index.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
declare module "flexsearch/db/mongodb" {
type IdType =
"text" |
"char" |
"varchar" |
"string" |
"number" |
"numeric" |
"integer" |
"smallint" |
"tinyint" |
"mediumint" |
"int" |
"int8" |
"uint8" |
"int16" |
"uint16" |
"int32" |
"uint32" |
"int64" |
"uint64" |
"bigint";
type PersistentOptions = {
name?: string;
type?: IdType;
db?: any;
};
export default class StorageInterface {
constructor(name: string, config: PersistentOptions);
constructor(config: string | PersistentOptions);
//mount(index: Index | Document) : Promise<void>;
open() : Promise<void>;
close() : Promise<void>;
destroy() : Promise<void>;
clear() : Promise<void>;
db: any;
}
}

41
src/db/postgres/index.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
declare module "flexsearch/db/postgres" {
type IdType =
"text" |
"char" |
"varchar" |
"string" |
"number" |
"numeric" |
"integer" |
"smallint" |
"tinyint" |
"mediumint" |
"int" |
"int8" |
"uint8" |
"int16" |
"uint16" |
"int32" |
"uint32" |
"int64" |
"uint64" |
"bigint";
type PersistentOptions = {
name?: string;
type?: IdType;
db?: any;
};
export default class StorageInterface {
constructor(name: string, config: PersistentOptions);
constructor(config: string | PersistentOptions);
//mount(index: Index | Document) : Promise<void>;
open() : Promise<void>;
close() : Promise<void>;
destroy() : Promise<void>;
clear() : Promise<void>;
db: any;
}
}

41
src/db/redis/index.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
declare module "flexsearch/db/redis" {
type IdType =
"text" |
"char" |
"varchar" |
"string" |
"number" |
"numeric" |
"integer" |
"smallint" |
"tinyint" |
"mediumint" |
"int" |
"int8" |
"uint8" |
"int16" |
"uint16" |
"int32" |
"uint32" |
"int64" |
"uint64" |
"bigint";
type PersistentOptions = {
name?: string;
type?: IdType;
db?: any;
};
export default class StorageInterface {
constructor(name: string, config: PersistentOptions);
constructor(config: string | PersistentOptions);
//mount(index: Index | Document) : Promise<void>;
open() : Promise<void>;
close() : Promise<void>;
destroy() : Promise<void>;
clear() : Promise<void>;
db: any;
}
}

41
src/db/sqlite/index.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
declare module "flexsearch/db/sqlite" {
type IdType =
"text" |
"char" |
"varchar" |
"string" |
"number" |
"numeric" |
"integer" |
"smallint" |
"tinyint" |
"mediumint" |
"int" |
"int8" |
"uint8" |
"int16" |
"uint16" |
"int32" |
"uint32" |
"int64" |
"uint64" |
"bigint";
type PersistentOptions = {
name?: string;
type?: IdType;
db?: any;
};
export default class StorageInterface {
constructor(name: string, config: PersistentOptions);
constructor(config: string | PersistentOptions);
//mount(index: Index | Document) : Promise<void>;
open() : Promise<void>;
close() : Promise<void>;
destroy() : Promise<void>;
clear() : Promise<void>;
db: any;
}
}