@opendatasoft/api-client
Version:
Opendatasoft's API Client.
29 lines (28 loc) • 2 kB
TypeScript
/**
* Perform full-text search on fields, either ones specified in textFields, or all fields . It's a fuzzy search that finds matches even if the searched string is not an exact match. Equivalent to [ODSQL search predicade](https://help.opendatasoft.com/apis/ods-explore-v2/explore_v2.1.html#section/ODSQL-predicates/search())
* @param text Text to search for
* @param textFields Fields to search in
* @returns An ODSQL query, ready to be used as a `where` clause
*/
export declare const textSearch: (text: string, textFields?: string[]) => string;
/**
* Perform full-text search on fields, either ones specified in textFields, or all fields. It matches the text fields that contain strings beginning with the searched string. Equivalent to [ODSQL startsWith predicade](https://help.opendatasoft.com/apis/ods-explore-v2/explore_v2.1.html#section/ODSQL-predicates/startswith())
* @param text Text to search for
* @param textFields Fields to search in
* @returns An ODSQL query, ready to be used as a `where` clause
*/
export declare const textStartWith: (text: string, textFields?: string[]) => string;
/**
* Perform full-text search on fields, either ones specified in textFields, or all fields. It matches the text fields that contain individual terms beginning the searched string. Equivalent to [ODSQL suggest predicade](https://help.opendatasoft.com/apis/ods-explore-v2/explore_v2.1.html#section/ODSQL-predicates/suggest())
* @param text Text to search for
* @param textFields Fields to search in
* @returns An ODSQL query, ready to be used as a `where` clause
*/
export declare const textSuggest: (text: string, textFields?: string[]) => string;
/**
* Perform an exact query on a given field. It matches when the field contains exactly the passed value.
* @param fieldName Field name to query for
* @param value Value to match on
* @returns An ODSQL query, ready to be used as a `where` clause
*/
export declare const exactMatch: (fieldName: string, value: string) => string;