@jsstudio/development-api-interceptor
Version:
development-api-interceptor
36 lines (35 loc) • 1.21 kB
TypeScript
import { JsonSchema } from '../../interfaces/json-schema';
export declare class Relationship {
/**
* Validate if relationship valid or not.
*
* @param {JsonSchema} jsonSchema - Json object received from frontend .
* @returns { boolean} isValid .
*/
isRelationshipValid(jsonSchema: JsonSchema): boolean;
/**
* Check if Associated table and column exist or not.
*
* @param {Table} tables - Table array object .
* @param {string} table - AssociatedTable string value .
* @param {string} columnName - Associated table column name .
* @returns {object} tableCol .
*/
private getAssociatedTableCol;
/**
* Check if foreign key column exist or not .
*
* @param {Table} table - table string value .
* @param {string} foreignKey - table column name .
* @returns {object} foreignColObj .
*/
private getForeignKeyCol;
/**
* Check if foreign key column and associated table column type same .
*
* @param {Column} foreignColObj - table string value .
* @param {Column} associatedColObj - table column name .
* @returns {boolean} .
*/
private isColTypeSame;
}