various fixes: refactored imports, introduced fromDriver/toDriver to improve compat

This commit is contained in:
dswbx
2025-06-13 21:15:29 +02:00
parent cc038a0a9a
commit 2ada4e9f20
15 changed files with 100 additions and 35 deletions

View File

@@ -20,6 +20,7 @@ import {
import type { BaseIntrospector, BaseIntrospectorConfig } from "./BaseIntrospector";
import type { Constructor, DB } from "core";
import { KyselyPluginRunner } from "data/plugins/KyselyPluginRunner";
import type { Field } from "data/fields/Field";
export type QB = SelectQueryBuilder<any, any, any>;
@@ -200,6 +201,14 @@ export abstract class Connection<Client = unknown> {
abstract getFieldSchema(spec: FieldSpec, strict?: boolean): SchemaResponse;
toDriver(value: unknown, field: Field): unknown {
return value;
}
fromDriver(value: any, field: Field): unknown {
return value;
}
async close(): Promise<void> {
// no-op by default
}