# Function do_add_index

- do_add_index(
  table_name: string,
  field_names: string[],
  query_func: any,
  is_unique: boolean,
  logger?: any,
  ): Promise<void>

  Add unique constraint

  #### Parameters

  - table_name: string

    table name

  - field_names: string[]

    list of columns (members of constraint)

  - query_func: any
  - is_unique: boolean
  - `Optional` logger: any

  #### Returns Promise<void>

  no result

  - Defined in sqlite-commons.ts:194