Updates
This commit is contained in:
@@ -1,20 +1,4 @@
|
||||
interface SQLInsertGenReturn {
|
||||
query: string;
|
||||
values: string[];
|
||||
}
|
||||
|
||||
type DataFn = () => {
|
||||
placeholder: string;
|
||||
value: string | number | Float32Array<ArrayBuffer>;
|
||||
};
|
||||
|
||||
type DataType = { [k: string]: string | number | DataFn | undefined | null };
|
||||
|
||||
type Params = {
|
||||
data: DataType[];
|
||||
tableName: string;
|
||||
dbFullName?: string;
|
||||
};
|
||||
import { SQLInsertGenParams, SQLInsertGenReturn } from "../../../types";
|
||||
|
||||
/**
|
||||
* # SQL Insert Generator
|
||||
@@ -23,7 +7,7 @@ export default function sqlInsertGenerator({
|
||||
tableName,
|
||||
data,
|
||||
dbFullName,
|
||||
}: Params): SQLInsertGenReturn | undefined {
|
||||
}: SQLInsertGenParams): SQLInsertGenReturn | undefined {
|
||||
const finalDbName = dbFullName ? `${dbFullName}.` : "";
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user