Skip to content

Commit

Permalink
MODFQMMGR-583:Use available index for defined fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kjain110 committed Dec 2, 2024
1 parent f43c788 commit 7337bbc
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/entity-types/circulation/simple_loan.json5
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'loanDate'",
filterValueGetter: '"left"(lower(${tenant_id}_mod_circulation_storage.f_unaccent(:sourceAlias.jsonb ->> \'loanDate\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_circulation_storage.f_unaccent(:value)), 600)'
filterValueGetter: "\"left\"(lower(:sourceAlias.jsonb ->> 'loanDate'::text), 600)",
valueFunction: "\"left\"(lower(:value), 600)"
},
{
name: 'due_date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'callNumber'",
essential: true
essential: true,
filterValueGetter: "\"left\"(lower(:sourceAlias.jsonb ->> 'callNumber'::text), 600)",
valueFunction: "\"left\"(lower(:value), 600)"
},
{
name: 'former_ids',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,10 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'accessionNumber'",
essential: true
filterValueGetter: "\"left\"(lower(:sourceAlias.jsonb ->> 'accessionNumber'::text), 600)",
valueFunction: "\"left\"(lower(:value), 600)"
},
{
name: 'temporary_location_id',
Expand All @@ -946,6 +948,7 @@
visibleByDefault: false,
hidden: true,
valueGetter: ":sourceAlias.jsonb->>'temporaryLocationId'",

},
{
name: 'item_damaged_status_id',
Expand All @@ -969,7 +972,7 @@
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'numberOfMissingPieces'",
valueGetter: ":sourceAlias.jsonb->>'numberOfMissingPieces'"
},
{
name: 'purchase_order_line_identifier',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'pickupLocation'",
values: [
{
value: 'true',
Expand All @@ -140,6 +139,9 @@
label: 'False',
},
],
valueGetter: ":sourceAlias.jsonb->>'pickupLocation'",
filterValueGetter: "\"left\"(lower(:sourceAlias.jsonb ->> 'pickupLocation'::text), 600)",
valueFunction: "\"left\"(lower(:value), 600)"
},
{
name: 'shelving_lag_time',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@
label: 'False',
},
],
filterValueGetter: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> \'reEncumber\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'ship_to',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'donor'",
filterValueGetter: "lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> 'donor'::text))",
valueFunction: "lower(${tenant_id}_mod_orders_storage.f_unaccent(:value))"
},
{
name: 'donor_organization_ids',
Expand Down Expand Up @@ -694,7 +696,6 @@
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->'eresource'->>'activated'",
values: [
{
value: 'true',
Expand All @@ -705,6 +706,9 @@
label: 'False',
},
],
valueGetter: ":sourceAlias.jsonb->'eresource'->>'activated'",
filterValueGetter: "\"left\"(lower(${tenant_id}_mod_orders_storage.f_unaccent((:sourceAlias.jsonb -> 'eresource'::text) ->> 'activated'::text)), 600)",
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'eresource_activation_due',
Expand Down Expand Up @@ -758,7 +762,6 @@
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->'eresource'->>'trial'",
values: [
{
value: 'true',
Expand All @@ -769,6 +772,9 @@
label: 'False',
},
],
valueGetter: ":sourceAlias.jsonb->'eresource'->>'trial'",
filterValueGetter: "\"left\"(lower(${tenant_id}_mod_orders_storage.f_unaccent((:sourceAlias.jsonb -> 'eresource'::text) ->> 'trial'::text)), 600)",
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'eresource_expected_activation',
Expand All @@ -781,6 +787,8 @@
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->'eresource'->>'expectedActivation'",
filterValueGetter: "\"left\"(lower(${tenant_id}_mod_orders_storage.f_unaccent((:sourceAlias.jsonb -> 'eresource'::text) ->> 'expectedActivation'::text)), 600)",
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'eresource_user_limit',
Expand Down Expand Up @@ -1110,7 +1118,6 @@
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'orderFormat'",
values: [
{
value: 'Electronic Resource',
Expand All @@ -1129,6 +1136,9 @@
label: 'Other',
},
],
valueGetter: ":sourceAlias.jsonb->>'orderFormat'",
filterValueGetter: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> \'orderFormat\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'package_po_line_id',
Expand Down Expand Up @@ -1247,6 +1257,8 @@
essential: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->'physical'->>'expectedReceiptDate'",
filterValueGetter: "\"left\"(lower(${tenant_id}_mod_orders_storage.f_unaccent((:sourceAlias.jsonb -> 'physical'::text) ->> 'expectedReceiptDate'::text)), 600)",
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'physical_receipt_due',
Expand Down Expand Up @@ -1332,6 +1344,8 @@
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'publisher'",
filterValueGetter: "lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> 'publisher'::text))",
valueFunction: 'lower(${tenant_id}_mod_orders_storage.f_unaccent(:value))'
},
{
name: 'receipt_date',
Expand All @@ -1344,6 +1358,8 @@
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'receiptDate'",
filterValueGetter: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> \'receiptDate\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'receipt_status',
Expand Down Expand Up @@ -1446,7 +1462,6 @@
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'rush'",
values: [
{
value: 'true',
Expand All @@ -1457,6 +1472,9 @@
label: 'False',
},
],
valueGetter: ":sourceAlias.jsonb->>'rush'",
filterValueGetter: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> \'rush\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'selector',
Expand All @@ -1469,6 +1487,8 @@
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'selector'",
filterValueGetter: "lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> 'selector'::text))",
valueFunction: "lower(${tenant_id}_mod_orders_storage.f_unaccent(:value))"
},
{
name: 'source',
Expand All @@ -1480,7 +1500,6 @@
essential: true,
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'source'",
values: [
{
value: 'User',
Expand All @@ -1503,6 +1522,9 @@
label: 'EBSCONET',
},
],
valueGetter: ":sourceAlias.jsonb->>'source'",
filterValueGetter: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> \'source\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'tags',
Expand Down Expand Up @@ -1541,6 +1563,8 @@
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'titleOrPackage'",
filterValueGetter: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:sourceAlias.jsonb ->> \'titleOrPackage\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_orders_storage.f_unaccent(:value)), 600)'
},
{
name: 'vendor_detail_instructions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@
visibleByDefault: true,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'status'",
filterValueGetter: "lower(${tenant_id}_mod_organizations_storage.f_unaccent(:sourceAlias.jsonb ->> 'status'::text))",
valueFunction: 'lower(${tenant_id}_mod_organizations_storage.f_unaccent(:value))',
filterValueGetter: '"left"(lower(${tenant_id}_mod_organizations_storage.f_unaccent(:sourceAlias.jsonb ->> \'status\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_organizations_storage.f_unaccent(:value)), 600)',
values: [
{
value: 'Active',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,9 @@
value: 'DCB',
label: 'DCB',
}
]
],
filterValueGetter: '"left"(lower(${tenant_id}_mod_users.f_unaccent(:sourceAlias.jsonb ->> \'type\'::text)), 600)',
valueFunction: '"left"(lower(${tenant_id}_mod_users.f_unaccent(:value)), 600)'
},
{
name: 'tags_tag_list',
Expand Down

0 comments on commit 7337bbc

Please sign in to comment.