Updates
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { DbContextsArray } from "./runQuery";
|
||||
type Param = {
|
||||
dbContext?: (typeof DbContextsArray)[number];
|
||||
paradigm?: "Read Only" | "Full Access";
|
||||
dbFullName?: string;
|
||||
tableName: string;
|
||||
data: any;
|
||||
tableSchema?: import("../../../types").DSQL_TableSchemaType;
|
||||
duplicateColumnName?: string;
|
||||
duplicateColumnValue?: string;
|
||||
update?: boolean;
|
||||
encryptionKey?: string;
|
||||
encryptionSalt?: string;
|
||||
forceLocal?: boolean;
|
||||
};
|
||||
/**
|
||||
* Add a db Entry Function
|
||||
*/
|
||||
export default function addDbEntry({ dbContext, paradigm, dbFullName, tableName, data, tableSchema, duplicateColumnName, duplicateColumnValue, update, encryptionKey, encryptionSalt, forceLocal, }: Param): Promise<any>;
|
||||
export {};
|
||||
@@ -0,0 +1,16 @@
|
||||
import { DbContextsArray } from "./runQuery";
|
||||
type Param = {
|
||||
dbContext?: (typeof DbContextsArray)[number];
|
||||
dbFullName: string;
|
||||
tableName: string;
|
||||
tableSchema?: import("../../../types").DSQL_TableSchemaType;
|
||||
identifierColumnName: string;
|
||||
identifierValue: string | number;
|
||||
forceLocal?: boolean;
|
||||
};
|
||||
/**
|
||||
* # Delete DB Entry Function
|
||||
* @description
|
||||
*/
|
||||
export default function deleteDbEntry({ dbContext, dbFullName, tableName, identifierColumnName, identifierValue, forceLocal, }: Param): Promise<object | null>;
|
||||
export {};
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* # Path Traversal Check
|
||||
* @returns {string}
|
||||
*/
|
||||
export default function pathTraversalCheck(text: string | number): string;
|
||||
@@ -0,0 +1,21 @@
|
||||
export declare const DbContextsArray: readonly ["Master", "Dsql User"];
|
||||
type Param = {
|
||||
dbContext?: (typeof DbContextsArray)[number];
|
||||
dbFullName: string;
|
||||
query: string | any;
|
||||
readOnly?: boolean;
|
||||
debug?: boolean;
|
||||
dbSchema?: import("../../../types").DSQL_DatabaseSchemaType;
|
||||
queryValuesArray?: (string | number)[];
|
||||
tableName?: string;
|
||||
forceLocal?: boolean;
|
||||
};
|
||||
type Return = {
|
||||
result: any;
|
||||
error?: string;
|
||||
};
|
||||
/**
|
||||
* # Run DSQL users queries
|
||||
*/
|
||||
export default function runQuery({ dbFullName, query, readOnly, dbSchema, queryValuesArray, tableName, debug, dbContext, forceLocal, }: Param): Promise<Return>;
|
||||
export {};
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Sanitize SQL function
|
||||
* ==============================================================================
|
||||
* @description this function takes in a text(or number) and returns a sanitized
|
||||
* text, usually without spaces
|
||||
*/
|
||||
declare function sanitizeSql(text: any, spaces?: boolean, regex?: RegExp | null): any;
|
||||
export default sanitizeSql;
|
||||
@@ -0,0 +1,19 @@
|
||||
import { DbContextsArray } from "./runQuery";
|
||||
type Param = {
|
||||
dbContext?: (typeof DbContextsArray)[number];
|
||||
dbFullName?: string;
|
||||
tableName: string;
|
||||
encryptionKey?: string;
|
||||
encryptionSalt?: string;
|
||||
data: any;
|
||||
tableSchema?: import("../../../types").DSQL_TableSchemaType;
|
||||
identifierColumnName: string;
|
||||
identifierValue: string | number;
|
||||
forceLocal?: boolean;
|
||||
};
|
||||
/**
|
||||
* # Update DB Function
|
||||
* @description
|
||||
*/
|
||||
export default function updateDbEntry({ dbContext, dbFullName, tableName, data, tableSchema, identifierColumnName, identifierValue, encryptionKey, encryptionSalt, forceLocal, }: Param): Promise<object | null>;
|
||||
export {};
|
||||
Reference in New Issue
Block a user