import { FourDQuery } from './JSFourDInterface'; import { FourDModel } from './JSFourDModel'; import * as i0 from "@angular/core"; /** * This class represents a Collection of FourDModels and provides functionality to populate the Collection, fetching records from a 4D Database */ export declare class FourDCollection { /** the model this collection is based on */ model: any; /** array of models in the collection */ models: Array; /** default order by string */ orderBy: string; /** default query string */ queryString: FourDQuery; /** default filter to be applied on all queries */ filterOptions: string; /** the default list of field/column names to be populated on each Collection record data */ columns: Array; /** holds current record from the current selection */ currentRecord: FourDModel; /** holds the total # of records found on the latest query */ totalRecordCount: number; /** injected FourDInterface service */ private fourD; constructor(); /** * prepares the JSON field description to send to 4D, listing the columns to retrieve * * @param columns a string Array with the list of field/column names to retrieve for each record; if null, the default list of columns defined in the Collection will be retrieved * * @returns a JSON string listing the fields/columns to retrieve for each record */ getColumnListJSON(columns: Array): string; /** * Retrieves a list of records using a query string * * @param query the FourDQuery object that defines the query to be used for retrieving from 4D * @param columns custom column list to retrieve, JSON array of the columns to retrieve.

if informed, only the columns listed will be retrieved instead of the whole record

* @param startRec the starting record number to retrieve, used for paging. * @param numOfRecords the number of records to retrieve, the default -1 will retrieve all records in the resulting query. * @param filter optional, FourDQuery to further filter records to he retrieved * @param orderby optional order By clause to retrieve records in a set order.

in the format:

>table.field : to sort records by table.field in ascending order

<table.field : to sort records by table.field in descending order

* * @returns returns a Promise for the database operation, whose result is an Array of FourDModel records returned by 4D */ getRecords(query?: FourDQuery, columns?: Array, startRec?: number, numOfRecords?: number, filter?: string, orderby?: string): Promise>; /** * Delete a selection of records based on a supplied query+filter * * @param query the FourDQuery object that defines the query to be used for retrieving from 4D * @param filter optional, FourDQuery to further filter records to he retrieved * * @returns returns a Promise for the database operation, whose result is the # of records deleted */ bulkDelete(query: FourDQuery, filter?: string): Promise; /** * Update a selection of records on a FourDCollection * * @returns returns a Promise for the database operation, blank means all records have been updated */ bulkUpdate(): Promise; /** * returns the length of the Collection, or the # of records loaded in */ get length(): number; /** * Convert Collection Data Models into a 'simple' array */ toArray(): Array; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }