# Type alias Type

Type: {
attributes?: FieldLike[] | (({ table }) => Promise<FieldLike[]>);
contract?: any;
discovery_match?: ((info_schema_col) => Promise<Partial<FieldLike> | void>);
distance_operators?: {
[opName: string]: any;
};
fieldviews?: Record<string, FieldView>;
js_type?: string;
listAs?: Function;
name: string;
postProcess?: Function;
presets?: any;
primaryKey?: {
default_sql?: string;
sql_type: string;
};
read?: ((arg0, arg1?) => any);
readFromDB?: ((arg0) => any);
readFromFormRecord?: Function;
showAs?: Function;
sql_name?: string | ((attrs) => string);
validate?: Function;
validate_attributes?: Function;
}

#### Type declaration

- ##### `Optional` attributes?: FieldLike[] | (({ table }) => Promise<FieldLike[]>)

- ##### `Optional` contract?: any

- ##### `Optional` discovery_match?: ((info_schema_col) => Promise<Partial<FieldLike> | void>)

  - - (info_schema_col): Promise<Partial<FieldLike> | void>

    - #### Parameters

      - ##### info_schema_col: GenObj

      #### Returns Promise<Partial<FieldLike> | void>

- ##### `Optional` distance_operators?: {
  [opName: string]: any;
  }

  - ##### [opName: string]: any

- ##### `Optional` fieldviews?: Record<string, FieldView>

- ##### `Optional` js_type?: string

- ##### `Optional` listAs?: Function

- ##### name: string

- ##### `Optional` postProcess?: Function

- ##### `Optional` presets?: any

- ##### `Optional` primaryKey?: {
  default_sql?: string;
  sql_type: string;
  }

  - ##### `Optional` default_sql?: string

  - ##### sql_type: string

- ##### `Optional` read?: ((arg0, arg1?) => any)

  - - (arg0, arg1?): any

    - #### Parameters

      - ##### arg0: any

      - ##### `Optional` arg1: any

      #### Returns any

- ##### `Optional` readFromDB?: ((arg0) => any)

  - - (arg0): any

    - #### Parameters

      - ##### arg0: any

      #### Returns any

- ##### `Optional` readFromFormRecord?: Function

- ##### `Optional` showAs?: Function

- ##### `Optional` sql_name?: string | ((attrs) => string)

- ##### `Optional` validate?: Function

- ##### `Optional` validate_attributes?: Function

- Defined in saltcorn-types/common_types.ts:36

Generated using TypeDoc