diff --git a/src/interfaces/database/IDbFactorize.ts b/src/interfaces/database/IDbFactorize.ts new file mode 100644 index 0000000..b784242 --- /dev/null +++ b/src/interfaces/database/IDbFactorize.ts @@ -0,0 +1,48 @@ +/** + * Represents the output of the factorization function. + */ +export interface IDbFactorizeOutput { + /** + * Description: The variable `_valuesArray` is an array that can contain values of type `string`, `boolean`, `number`, or `Date`. + * (The value associated with the keys of `_keysTemplate`) + * + * @type {Array} + */ + _valuesArray: Array; + /** + * Represents the SQL Query template for the keys. + * @type {string} + */ + _keysTemplate: string; + /** + * The total number of fields. + * + * @type {number} + */ + totalFields: number; +} + +/** + * Interface IDbFactorizeInput represents the input required to factorize a SQL query. + */ +export interface IDbFactorizeInput { + /** + * An object containing values that will be in a SQL Query. + * + * @type {Array} + */ + values: object; + /** + * Represents the name of the action that will result of the prepared SQL Query. + * + * @type {string} + */ + actionName: string; + /** + * Indicates whether an error should be thrown when encountering an error. + * If set to true, an error will be thrown. If set to false or not provided, the error will not be thrown. + * + * @type {boolean} + */ + throwOnError?: true; +} \ No newline at end of file