Update Bot

This commit is contained in:
Syxpi
2025-09-07 17:02:01 +02:00
parent 207d4e8356
commit da3d85b6bc
4441 changed files with 646084 additions and 42 deletions

View File

@@ -0,0 +1,4 @@
declare function setMaxParserCache(max: number): void;
declare function clearParserCache(): void;
export { setMaxParserCache, clearParserCache };

View File

@@ -0,0 +1,18 @@
import { setMaxParserCache, clearParserCache } from './ParserCache.js';
import {
TypeCast,
Field as TypeCastField,
Geometry as TypeCastGeometry,
Next as TypeCastNext,
Type as TypeCastType,
} from './typeCast.js';
export {
setMaxParserCache,
clearParserCache,
TypeCast,
TypeCastField,
TypeCastGeometry,
TypeCastNext,
TypeCastType,
};

View File

@@ -0,0 +1,54 @@
export type Geometry = {
x: number;
y: number;
};
export type Type = {
type:
| 'DECIMAL'
| 'TINY'
| 'SHORT'
| 'LONG'
| 'FLOAT'
| 'DOUBLE'
| 'NULL'
| 'TIMESTAMP'
| 'TIMESTAMP2'
| 'LONGLONG'
| 'INT24'
| 'DATE'
| 'TIME'
| 'TIME2'
| 'DATETIME'
| 'DATETIME2'
| 'YEAR'
| 'NEWDATE'
| 'VARCHAR'
| 'BIT'
| 'VECTOR'
| 'JSON'
| 'NEWDECIMAL'
| 'ENUM'
| 'SET'
| 'TINY_BLOB'
| 'MEDIUM_BLOB'
| 'LONG_BLOB'
| 'BLOB'
| 'VAR_STRING'
| 'STRING'
| 'GEOMETRY';
};
export type Field = Type & {
length: number;
db: string;
table: string;
name: string;
string: (encoding?: BufferEncoding | string | undefined) => string | null;
buffer: () => Buffer | null;
geometry: () => Geometry | Geometry[] | null;
};
export type Next = () => unknown;
export type TypeCast = ((field: Field, next: Next) => any) | boolean;