import { Any, List } from "@mantlebee/ts-core"; import { RowsCountsMap, Dataset, TableKey } from "./types"; import { ColumnAbstract } from "./models"; import { ITable } from "./interfaces"; /** * Creates a typed key for the {@link Table} model. * The `description` property of the key is the name of the table. */ export declare const createTableKey: (tableName: string) => TableKey; /** * Generates a database dataset using the given tables and relations. * It is separated into two steps: * 1. it generates the table rows. * 2. process the relation columnss to update the rows values. * Columns of type relation of the tables are processed during the second step if and only if a relation referring that column is present. If not, the default value is not updated. * @param tables List of tables forming part of the database. * @param rowsCountsMap Dictionary with the tables counts, used to generate a specific amount of rows for each table. It is a dictionary where the keys are the tables keys and the values the row counts to generate. * @returns the database dataset, it is a dictionary, where the keys are the tables' keys, and the values are the generated rows. */ export declare function getDatabaseDataset(tables: List>, rowsCountsMap: RowsCountsMap): Dataset; export declare const getDatasetRows: (dataset: Dataset, tableKey: TableKey) => List; /** * Generates rows for a table where the keys are the columns names. * If the column if nullable, the {@link shouldBeNull} defines if the `null` value is used or a random one must be generated by the column {@link IColumn["getValue"]} method. * @param columns List of columns used to update the rows values. * @param rowsCount Number of rows to generated. * @returns Rows generated where the keys are the columns names. */ export declare function getTableRows(columns: List>, rowsCount: number): List;