bun-sqlite-key-value
Advanced tools
Comparing version 1.9.1 to 1.9.2
@@ -1,101 +0,92 @@ | ||
// Generated by dts-bundle-generator v9.5.1 | ||
import { Database } from 'bun:sqlite'; | ||
import { Database } from "bun:sqlite"; | ||
export interface Item<T> { | ||
key: string; | ||
value: T | undefined; | ||
key: string; | ||
value: T | undefined; | ||
} | ||
interface Record$1 { | ||
key: string; | ||
value: Buffer | null; | ||
expires: number | null; | ||
export interface Record { | ||
key: string; | ||
value: Buffer | null; | ||
expires: number | null; | ||
} | ||
export interface Options { | ||
readonly?: boolean; | ||
create?: boolean; | ||
readwrite?: boolean; | ||
ttlMs?: number; | ||
readonly?: boolean; | ||
create?: boolean; | ||
readwrite?: boolean; | ||
ttlMs?: number; | ||
} | ||
export declare class BunSqliteKeyValue { | ||
db: Database; | ||
ttlMs: number | undefined; | ||
data: { | ||
[key: string]: any; | ||
}; | ||
d: { | ||
[key: string]: any; | ||
}; | ||
private deleteExpiredStatement; | ||
private deleteStatement; | ||
private clearStatement; | ||
private countStatement; | ||
private countValidStatement; | ||
private setItemStatement; | ||
private getItemStatement; | ||
private getAllItemsStatement; | ||
private getItemsStartsWithStatement; | ||
private getKeyStatement; | ||
private getAllKeysStatement; | ||
private getKeysStartsWithStatement; | ||
private countExpiringStatement; | ||
private deleteExpiringStatement; | ||
private getRandomKeyStatement; | ||
private getRandomItemStatement; | ||
constructor(filename?: string, options?: Options); | ||
deleteExpired(): void; | ||
delete(keyOrKeys?: string | string[]): void; | ||
del: (keyOrKeys?: string | string[]) => void; | ||
clear(): void; | ||
close(): void; | ||
getCount(): number; | ||
count: () => number; | ||
get length(): number; | ||
getCountValid(deleteExpired?: boolean): number; | ||
set<T = any>(key: string, value: T, ttlMs?: number): void; | ||
setValue: <T = any>(key: string, value: T, ttlMs?: number) => void; | ||
put: <T = any>(key: string, value: T, ttlMs?: number) => void; | ||
setItems<T = any>(items: { | ||
key: string; | ||
value: T; | ||
ttlMs?: number; | ||
}[]): void; | ||
get<T = any>(key: string): T | undefined; | ||
getValue: <T = any>(key: string) => T | undefined; | ||
getItem<T = any>(key: string): Item<T> | undefined; | ||
getItems<T = any>(startsWithOrKeys?: string | string[]): Item<T>[] | undefined; | ||
getItemsArray: <T = any>(startsWithOrKeys?: string | string[]) => Item<T>[] | undefined; | ||
get items(): Item<any>[] | undefined; | ||
getValues<T = any>(startsWithOrKeys?: string | string[]): (T | undefined)[] | undefined; | ||
getValuesArray: <T = any>(startsWithOrKeys?: string | string[]) => (T | undefined)[] | undefined; | ||
get values(): any[] | undefined; | ||
getItemsObject<T = any>(startsWithOrKeys?: string | string[]): { | ||
[key: string]: T | undefined; | ||
} | undefined; | ||
getItemsMap<T = any>(startsWithOrKeys?: string | string[]): Map<string, T | undefined> | undefined; | ||
getValuesSet<T = any>(startsWithOrKeys?: string | string[]): Set<T> | undefined; | ||
has(key: string): boolean; | ||
exists: (key: string) => boolean; | ||
getKeys(startsWithOrKeys?: string | string[]): string[] | undefined; | ||
get keys(): string[] | undefined; | ||
getExpiringItemsCount(): number; | ||
deleteOldExpiringItems(maxExpiringItemsInDb: number): void; | ||
deleteOldestExpiringItems: (maxExpiringItemsInDb: number) => void; | ||
private getDataObject; | ||
incr(key: string, incrBy?: number, ttlMs?: number): number; | ||
decr(key: string, decrBy?: number, ttlMs?: number): number; | ||
append(key: string, value: string, ttlMs?: number): number; | ||
getSet<T = any>(key: string, value: T, ttlMs?: number): T | undefined; | ||
getRandomKey(): string | undefined; | ||
randomKey: () => string | undefined; | ||
getRandomItem<T = any>(): Item<T> | undefined; | ||
randomItem: <T = any>() => Item<T> | undefined; | ||
getRandomValue<T = any>(): T | undefined; | ||
randomValue: <T = any>() => T | undefined; | ||
db: Database; | ||
ttlMs: number | undefined; | ||
data: { | ||
[key: string]: any; | ||
}; | ||
d: { | ||
[key: string]: any; | ||
}; | ||
private deleteExpiredStatement; | ||
private deleteStatement; | ||
private clearStatement; | ||
private countStatement; | ||
private countValidStatement; | ||
private setItemStatement; | ||
private getItemStatement; | ||
private getAllItemsStatement; | ||
private getItemsStartsWithStatement; | ||
private getKeyStatement; | ||
private getAllKeysStatement; | ||
private getKeysStartsWithStatement; | ||
private countExpiringStatement; | ||
private deleteExpiringStatement; | ||
private getRandomKeyStatement; | ||
private getRandomItemStatement; | ||
constructor(filename?: string, options?: Options); | ||
deleteExpired(): void; | ||
delete(keyOrKeys?: string | string[]): void; | ||
del: (keyOrKeys?: string | string[]) => void; | ||
clear(): void; | ||
close(): void; | ||
getCount(): number; | ||
count: () => number; | ||
get length(): number; | ||
getCountValid(deleteExpired?: boolean): number; | ||
set<T = any>(key: string, value: T, ttlMs?: number): void; | ||
setValue: <T = any>(key: string, value: T, ttlMs?: number) => void; | ||
put: <T = any>(key: string, value: T, ttlMs?: number) => void; | ||
setItems<T = any>(items: { | ||
key: string; | ||
value: T; | ||
ttlMs?: number; | ||
}[]): void; | ||
get<T = any>(key: string): T | undefined; | ||
getValue: <T = any>(key: string) => T | undefined; | ||
getItem<T = any>(key: string): Item<T> | undefined; | ||
getItems<T = any>(startsWithOrKeys?: string | string[]): Item<T>[] | undefined; | ||
getItemsArray: <T = any>(startsWithOrKeys?: string | string[]) => Item<T>[] | undefined; | ||
get items(): Item<any>[] | undefined; | ||
getValues<T = any>(startsWithOrKeys?: string | string[]): (T | undefined)[] | undefined; | ||
getValuesArray: <T = any>(startsWithOrKeys?: string | string[]) => (T | undefined)[] | undefined; | ||
get values(): any[] | undefined; | ||
getItemsObject<T = any>(startsWithOrKeys?: string | string[]): { | ||
[key: string]: T | undefined; | ||
} | undefined; | ||
getItemsMap<T = any>(startsWithOrKeys?: string | string[]): Map<string, T | undefined> | undefined; | ||
getValuesSet<T = any>(startsWithOrKeys?: string | string[]): Set<T> | undefined; | ||
has(key: string): boolean; | ||
exists: (key: string) => boolean; | ||
getKeys(startsWithOrKeys?: string | string[]): string[] | undefined; | ||
get keys(): string[] | undefined; | ||
getExpiringItemsCount(): number; | ||
deleteOldExpiringItems(maxExpiringItemsInDb: number): void; | ||
deleteOldestExpiringItems: (maxExpiringItemsInDb: number) => void; | ||
private getDataObject; | ||
incr(key: string, incrBy?: number, ttlMs?: number): number; | ||
decr(key: string, decrBy?: number, ttlMs?: number): number; | ||
append(key: string, value: string, ttlMs?: number): number; | ||
getSet<T = any>(key: string, value: T, ttlMs?: number): T | undefined; | ||
getRandomKey(): string | undefined; | ||
randomKey: () => string | undefined; | ||
getRandomItem<T = any>(): Item<T> | undefined; | ||
randomItem: <T = any>() => Item<T> | undefined; | ||
getRandomValue<T = any>(): T | undefined; | ||
randomValue: <T = any>() => T | undefined; | ||
} | ||
export { | ||
Record$1 as Record, | ||
}; | ||
export {}; |
@@ -378,3 +378,1 @@ // src/index.ts | ||
}; | ||
//# debugId=1A018DFF5686F1D564756E2164756E21 |
{ | ||
"name": "bun-sqlite-key-value", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"author": { | ||
@@ -16,4 +16,3 @@ "name": "Gerold Penz", | ||
"devDependencies": { | ||
"@types/bun": "latest", | ||
"bun-plugin-dts": "^0.2.3" | ||
"@types/bun": "latest" | ||
}, | ||
@@ -54,3 +53,5 @@ "peerDependencies": { | ||
"test": "bun test", | ||
"build": "bun run build.ts", | ||
"bun:build": "bun build ./src/index.ts --outdir=./dist --target=node", | ||
"tsc:dts": "bunx tsc --project ./tsconfigDts.json --declaration", | ||
"build": "bun run bun:build && bun run tsc:dts", | ||
"increment_package_version": "npm version patch --no-git-tag-version", | ||
@@ -57,0 +58,0 @@ "prepublishOnly": "bun run test && bun run build", |
1
62694
6
1019