mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-09-27 01:56:16 +08:00
chore: update util functions
This commit is contained in:
5
utils/id.ts
Normal file
5
utils/id.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export const generateUUID = () => {
|
||||
return uuidv4();
|
||||
};
|
@ -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
3
utils/sql.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export const checkStatementIsSelect = (statement: string) => {
|
||||
return statement.toUpperCase().trim().startsWith("SELECT");
|
||||
};
|
Reference in New Issue
Block a user