pg table name

This commit is contained in:
archer
2023-08-14 10:36:15 +08:00
parent c5fd5706a1
commit 3a49efd46d
12 changed files with 37 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
import { Pool } from 'pg';
import type { QueryResultRow } from 'pg';
import { PgTrainingTableName } from '@/constants/plugin';
export const connectPg = async () => {
if (global.pgClient) {
@@ -173,7 +174,7 @@ export const insertKbItem = ({
source?: string;
}[];
}) => {
return PgClient.insert('modelData', {
return PgClient.insert(PgTrainingTableName, {
values: data.map((item) => [
{ key: 'user_id', value: userId },
{ key: 'kb_id', value: kbId },