Updates
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1,12 @@
|
||||
import { DSQL_DatabaseSchemaType } from "../../types";
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "../../types/dsql";
|
||||
type Param = {
|
||||
userId?: number | string | null;
|
||||
dbSchema: DSQL_DatabaseSchemaType;
|
||||
};
|
||||
/**
|
||||
* # Create database from Schema Function
|
||||
* @requires DSQL_DB_CONN - Gobal Variable for Datasquirel Database
|
||||
*/
|
||||
export default function checkDbRecordCreateDbSchema({ userId, dbSchema, }: Param): Promise<DSQL_DATASQUIREL_USER_DATABASES | undefined>;
|
||||
export {};
|
||||
@@ -0,0 +1,15 @@
|
||||
import { DSQL_DatabaseSchemaType, DSQL_TableSchemaType } from "../../types";
|
||||
import { DSQL_DATASQUIREL_USER_DATABASE_TABLES, DSQL_DATASQUIREL_USER_DATABASES } from "../../types/dsql";
|
||||
type Param = {
|
||||
userId?: number | string | null;
|
||||
tableSchema?: DSQL_TableSchemaType;
|
||||
dbSchema: DSQL_DatabaseSchemaType[];
|
||||
dbRecord?: DSQL_DATASQUIREL_USER_DATABASES;
|
||||
dbFullName: string;
|
||||
};
|
||||
/**
|
||||
* # Create database from Schema Function
|
||||
* @requires DSQL_DB_CONN - Gobal Variable for Datasquirel Database
|
||||
*/
|
||||
export default function checkTableRecordCreateDbSchema({ userId, tableSchema, dbSchema, dbRecord, dbFullName, }: Param): Promise<DSQL_DATASQUIREL_USER_DATABASE_TABLES | undefined>;
|
||||
export {};
|
||||
@@ -0,0 +1,14 @@
|
||||
import { DSQL_IndexSchemaType } from "../../types";
|
||||
type Param = {
|
||||
tableName: string;
|
||||
dbFullName: string;
|
||||
indexes: DSQL_IndexSchemaType[];
|
||||
};
|
||||
/**
|
||||
* Handle DATASQUIREL Table Indexes
|
||||
* ===================================================
|
||||
* @description Iterate through each datasquirel schema
|
||||
* table index(if available), and perform operations
|
||||
*/
|
||||
export default function handleIndexescreateDbFromSchema({ dbFullName, tableName, indexes, }: Param): Promise<void>;
|
||||
export {};
|
||||
@@ -0,0 +1,11 @@
|
||||
type Param = {
|
||||
userId?: number | string | null;
|
||||
targetDatabase?: string;
|
||||
dbSchemaData?: import("../../types").DSQL_DatabaseSchemaType[];
|
||||
};
|
||||
/**
|
||||
* # Create database from Schema Function
|
||||
* @requires DSQL_DB_CONN - Gobal Variable for Datasquirel Database
|
||||
*/
|
||||
export default function createDbFromSchema({ userId, targetDatabase, dbSchemaData, }: Param): Promise<boolean>;
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1,16 @@
|
||||
export interface GrantType {
|
||||
database: string;
|
||||
table: string;
|
||||
privileges: string[];
|
||||
}
|
||||
type Param = {
|
||||
username?: string;
|
||||
host?: string;
|
||||
grants?: GrantType[];
|
||||
userId: string;
|
||||
};
|
||||
/**
|
||||
* # Handle Grants for Users
|
||||
*/
|
||||
export default function handleGrants({ username, host, grants, userId, }: Param): Promise<boolean>;
|
||||
export {};
|
||||
@@ -0,0 +1,11 @@
|
||||
type Param = {
|
||||
userId?: number | string;
|
||||
mariadbUserHost?: string;
|
||||
mariadbUsername?: string;
|
||||
sqlUserID?: string | number;
|
||||
};
|
||||
/**
|
||||
* # Refresh Mariadb User Grants
|
||||
*/
|
||||
export default function refreshUsersAndGrants({ userId, mariadbUserHost, mariadbUsername, sqlUserID, }: Param): Promise<void>;
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/**
|
||||
* # Test SQL Escape
|
||||
*/
|
||||
export default function testSQLEscape(): Promise<void>;
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Convert Camel Joined Text to Camel Spaced Text
|
||||
* ==============================================================================
|
||||
* @description this function takes a camel cased text without spaces, and returns
|
||||
* a camel-case-spaced text
|
||||
*/
|
||||
export default function camelJoinedtoCamelSpace(text: string): string | null;
|
||||
@@ -0,0 +1,13 @@
|
||||
import { DSQL_TableSchemaType } from "../../types";
|
||||
type Param = {
|
||||
dbFullName: string;
|
||||
tableName: string;
|
||||
tableInfoArray: any[];
|
||||
tableSchema?: DSQL_TableSchemaType;
|
||||
recordedDbEntry?: any;
|
||||
};
|
||||
/**
|
||||
* # Create Table Functions
|
||||
*/
|
||||
export default function createTable({ dbFullName, tableName, tableInfoArray, tableSchema, recordedDbEntry, }: Param): Promise<any>;
|
||||
export {};
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
type Param = {
|
||||
query: string;
|
||||
values?: string[] | object;
|
||||
};
|
||||
/**
|
||||
* # Main DB Handler Function
|
||||
* @requires DSQL_DB_CONN - Gobal Variable for Datasquirel Database
|
||||
*/
|
||||
export default function dbHandler({ query, values, }: Param): Promise<any[] | object | null>;
|
||||
export {};
|
||||
@@ -0,0 +1,13 @@
|
||||
type Param = {
|
||||
columnData: import("../../types").DSQL_FieldSchemaType;
|
||||
primaryKeySet?: boolean;
|
||||
};
|
||||
type Return = {
|
||||
fieldEntryText: string;
|
||||
newPrimaryKeySet: boolean;
|
||||
};
|
||||
/**
|
||||
* # Generate Table Column Description
|
||||
*/
|
||||
export default function generateColumnDescription({ columnData, primaryKeySet, }: Param): Return;
|
||||
export {};
|
||||
@@ -0,0 +1 @@
|
||||
export default function noDatabaseDbHandler(queryString: string): Promise<any>;
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* # Sulg To Camel Case
|
||||
*/
|
||||
export default function slugToCamelTitle(text: string): string | null;
|
||||
@@ -0,0 +1,14 @@
|
||||
import { DSQL_FieldSchemaType } from "../../types";
|
||||
type Param = {
|
||||
tableInfoArray: DSQL_FieldSchemaType[];
|
||||
};
|
||||
/**
|
||||
* # Supplement Table
|
||||
*/
|
||||
export default function supplementTable({ tableInfoArray }: Param): DSQL_FieldSchemaType[];
|
||||
export {};
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
@@ -0,0 +1,19 @@
|
||||
type Param = {
|
||||
dbFullName: string;
|
||||
tableName: string;
|
||||
tableSchema: import("../../types").DSQL_TableSchemaType;
|
||||
tableNameFull?: string;
|
||||
tableInfoArray: import("../../types").DSQL_FieldSchemaType[];
|
||||
userId?: number | string | null;
|
||||
dbSchema: import("../../types").DSQL_DatabaseSchemaType[];
|
||||
tableIndexes?: import("../../types").DSQL_IndexSchemaType[];
|
||||
clone?: boolean;
|
||||
tableIndex?: number;
|
||||
childDb?: boolean;
|
||||
recordedDbEntry?: any;
|
||||
};
|
||||
/**
|
||||
* # Update table function
|
||||
*/
|
||||
export default function updateTable({ dbFullName, tableName, tableInfoArray, userId, dbSchema, tableIndexes, tableSchema, clone, childDb, tableIndex, tableNameFull, recordedDbEntry, }: Param): Promise<any>;
|
||||
export {};
|
||||
@@ -0,0 +1,9 @@
|
||||
type Param = {
|
||||
queryString: string;
|
||||
queryValuesArray?: string[];
|
||||
};
|
||||
/**
|
||||
* # DB handler for specific database
|
||||
*/
|
||||
export default function varDatabaseDbHandler({ queryString, queryValuesArray, }: Param): Promise<any>;
|
||||
export {};
|
||||
Reference in New Issue
Block a user