chore: update util functions

This commit is contained in:
steven
2023-03-28 17:10:43 +08:00
parent 3e7dd33013
commit 55a2f99e2d
6 changed files with 19 additions and 10 deletions

5
utils/id.ts Normal file
View File

@ -0,0 +1,5 @@
import { v4 as uuidv4 } from "uuid";
export const generateUUID = () => {
return uuidv4();
};

View File

@ -1,5 +1,3 @@
import { v4 as uuidv4 } from "uuid";
export const generateUUID = () => {
return uuidv4();
};
export * from "./id";
export * from "./openai";
export * from "./sql";

3
utils/sql.ts Normal file
View File

@ -0,0 +1,3 @@
export const checkStatementIsSelect = (statement: string) => {
return statement.toUpperCase().trim().startsWith("SELECT");
};