sql-serverguidewiregosu

Is there a way to perform a make table query in Guidewire?


I was wondering if there was a way to perform a make table query in Guidewire so that we can perform faster subsequent queries on it.

Our main goal is to improve performance on record retrieval, at the current state we're doing (kinda) as follows:

SELECT * WHERE x ='y'AND a='b' for record of type 1

SELECT * WHERE x ='y'AND a='c' for record of type 2

SELECT * WHERE x ='y'AND a='d' for record of type 3

These queries are executed rather often, which results in a waste of time querying SQLServer for SELECT * WHERE x ='y' on the whole table. But I haven't found a way to perform a table query (or anything that helps us) through the gw.api


Solution

  • Guidewire / Gosu has an extensive Query Builder library, The query builder APIs provide support for retrieving information from InsuranceSuite application databases.

    You would be looking for something like this

    var query = Query.​make(entity-type)
    .compare(Entity#x, Relop.Equals, "a")
    .compare(Entity#y, Relop.Equals, "b")
    query.​select()
    

    Guidewire Documentation on the Query Builder is available here for ClaimCenter. You may need credentials to access the docs: https://docs.guidewire.com/cloud/cc/202302/integration/integration/topics/querybuilderapi/c_ba3266101.html