Search (#7237)
Steps to test 1. Run metadata migrations 2. Run sync-metadata on your workspace 3. Enable the following feature flags: IS_SEARCH_ENABLED IS_QUERY_RUNNER_TWENTY_ORM_ENABLED IS_WORKSPACE_MIGRATED_FOR_SEARCH 4. Type Cmd + K and search anything
This commit is contained in:
@ -11,6 +11,11 @@ import { pascalCase } from 'src/utils/pascal-case';
|
||||
|
||||
type ComputeColumnNameOptions = { isForeignKey?: boolean };
|
||||
|
||||
export type FieldTypeAndNameMetadata = {
|
||||
name: string;
|
||||
type: FieldMetadataType;
|
||||
};
|
||||
|
||||
export function computeColumnName(
|
||||
fieldName: string,
|
||||
options?: ComputeColumnNameOptions,
|
||||
@ -48,13 +53,16 @@ export function computeCompositeColumnName(
|
||||
export function computeCompositeColumnName<
|
||||
T extends FieldMetadataType | 'default',
|
||||
>(
|
||||
fieldMetadata: FieldMetadataInterface<T>,
|
||||
fieldMetadata: FieldTypeAndNameMetadata | FieldMetadataInterface<T>,
|
||||
compositeProperty: CompositeProperty,
|
||||
): string;
|
||||
export function computeCompositeColumnName<
|
||||
T extends FieldMetadataType | 'default',
|
||||
>(
|
||||
fieldMetadataOrFieldName: FieldMetadataInterface<T> | string,
|
||||
fieldMetadataOrFieldName:
|
||||
| FieldTypeAndNameMetadata
|
||||
| FieldMetadataInterface<T>
|
||||
| string,
|
||||
compositeProperty: CompositeProperty,
|
||||
): string {
|
||||
const generateName = (name: string) => {
|
||||
|
||||
Reference in New Issue
Block a user