UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

37 lines 2.05 kB
import { ColumnModel, ColumnMultiValueFunction, ColumnSingleValueFilterOperator, QueryFilter, Row, SelectColumn } from '@sage-bionetworks/synapse-types'; export type SQLOperator = ColumnSingleValueFilterOperator | ColumnMultiValueFunction; export declare const QUERY_FILTERS_SESSION_STORAGE_KEY: (key: string) => string; export declare function removePrefixIfSynId(value: string): string; export declare const getIgnoredQueryFilterSearchParamKey: (key: string, namespace?: string) => string; export declare const SEARCH_TERM = "SEARCH_TERM"; export declare const SEARCH_ROLE = "SEARCH_ROLE"; /** @deprecated Use SEARCH_TERM instead */ export declare const FTS_SEARCH_TERM = "FTS_SEARCH_TERM"; /** @deprecated Use SEARCH_ROLE instead */ export declare const FTS_SEARCH_ROLE = "FTS_SEARCH_ROLE"; /** * Look in local storage for a set of QueryFilters to apply. In addition, given the search params, * generate a set of QueryFilters to narrow the query to view just related data. * May return null if a QueryFilter should not be added. * @param sql * @param searchParams * @param operator * @returns */ export declare const getAdditionalFilters: (searchParams?: Record<string, string>, operator?: SQLOperator, sessionStorageKey?: string) => QueryFilter[] | undefined; export declare const parseEntityIdFromSqlStatement: (sql: string) => string; export declare const parseEntityIdAndVersionFromSqlStatement: (sql: string) => { entityId?: string; versionNumber?: number; }; export declare const resultToJson: (headerColumns: SelectColumn[], rowColumns: Row[]) => Record<string, string | null>[]; /** * Finds the index of the given column name in the selectColumns or columnModels. * * @returns a non-negative integer if the column is found, or undefined if the column is not found * @param columnName * @param selectColumns * @param columnModels */ export declare const getColumnIndex: (columnName?: string, selectColumns?: SelectColumn[], columnModels?: ColumnModel[]) => number | undefined; //# sourceMappingURL=SqlFunctions.d.ts.map