Indicate which columns have an index

Description

In the list of columns sent to the client, include an indicator of which columns have indexes and the type of those indexes. Coordinate with the client developer to ensure this change does not break the client.

In mod-ldp, the query to retrieve column names appears to be in src/main/java/org/folio/ldp/SchemaUtil.java at line 38:

The following query (with roughly equivalent inputs and outputs) can be used in its place to retrieve the column names with an additional "index_types" varchar column:

The input "parameters.not_column_name" is only needed if the client cannot display multiline data; otherwise it can be set to ARRAY[]::varchar[].

The output "index_types" column is '' (empty string) if there is no index, or a comma-separated list containing one or more of:

  • 'btree' for the default B-tree index type (used for =, <>, <, <=, >, and >= operators; as well as for ORDER BY sorting)

  • 'gin' for the GIN index type (used for LIKE and ILIKE pattern matching operators)

  • Other values for index types unsupported by the LDP App

A column that is included as a non-leading column in a multicolumn index is not considered to "have an index" for purposes of the LDP App, and such an index will not be listed in the output "index_types" column.

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Nassib Nassar January 3, 2024 at 5:03 PM

TBD

Mike Taylor January 3, 2024 at 4:12 PM

I think so, but I'd like to hear from about whether the SQL given above is still suitable?

Charlotte Whitt January 3, 2024 at 3:28 PM

Hi - Is this ticket to be marked as obsolete?

Mike Taylor February 13, 2023 at 4:08 PM

It would be great to get this into the next sprint (or even the present one?) So I can knock out .

Won't Do

Details

Assignee

Reporter

Priority

Sprint

Development Team

Thor

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created April 11, 2022 at 10:01 PM
Updated January 3, 2024 at 7:09 PM
Resolved January 3, 2024 at 5:31 PM
TestRail: Cases
TestRail: Runs