Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    defaultTextMatchStyle not applied in the absence of textMatchStyle in the request

    Hello isomorphic
    We have a problem after migrating from version 3.1 to 5.0. This problem is actually performance degradation of some fetch operations.

    We use mostly SQL DataSources.
    Trying to figure out why is that happening, we concluded that this happens because the SQL queries which are generated are slightly different. The difference is that now generated WHERE clauses include lower() function, so that comparison is case insensitive. This, of course, is much slower, because indexation by PK is not used.
    Code:
    -- example of generated query with lower function
    SELECT TABLE.FIELD1 AS field1, TABLE.FIELD2 AS field2 FROM TABLE WHERE (LOWER(TABLE.FIELD1)='value')
    We tried to change DS to have defaultTextMatchStyle="exactCase", but this still does not help in two cases:
    1. If there is a fetch after update, which is done by smartGWT automatically.
    2. Server side dsRequest.execute().

    We know there is setting ignoreTextMatchStyle and ignoreTextMatchStyleCaseSensitive. If we understand it right, this would ignore textMatchStyle for all cases. But we still want to let the client decide if it is needed for special cases to compare fields case insensitive.

    What we want to achieve is that if request contains no explicit textMatchStyle setting, the DataSource defaultTextMatchStyle will be used (for client and server requests).
    And if we push the idea further, to be able to redefine textMatchStyle to be used, if it is not set in request either not in DS.

    Please let us know if there is some way how to achieve it that we might overlook.
    If not, can you find out how much effort it would be to support it?

    #2
    Hi, I posted previous question with my old account. Please consider this one as the active one.

    Also we have found out, that on the server side when using com.isomorphic.datasource.DSRequest.addToCriteria(String, Object) is used, DS setting defaultTextMatchStyle is applied.
    But it is only for this one method.
    Last edited by matus_b; 20 Jul 2016, 05:35.

    Comment


      #3
      If your current indexes are performing poorly with case-insensitive search, then we'd suggest modifying your indexing strategy - case sensitive searches by end users are quite rare, so you should optimize for the much more common case-insensitive search.

      It's not clear what you're claiming may have changed between versions - far too little details are provided. But in general, if you were to try to change whether case sensitive or insensitive search were used by default, you would do this on the client side with settings like listGrid.autoFetchTextMatchStyle; if you instead force a particular setting server side, you'll end up unable to perform case-insensitive searches when you need to, and again, these are by far the most common types of searches, so disallowing them would be a bad idea.

      Comment


        #4
        Hi Matus,

        is TABLE.FIELD1 your PK, and if so, what it is type (varchar, integer,...)?

        Best regards
        Blama

        Comment


          #5
          Hi Isomorphic,

          this is the same issue I reported here.
          Also, searching for that thread I found an unrelated thread of mine where you can see that the framework does also lower() int-columns.
          I'm pretty sure every decent RBDMS will optimize this away, but still it is strange. Search for: LOWER('3') here.

          Best regards
          Blama

          Comment


            #6
            Blama: hi, good to know that other people also have the same problem and it's not only us posting here some weird issues.

            Yes, in the most cases the field for which exact breaks the indexing is primary key. We use UUIDs, therefore it is of type of text (also for the same reason we didn't experience lower() of int-colums).

            case sensitive searches by end users are quite rare
            You are right when you think about user filtering big data sets to find set of records that are matching by him specified criteria. But if you consider that many fetches (in our case could be even more than previous cases) are executed to find one specific record and the criteria field is the primary key then it makes to have exactCase selects.

            It's not clear what you're claiming may have changed between versions - far too little details are provided
            I guess that the framework strategy changed. Now by default the fetch is case-insesitive which is generating lower() in where conditions. In the previous version (3.1p) fetches were performed by default case-sensitive.
            See the DataSource and DataBound Component section for the Release Notes for Smart GWT 4.1 (link)

            Framework default settings were changed, but you provided a way how to set different default textMatchStyle in the DataSource. The thing is that if we set our desired default textMatchStyle, it is not used properly for all cases.

            This is how we consider should be right precedence in the textMatchStyle settings:
            request > DS field > DS > framework default

            And it should work overall: client, server or automatically executed requests.

            By current state, if we want to keep the same behaviour like in 3.1p, we have to modified every request, every component. If you would make a fix to follow the proposed precedence, we would need to modify only the DS definitions.

            Comment


              #7
              Can you show a specific instance of a request where you are trying to use defaultTextMatchStyle of "exactCase" and it is not being honored? Please also specify your exact version (not just 5.0), and indicate what database you are testing with.

              Comment


                #8
                First to answer your questions:
                - we are using Oracle database, but I reproduced our issue on your showcase with HSQL as well
                - we are going to update to the latest nightly build soon because of other issue being fixed there, but following testcases were performed on SmartClient Version: v10.0p_2016-07-20/PowerEdition Deployment (built 2016-07-20)
                - browser is chrome, but this probably doesn't matter in this case

                SETUP
                worldDS:
                • removed testFileName so it will go to HSQL db
                • set countryCode to be the PK (it's text)
                • defaultTextMatchStyle="exactCase"
                • added DMI
                Performing fetch operation
                Code:
                <DataSource
                    ID="worldDS"
                    serverType="sql"
                    tableName="worldDS"
                    defaultTextMatchStyle="exactCase"
                >
                    <!--testFileName="/ds/test_data/world.data.xml"-->
                
                    <fields>
                        <!--<field name="pk"            type="sequence"   hidden="true"            primaryKey="true" />-->
                        <field name="countryCode"   type="text"       title="Code"             required="true"   primaryKey="true" />
                        <field name="countryName"   type="text"       title="Country"          required="true"   />
                        <field name="capital"       type="text"       title="Capital"          />
                        <field name="government"    type="text"       title="Government"       length="500"      />
                        <field name="continent"     type="text"       title="Continent"        >
                            <valueMap>
                                <value>Europe</value>
                                <value>Asia</value>
                                <value>North America</value>
                                <value>Australia/Oceania</value>
                                <value>South America</value>
                                <value>Africa</value>
                            </valueMap>
                        </field>
                        <field name="independence"  type="date"       title="Nationhood"          />
                        <field name="area"          type="float"      title="Area (km&amp;sup2;)" format=",0" />
                        <field name="population"    type="integer"    title="Population"          format=",0" />
                        <field name="gdp"           type="float"      title="GDP ($M)"            format=",0" />
                        <field name="member_g8"     type="boolean"    title="G8"                  />
                    </fields>
                
                    <serverObject lookupStyle="new" className="com.smartgwt.sample.showcase.server.MyCustomWorldDMI"/>
                </DataSource>
                Our new DMI:
                • during the normal fetch, additional fetch with operation ID "additionalCountry" is executed via server side request
                Code:
                package com.smartgwt.sample.showcase.server;
                
                import com.isomorphic.datasource.DSRequest;
                import com.isomorphic.datasource.DSResponse;
                import com.isomorphic.rpc.RPCManager;
                
                import java.util.Map;
                
                /**
                 * New DMI for demonstrating textMatchStyle difficulties when performing server requests.
                 */
                public class MyCustomWorldDMI {
                
                    private final String additionalCountry_operationID = "additionalCountry";
                
                    public DSResponse fetch(DSRequest dsRequest) throws Exception {
                        // just to make sure that this request settings are not influencing fetchAdditionalCountry
                        dsRequest.setTextMatchStyle(null);
                
                        System.out.println("DMI is executed");
                
                        // imagine that to process the request we need some additional entity from another DS
                        // to keep it simple lets reuse worldDS again
                        if (!additionalCountry_operationID.equals(dsRequest.getOperationId())) {
                            fetchAdditionalCountry(dsRequest.getRPCManager());
                        }
                
                        return dsRequest.execute();
                    }
                
                    private void fetchAdditionalCountry(RPCManager rpcManager) throws Exception {
                        DSRequest serverSideRequest = new DSRequest("worldDS", "fetch", rpcManager);
                        serverSideRequest.setCriteria("countryCode", "LO");
                        serverSideRequest.setOperationId(additionalCountry_operationID);
                        // no textMatchStyle for serverSideRequest, expecting DS.defaultTextMatchStyle to be used
                        serverSideRequest.setTextMatchStyle(null);
                
                        final DSResponse dsResponse = serverSideRequest.execute();
                        // SELECT worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8
                        // FROM worldDS WHERE (LOWER(worldDS.countryCode)='lo')
                
                        final Map dataMap = dsResponse.getDataMap();
                        final String countryName = (String) dataMap.get("countryName");
                
                        System.out.println("Btw " + countryName + " has code SK and not LO ;)");
                    }
                }
                TESTCASE 1: If there is a fetch after update, which is done by smartGWT automatically.
                http://127.0.0.1:8888/#sql_basic_connector get data and change Bermuda's capital city to 'abcdef':
                Code:
                     [java] === 2016-07-22 16:10:56,177 [9-40] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                     [java]     criteria:{
                     [java]         countryCode:"BD"
                     [java]     },
                     [java]     values:{
                     [java]         countryCode:"BD",
                     [java]         capital:"abcdef"
                     [java]     },
                     [java]     operationConfig:{
                     [java]         dataSource:"worldDS",
                     [java]         repo:null,
                     [java]         operationType:"update",
                     [java]         textMatchStyle:"exactCase"
                     [java]     },
                     [java]     componentId:"isc_ListGrid_0",
                     [java]     appID:"builtinApplication",
                     [java]     operation:"worldDS_update",
                     [java]     oldValues:{
                     [java]         continent:"North America",
                     [java]         area:50,
                     [java]         capital:"abcde",
                     [java]         gdp:1700,
                     [java]         government:"dependent territory of the UK",
                     [java]         countryCode:"BD",
                     [java]         member_g8:false,
                     [java]         countryName:"Bermuda",
                     [java]         population:62099
                     [java]     }
                     [java] }
                     [java] === 2016-07-22 16:10:56,177 [9-40] INFO  IDACall - Performing 1 operation(s)
                     [java] === 2016-07-22 16:10:56,177 [9-40] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:10:56,177 [9-40] DEBUG DeclarativeSecurity - DataSource worldDS is not in the pre-checked list, processing...
                     [java] === 2016-07-22 16:10:56,178 [9-40] DEBUG ServerObject - Couldn't find a public method named: update on class: com.smartgwt.sample.showcase.server.MyCustomWorldDMI
                     [java] === 2016-07-22 16:10:56,178 [9-40] DEBUG DataSourceDMI - DataSourceDMI: no public method name: update available on class: com.smartgwt.sample.showcase.server.MyCustomWorldDMI - defaulting to builtin operations.
                     [java] === 2016-07-22 16:10:56,179 [9-40] DEBUG AppBase - [builtinApplication.worldDS_update] No userTypes defined, allowing anyone access to all operations for this application
                     [java] === 2016-07-22 16:10:56,179 [9-40] DEBUG AppBase - [builtinApplication.worldDS_update] No public zero-argument method named '_worldDS_update' found, performing generic datasource operation
                     [java] === 2016-07-22 16:10:56,179 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update] Performing update operation with
                     [java]     criteria: {countryCode:"BD"}    values: {countryCode:"BD",capital:"abcdef"}
                     [java] === 2016-07-22 16:10:56,182 [9-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_update] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic
                     [java] === 2016-07-22 16:10:56,182 [9-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_update] Passing JDBC URL only to getConnection
                     [java] === 2016-07-22 16:10:56,293 [9-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_update] makeObject() created an unpooled Connection '386499813'
                     [java] === 2016-07-22 16:10:56,293 [9-40] DEBUG SQLConnectionManager - [builtinApplication.worldDS_update] Borrowed connection '386499813'
                     [java] === 2016-07-22 16:10:56,293 [9-40] DEBUG SQLTransaction - [builtinApplication.worldDS_update] Started new HSQLDB transaction "386499813"
                     [java] === 2016-07-22 16:10:56,293 [9-40] DEBUG SQLDriver - [builtinApplication.worldDS_update] About to execute SQL update in 'HSQLDB' using connection'386499813'
                
                     [B]No lower, this is how we like it[/B]
                     [java] === 2016-07-22 16:10:56,293 [9-40] INFO  SQLDriver - [builtinApplication.worldDS_update] Executing SQL update on 'HSQLDB': UPDATE worldDS SET capital='abcdef' WHERE (worldDS.countryCode='BD')
                     [java] === 2016-07-22 16:10:56,295 [9-40] DEBUG SQLDataSource - [builtinApplication.worldDS_update] update operation affected 1 rows
                     [java] === 2016-07-22 16:10:56,295 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update] primaryKeys: {countryCode=BD}
                     [java] === 2016-07-22 16:10:56,295 [9-40] DEBUG DeclarativeSecurity - [builtinApplication.worldDS_update] Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:10:56,295 [9-40] DEBUG DeclarativeSecurity - [builtinApplication.worldDS_update] DataSource worldDS is not in the pre-checked list, processing...
                     [java] DMI is executed
                     [java] === 2016-07-22 16:10:56,295 [9-40] DEBUG DeclarativeSecurity - [builtinApplication.worldDS_update] Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:10:56,295 [9-40] WARN  DataSourceDMI - [builtinApplication.worldDS_update] DataSource worldDS: received a request to execute an operation of type 'fetch' named 'additionalCountry', but this operation is not defined to the dataSource.  Falling back to default behavior for operationType 'fetch'
                     [java] DMI is executed
                     [java] === 2016-07-22 16:10:56,298 [9-40] DEBUG DeclarativeSecurity - [builtinApplication.worldDS_update] Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:10:56,298 [9-40] DEBUG AppBase - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] No userTypes defined, allowing anyone access to all operations for this application
                     [java] === 2016-07-22 16:10:56,298 [9-40] DEBUG AppBase - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] No public zero-argument method named '_additionalCountry' found, performing generic datasource operation
                     [java] === 2016-07-22 16:10:56,298 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] Performing fetch operation with
                     [java]     criteria: {countryCode:"LO"}    values: {countryCode:"LO"}
                     [java] === 2016-07-22 16:10:56,299 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                     [java] === 2016-07-22 16:10:56,299 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] 494: Executing SQL query on 'HSQLDB': SELECT worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.countryCode)='lo')
                     [java] === 2016-07-22 16:10:56,299 [9-40] DEBUG SQLDriver - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] About to execute SQL query in 'HSQLDB' using connection '386499813'
                     [java] === 2016-07-22 16:10:56,299 [9-40] INFO  SQLDriver - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] Executing SQL query on 'HSQLDB': SELECT worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.countryCode)='lo')
                     [java] === 2016-07-22 16:10:56,301 [9-40] INFO  DSResponse - [builtinApplication.worldDS_update, builtinApplication.additionalCountry] DSResponse: List with 1 items
                     [java] === 2016-07-22 16:10:56,301 [9-40] DEBUG DSRequest - [builtinApplication.worldDS_update] freeOnExecute is false for request of type fetch on DataSource worldDS - not freeing resources!
                     [java] === 2016-07-22 16:10:56,301 [9-40] DEBUG DSRequest - [builtinApplication.worldDS_update] freeOnExecute is false for request of type fetch on DataSource worldDS - not freeing resources!
                     [java] Btw Slovakia has code SK and not LO ;)
                     [java] === 2016-07-22 16:10:56,301 [9-40] DEBUG DeclarativeSecurity - [builtinApplication.worldDS_update] Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:10:56,301 [9-40] DEBUG DeclarativeSecurity - [builtinApplication.worldDS_update] DataSource worldDS is not in the pre-checked list, processing...
                     [java] === 2016-07-22 16:10:56,301 [9-40] DEBUG AppBase - [builtinApplication.worldDS_update, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
                     [java] === 2016-07-22 16:10:56,301 [9-40] DEBUG AppBase - [builtinApplication.worldDS_update, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
                
                     [B]fetch after update[/B]
                     [java] === 2016-07-22 16:10:56,301 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update, builtinApplication.null] Performing fetch operation with
                     [java]     criteria: {countryCode:"BD"}    values: {countryCode:"BD"}
                     [java] === 2016-07-22 16:10:56,301 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                     [java] === 2016-07-22 16:10:56,302 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_update, builtinApplication.null] 494: Executing SQL query on 'HSQLDB': SELECT worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.countryCode)='bd')
                     [java] === 2016-07-22 16:10:56,302 [9-40] DEBUG SQLDriver - [builtinApplication.worldDS_update, builtinApplication.null] About to execute SQL query in 'HSQLDB' using connection '386499813'
                
                     [B]lower() in sql select after update[/B]
                     [java] === 2016-07-22 16:10:56,302 [9-40] INFO  SQLDriver - [builtinApplication.worldDS_update, builtinApplication.null] Executing SQL query on 'HSQLDB': SELECT worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.countryCode)='bd')
                     [java] === 2016-07-22 16:10:56,304 [9-40] INFO  DSResponse - [builtinApplication.worldDS_update, builtinApplication.null] DSResponse: List with 1 items
                     [java] === 2016-07-22 16:10:56,304 [9-40] DEBUG DSRequest - [builtinApplication.worldDS_update] freeOnExecute is false for request of type fetch on DataSource worldDS - not freeing resources!
                     [java] === 2016-07-22 16:10:56,304 [9-40] DEBUG DSRequest - [builtinApplication.worldDS_update] freeOnExecute is false for request of type fetch on DataSource worldDS - not freeing resources!
                     [java] === 2016-07-22 16:10:56,304 [9-40] INFO  DSResponse - [builtinApplication.worldDS_update] DSResponse: List with 1 items
                     [java] === 2016-07-22 16:10:56,304 [9-40] DEBUG DSRequest - freeOnExecute is false for request of type update on DataSource worldDS - not freeing resources!
                     [java] === 2016-07-22 16:10:56,304 [9-40] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                     [java] === 2016-07-22 16:10:56,304 [9-40] DEBUG SQLTransaction - Committing HSQLDB transaction "386499813"
                     [java] === 2016-07-22 16:10:56,305 [9-40] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                     [java] === 2016-07-22 16:10:56,307 [9-40] DEBUG SQLTransaction - getConnection() found transactional connection for HSQLDB with hashcode "386499813"
                     [java] === 2016-07-22 16:10:56,307 [9-40] DEBUG SQLTransaction - Ending HSQLDB transaction "386499813"
                     [java] === 2016-07-22 16:10:56,307 [9-40] DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "386499813"
                     [java] === 2016-07-22 16:10:56,308 [9-40] DEBUG DSRequest - Ignoring freeResources call because this is not a primary request!
                     [java] === 2016-07-22 16:10:56,308 [9-40] DEBUG DSRequest - Ignoring freeQueueResources call because this is not a primary request!
                     [java] === 2016-07-22 16:10:56,308 [9-40] DEBUG SQLTransaction - getConnection() found transactional connection for HSQLDB (connection is null)
                     [java] === 2016-07-22 16:10:56,308 [9-40] INFO  Compression - /showcase/sc/IDACall: 337 -> 263 bytes
                TESTCASE 2: Server side dsRequest.execute()
                Opening http://127.0.0.1:8888/#sql_basic_connector will automatically autoFetch data for the Grid. With this fetch our server side request for additional country will be executed as well:
                Code:
                     [java] === 2016-07-22 16:06:49,214 [9-40] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                     [java]     criteria:{
                     [java]     },
                     [java]     operationConfig:{
                     [java]         dataSource:"worldDS",
                     [java]         repo:null,
                     [java]         operationType:"fetch",
                     [java]         textMatchStyle:"substring"
                     [java]     },
                     [java]     startRow:0,
                     [java]     endRow:75,
                     [java]     componentId:"isc_ListGrid_0",
                     [java]     appID:"builtinApplication",
                     [java]     operation:"worldDS_fetch",
                     [java]     oldValues:{
                     [java]     }
                     [java] }
                     [java] === 2016-07-22 16:06:49,214 [9-40] INFO  IDACall - Performing 1 operation(s)
                     [java] === 2016-07-22 16:06:49,215 [9-40] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:06:49,215 [9-40] DEBUG DeclarativeSecurity - DataSource worldDS is not in the pre-checked list, processing...
                     [java] DMI is executed
                     [java] === 2016-07-22 16:06:49,215 [9-40] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                
                     [B]Here we go, additional country fetch[/B]
                     [java] === 2016-07-22 16:06:49,215 [9-40] WARN  DataSourceDMI - DataSource worldDS: received a request to execute an operation of type 'fetch' named 'additionalCountry', but this operation is not defined to the dataSource.  Falling back to default behavior for operationType 'fetch'
                     [java] DMI is executed
                     [java] === 2016-07-22 16:06:49,216 [9-40] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:06:49,216 [9-40] DEBUG AppBase - [builtinApplication.additionalCountry] No userTypes defined, allowing anyone access to all operations for this application
                     [java] === 2016-07-22 16:06:49,216 [9-40] DEBUG AppBase - [builtinApplication.additionalCountry] No public zero-argument method named '_additionalCountry' found, performing generic datasource operation
                     [java] === 2016-07-22 16:06:49,216 [9-40] INFO  SQLDataSource - [builtinApplication.additionalCountry] Performing fetch operation with
                     [java]     criteria: {countryCode:"LO"}    values: {countryCode:"LO"}
                     [java] === 2016-07-22 16:06:49,217 [9-40] INFO  SQLDataSource - [builtinApplication.additionalCountry] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                
                     [B]Executed SQL with lower()[/B]
                     [java] === 2016-07-22 16:06:49,217 [9-40] INFO  SQLDataSource - [builtinApplication.additionalCountry] 491: Executing SQL query on 'HSQLDB': SELECT worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.countryCode)='lo')
                     [java] === 2016-07-22 16:06:49,217 [9-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.additionalCountry] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic
                     [java] === 2016-07-22 16:06:49,217 [9-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.additionalCountry] Passing JDBC URL only to getConnection
                     [java] === 2016-07-22 16:06:49,324 [9-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.additionalCountry] makeObject() created an unpooled Connection '119388865'
                     [java] === 2016-07-22 16:06:49,324 [9-40] DEBUG SQLConnectionManager - [builtinApplication.additionalCountry] Borrowed connection '119388865'
                     [java] === 2016-07-22 16:06:49,324 [9-40] DEBUG SQLDriver - [builtinApplication.additionalCountry] About to execute SQL query in 'HSQLDB' using connection '119388865'
                     [java] === 2016-07-22 16:06:49,324 [9-40] INFO  SQLDriver - [builtinApplication.additionalCountry] Executing SQL query on 'HSQLDB': SELECT worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.countryCode)='lo')
                     [java] === 2016-07-22 16:06:49,328 [9-40] INFO  DSResponse - [builtinApplication.additionalCountry] DSResponse: List with 1 items
                     [java] === 2016-07-22 16:06:49,329 [9-40] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource worldDS
                     [java] === 2016-07-22 16:06:49,329 [9-40] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource worldDS
                     [java] === 2016-07-22 16:06:49,329 [9-40] DEBUG DSRequest - Ignoring freeResources call because they have already been freed
                     [java] Btw Slovakia has code SK and not LO ;)
                     [java] === 2016-07-22 16:06:49,329 [9-40] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                     [java] === 2016-07-22 16:06:49,329 [9-40] DEBUG DeclarativeSecurity - DataSource worldDS is not in the pre-checked list, processing...
                     [java] === 2016-07-22 16:06:49,329 [9-40] DEBUG AppBase - [builtinApplication.worldDS_fetch] No userTypes defined, allowing anyone access to all operations for this application
                     [java] === 2016-07-22 16:06:49,329 [9-40] DEBUG AppBase - [builtinApplication.worldDS_fetch] No public zero-argument method named '_worldDS_fetch' found, performing generic datasource operation
                     [java] === 2016-07-22 16:06:49,329 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_fetch] Performing fetch operation with
                     [java]     criteria: {}    values: {}
                     [java] === 2016-07-22 16:06:49,330 [9-40] INFO  SQLWhereClause - [builtinApplication.worldDS_fetch] empty condition
                     [java] === 2016-07-22 16:06:49,330 [9-40] INFO  SQLDataSource - [builtinApplication.worldDS_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                     [java] === 2016-07-22 16:06:49,330 [9-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause
                     [java] === 2016-07-22 16:06:49,330 [9-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Eval'd row count query: SELECT COUNT(*) FROM worldDS
                     [java] === 2016-07-22 16:06:49,330 [9-40] DEBUG SQLDriver - [builtinApplication.worldDS_fetch] About to execute SQL query in 'HSQLDB' using connection '119388865'
                     [java] === 2016-07-22 16:06:49,331 [9-40] INFO  SQLDriver - [builtinApplication.worldDS_fetch] Executing SQL query on 'HSQLDB': SELECT COUNT(*) FROM worldDS
                     [java] === 2016-07-22 16:06:49,334 [9-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Using SQL Limit query
                     [java] === 2016-07-22 16:06:49,334 [9-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE ('1'='1')
                     [java] === 2016-07-22 16:06:49,334 [9-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE ('1'='1')
                     [java] === 2016-07-22 16:06:49,338 [9-40] INFO  DSResponse - [builtinApplication.worldDS_fetch] DSResponse: List with 75 items
                     [java] === 2016-07-22 16:06:49,338 [9-40] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource worldDS
                     [java] === 2016-07-22 16:06:49,338 [9-40] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource worldDS
                     [java] === 2016-07-22 16:06:49,338 [9-40] DEBUG DSRequest - Ignoring freeResources call because they have already been freed
                     [java] === 2016-07-22 16:06:49,338 [9-40] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                     [java] === 2016-07-22 16:06:49,339 [9-40] DEBUG RPCManager - DMI response, dropExtraFields: true
                     [java] === 2016-07-22 16:06:49,343 [9-40] DEBUG SQLDriver - Freeing SQLDriver dbConnection 119388865
                     [java] === 2016-07-22 16:06:49,345 [9-40] DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "119388865"
                     [java] === 2016-07-22 16:06:49,345 [9-40] DEBUG DSRequest - Ignoring freeResources call because they have already been freed
                     [java] === 2016-07-22 16:06:49,354 [9-40] INFO  Compression - /showcase/sc/IDACall: 15859 -> 3624 bytes

                Attached Files

                Comment


                  #9
                  Hi, did you have a look?

                  Btw. I found that Slovakia really has some FIPS code LO.

                  Comment


                    #10
                    defaultTextMatchStyle is currently something that is applied client-side only. When a request is being prepared for transmission to the server, if there is no explicit textMatchStyle supplied and the DataSource expresses a defaultTextMatchStyle, we set the request's textMatchStyle to match the DataSource's defaulttextMatchStyle. The server is not aware of this - it just honors the textMatchStyle like it would if it had been set manually. So, in your example, the reason the cache sync fetch (the "fetch after update") is using "lower" is that your DMI is explicitly clearing out the request's textMatchStyle at the top. If you remove that line, the cache sync fetch works as you would expect.

                    Because defaultTextMatchStyle is applied client-side, there is no support for it on server-initiated requests - you must explicitly call setTextMatchStyle(). One thing you could do is copy the textMatchStyle setting from the DSRequest that came from the client, onto your server-created DSRequest - this is what the framework does for the cache sync DSRequest.

                    We do intend to extend defaultTextMatchStyle to provide support for server-created DSRequests, but that will take place on the 6.1 branch and is not likely to be ported back to bugfix branches.

                    Comment


                      #11
                      This post has 2 points I would like to know your opinion about:

                      Point 1: SmarGWT library versions are not backward compatible
                      Obviously libraries behaviour was changed in 4.1 by introducing exactCase.
                      I think it was like this (let me know if I understand it wrong):

                      Before 4.1
                      Default textMatchStyle was exact.
                      Exact was equal to operator equals.
                      Generated condition in WHERE clause was generated without lower (case sensitive)

                      After 4.1.
                      Default textMatchStyle is still exact.
                      Exact now equals operator iEquals.
                      Generated condition in WHERE clause is generated with lower() (case insensitive)
                      New textMatchStyle exactCase is introduced.
                      ExactCase is equal to operator equals.

                      Our whole application is based on the fact that by default we will end up with equals operator.
                      The change could be still OK, if we would be required just to set up to every DS defaultTextMatchStyle. But even defaultTextMatchStyle is not fully supported (server for sure and see also point 2).

                      You suggest us to crawl through whole project and start setting up textMatchStyles settings in server and client code. This is really causing us troubles.
                      First suggestion about setting up indexes in DB with lower() is for sure out of the game. We have hundreds of indexes and many in schemas that even doesn't belong to our team.

                      How much effort would it take to you, to introduce new property in server.properties by which we could set the library to work the same as it was before 4.1?

                      Point 2: defaultTextMatchStyle is not used always even if no explicit textMatchStyle is used
                      if there is no explicit textMatchStyle supplied and the DataSource expresses a defaultTextMatchStyle, we set the request's textMatchStyle to match the DataSource's defaulttextMatchStyle.
                      I performed little test with previous showcase.

                      listGrid.setAutoFetchTextMatchStyle(); is not used.
                      DS has defaultTextMatchStyle="exactCase".
                      When investigating logged DsRequest from the server, following textMatchStyles are set:
                      autofetch substring
                      fetch exact
                      update exactCase
                      add exactCase
                      remove exactCase
                      So your statement looks like to be not completely true.

                      Just for the info
                      ... in your example, the reason the cache sync fetch (the "fetch after update") is using "lower" is that your DMI is explicitly clearing out the request's textMatchStyle at the top. If you remove that line, the cache sync fetch works as you would expect.
                      It works as you said.

                      Comment


                        #12
                        The problem with prior versions was that, for SQLDataSource, textMatchStyle was actually behaving inconsistently per DB, because the same SQL operator ("=") does different things on different DBs. So your Point 1 is wrong; this was a bug fix, and there was no consistent behavior that we could remain backwards compatible with.

                        In implementing that fix we introduced a problem where cache sync requests would use "exact" style, but they should always use "exactCase" regardless of the textMatchStyle on the triggering request. This has already been fixed.

                        We introduced ds,defaultTextMatchStyle as a way for people with different DBs to get back the behavior that happened to be the default for their DB. You're correct that the way it was implemented missed the case of server-initiated DSRequests. Your suggestion of a server.properties setting for this makes some sense and we're considering that approach.

                        Your little table doesn't make much sense to us. For requests coming from client-side components, textMatchStyle is always set at the component level, so ds.defaultTextMatchStyle wouldn't be used. You've not been clear about what how these requests are initiated, but nothing you've shown with this table indicates a bug or a deviation from documented behavior.

                        Comment


                          #13
                          About point 1: you know better, I was describing how the situation looks to me as user only of Oracle DB.

                          Your little table doesn't make much sense to us. For requests coming from client-side components, textMatchStyle is always set at the component level, so ds.defaultTextMatchStyle wouldn't be used. You've not been clear about what how these requests are initiated, but nothing you've shown with this table indicates a bug or a deviation from documented behavior.
                          We were assuming that if we have component where we don't set explicitly textMatchStyle and we bind the component with DS which has defaultTextMatchStyle set, then the defaultTextMatchStyle will be used in the generated dsRequests.

                          The table contains observation results from the #sql_basic_connector showcase, v10.0p_2016-07-20/PowerEdition Deployment (built 2016-07-20).

                          Client code:
                          Code:
                          public Canvas getViewPanel() {
                                  final DataSource worldDS = DataSource.get("worldDS");
                          
                                  final ListGrid listGrid = new ListGrid();
                                  listGrid.setWidth(900);
                                  listGrid.setHeight(224);
                                  listGrid.setAlternateRecordStyles(true);
                                  [B]listGrid.setDataSource(worldDS);[/B]
                                 [B] listGrid.setAutoFetchData(true);[/B]
                                  listGrid.setShowFilterEditor(true);
                                  listGrid.setCanEdit(true);
                                  listGrid.setEditEvent(ListGridEditEvent.CLICK);
                                  listGrid.setCanRemoveRecords(true);
                                  [B]listGrid.setInitialCriteria(new Criteria("continent", "Europe"));[/B]
                                  
                          
                                  IButton newButton = new IButton("Add New");
                                  newButton.addClickHandler(new ClickHandler() {
                                      public void onClick(ClickEvent event) {
                                          listGrid.startEditingNew();
                                      }
                                  });
                          
                                  IButton fetchButton = new IButton("Fetch");
                                  fetchButton.addClickHandler(new ClickHandler() {
                                      public void onClick(ClickEvent event) {
                                         [B] listGrid.fetchData(new Criteria("continent", "Asia"));[/B]
                                      }
                                  });
                          DS:
                          Code:
                          <DataSource
                              ID="worldDS"
                              serverType="sql"
                              tableName="worldDS"
                              [B]defaultTextMatchStyle="exactCase"[/B]
                          >
                              <!--testFileName="/ds/test_data/world.data.xml"-->
                          
                              <fields>
                                  <!--<field name="pk"            type="sequence"   hidden="true"            primaryKey="true" />-->
                                  <field name="countryCode"   [B]type="text"  [/B]     title="Code"             required="true"   [B]primaryKey="true" [/B]/>
                                  <field name="countryName"   type="text"       title="Country"          required="true"   />
                                  <field name="capital"       type="text"       title="Capital"          />
                                  <field name="government"    type="text"       title="Government"       length="500"      />
                                  <field name="continent"     type="text"       title="Continent"        >
                                      <valueMap>
                                          <value>Europe</value>
                                          <value>Asia</value>
                                          <value>North America</value>
                                          <value>Australia/Oceania</value>
                                          <value>South America</value>
                                          <value>Africa</value>
                                      </valueMap>
                                  </field>
                                  <field name="independence"  type="date"       title="Nationhood"          />
                                  <field name="area"          type="float"      title="Area (km&amp;sup2;)" format=",0" />
                                  <field name="population"    type="integer"    title="Population"          format=",0" />
                                  <field name="gdp"           type="float"      title="GDP ($M)"            format=",0" />
                                  <field name="member_g8"     type="boolean"    title="G8"                  />
                              </fields>
                          
                              <!--<serverObject lookupStyle="new" className="com.smartgwt.sample.showcase.server.MyCustomWorldDMI"/>-->
                          </DataSource>
                          MyCustomWorldDMI was removed.

                          AUTOFETCH
                          Code:
                               [java] === 2016-07-29 09:01:55,495 [6-40] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                               [java]     criteria:{
                               [java]         [B]continent:"Europe"[/B]
                               [java]     },
                               [java]     operationConfig:{
                               [java]         dataSource:"worldDS",
                               [java]         repo:null,
                               [java]         operationType:"fetch",
                               [java]         [B]textMatchStyle:"substring"[/B]
                               [java]     },
                               [java]     startRow:0,
                               [java]     endRow:75,
                               [java]     componentId:"isc_ListGrid_0",
                               [java]     appID:"builtinApplication",
                               [java]     operation:"worldDS_fetch",
                               [java]     oldValues:{
                               [java]         continent:"Europe"
                               [java]     }
                               [java] }
                               [java] === 2016-07-29 09:01:55,495 [6-40] INFO  IDACall - Performing 1 operation(s)
                               [java] === 2016-07-29 09:01:55,498 [6-40] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                               [java] === 2016-07-29 09:01:55,498 [6-40] DEBUG DeclarativeSecurity - DataSource worldDS is not in the pre-checked list, processing...
                               [java] === 2016-07-29 09:01:55,508 [6-40] DEBUG AppBase - [builtinApplication.worldDS_fetch] No userTypes defined, allowing anyone access to all operations for this application
                               [java] === 2016-07-29 09:01:55,508 [6-40] DEBUG AppBase - [builtinApplication.worldDS_fetch] No public zero-argument method named '_worldDS_fetch' found, performing generic datasource operation
                               [java] === 2016-07-29 09:01:55,509 [6-40] INFO  SQLDataSource - [builtinApplication.worldDS_fetch] Performing fetch operation with
                               [java]     criteria: {continent:"Europe"}    values: {continent:"Europe"}
                               [java] === 2016-07-29 09:01:55,529 [6-40] INFO  SQLDataSource - [builtinApplication.worldDS_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                               [java] === 2016-07-29 09:01:55,715 [6-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause
                               [java] === 2016-07-29 09:01:55,716 [6-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Eval'd row count query: SELECT COUNT(*) FROM worldDS WHERE (LOWER(worldDS.continent) LIKE '%europe%' ESCAPE '\' AND worldDS.continent IS NOT NULL)
                               [java] === 2016-07-29 09:01:55,723 [6-40] INFO  PoolManager - [builtinApplication.worldDS_fetch] SmartClient pooling disabled for 'HSQLDB' objects
                               [java] === 2016-07-29 09:01:55,724 [6-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] Initializing SQL config for 'HSQLDB' from system config - using DriverManager:  org.hsqldb.jdbcDriver
                               [java] === 2016-07-29 09:01:55,724 [6-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] org.hsqldb.jdbcDriver lookup successful
                               [java] === 2016-07-29 09:01:55,724 [6-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic
                               [java] === 2016-07-29 09:01:55,724 [6-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] Passing JDBC URL only to getConnection
                               [java] === 2016-07-29 09:01:55,826 [6-40] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] makeObject() created an unpooled Connection '183527734'
                               [java] === 2016-07-29 09:01:55,826 [6-40] DEBUG SQLConnectionManager - [builtinApplication.worldDS_fetch] Borrowed connection '183527734'
                               [java] === 2016-07-29 09:01:55,826 [6-40] DEBUG SQLDriver - [builtinApplication.worldDS_fetch] About to execute SQL query in 'HSQLDB' using connection '183527734'
                               [java] === 2016-07-29 09:01:55,826 [6-40] INFO  SQLDriver - [builtinApplication.worldDS_fetch] Executing SQL query on 'HSQLDB': [B]SELECT COUNT(*) FROM worldDS WHERE (LOWER(worldDS.continent) LIKE '%europe%' ESCAPE '\' AND worldDS.continent IS NOT NULL)[/B]
                               [java] === 2016-07-29 09:01:55,848 [6-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Using SQL Limit query
                               [java] === 2016-07-29 09:01:55,848 [6-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.continent) LIKE '%europe%' ESCAPE '\' AND worldDS.continent IS NOT NULL)
                               [java] === 2016-07-29 09:01:55,848 [6-40] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.continent) LIKE '%europe%' ESCAPE '\' AND worldDS.continent IS NOT NULL)
                               [java] === 2016-07-29 09:01:55,858 [6-40] INFO  DSResponse - [builtinApplication.worldDS_fetch] DSResponse: List with 45 items
                               [java] === 2016-07-29 09:01:55,859 [6-40] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource worldDS
                               [java] === 2016-07-29 09:01:55,859 [6-40] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                               [java] === 2016-07-29 09:01:55,859 [6-40] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                               [java] === 2016-07-29 09:01:55,867 [6-40] DEBUG SQLDriver - Freeing SQLDriver dbConnection 183527734
                               [java] === 2016-07-29 09:01:55,868 [6-40] DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "183527734"
                               [java] === 2016-07-29 09:01:55,874 [6-40] INFO  Compression - /showcase/sc/IDACall: 9389 -> 2106 bytes
                          FETCH
                          Code:
                               [java] === 2016-07-29 09:06:40,668 [6-42] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                               [java]     criteria:{
                               [java]         [B]continent:"Asia"[/B]
                               [java]     },
                               [java]     operationConfig:{
                               [java]         dataSource:"worldDS",
                               [java]         repo:null,
                               [java]         operationType:"fetch",
                               [java]         [B]textMatchStyle:"exact"[/B]
                               [java]     },
                               [java]     startRow:0,
                               [java]     endRow:75,
                               [java]     componentId:"isc_ListGrid_0",
                               [java]     appID:"builtinApplication",
                               [java]     operation:"worldDS_fetch",
                               [java]     oldValues:{
                               [java]         continent:"Asia"
                               [java]     }
                               [java] }
                               [java] === 2016-07-29 09:06:40,668 [6-42] INFO  IDACall - Performing 1 operation(s)
                               [java] === 2016-07-29 09:06:40,669 [6-42] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                               [java] === 2016-07-29 09:06:40,669 [6-42] DEBUG DeclarativeSecurity - DataSource worldDS is not in the pre-checked list, processing...
                               [java] === 2016-07-29 09:06:40,670 [6-42] DEBUG AppBase - [builtinApplication.worldDS_fetch] No userTypes defined, allowing anyone access to all operations for this application
                               [java] === 2016-07-29 09:06:40,689 [6-42] DEBUG AppBase - [builtinApplication.worldDS_fetch] No public zero-argument method named '_worldDS_fetch' found, performing generic datasource operation
                               [java] === 2016-07-29 09:06:40,690 [6-42] INFO  SQLDataSource - [builtinApplication.worldDS_fetch] Performing fetch operation with
                               [java]     criteria: {continent:"Asia"}    values: {continent:"Asia"}
                               [java] === 2016-07-29 09:06:40,704 [6-42] INFO  SQLDataSource - [builtinApplication.worldDS_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                               [java] === 2016-07-29 09:06:40,708 [6-42] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause
                               [java] === 2016-07-29 09:06:40,708 [6-42] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Eval'd row count query: SELECT COUNT(*) FROM worldDS WHERE (LOWER(worldDS.continent)='asia')
                               [java] === 2016-07-29 09:06:40,714 [6-42] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic
                               [java] === 2016-07-29 09:06:40,719 [6-42] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] Passing JDBC URL only to getConnection
                               [java] === 2016-07-29 09:06:40,825 [6-42] DEBUG PoolableSQLConnectionFactory - [builtinApplication.worldDS_fetch] makeObject() created an unpooled Connection '841123075'
                               [java] === 2016-07-29 09:06:40,825 [6-42] DEBUG SQLConnectionManager - [builtinApplication.worldDS_fetch] Borrowed connection '841123075'
                               [java] === 2016-07-29 09:06:40,825 [6-42] DEBUG SQLDriver - [builtinApplication.worldDS_fetch] About to execute SQL query in 'HSQLDB' using connection '841123075'
                               [java] === 2016-07-29 09:06:40,825 [6-42] INFO  SQLDriver - [builtinApplication.worldDS_fetch] Executing SQL query on 'HSQLDB': [B]SELECT COUNT(*) FROM worldDS WHERE (LOWER(worldDS.continent)='asia')[/B]
                               [java] === 2016-07-29 09:06:40,830 [6-42] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] Using SQL Limit query
                               [java] === 2016-07-29 09:06:40,830 [6-42] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.continent)='asia')
                               [java] === 2016-07-29 09:06:40,830 [6-42] DEBUG SQLDataSource - [builtinApplication.worldDS_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT LIMIT 0 75  worldDS.countryCode, worldDS.countryName, worldDS.capital, worldDS.government, worldDS.continent, worldDS.independence, worldDS.area, worldDS.population, worldDS.gdp, worldDS.member_g8 FROM worldDS WHERE (LOWER(worldDS.continent)='asia')
                               [java] === 2016-07-29 09:06:40,836 [6-42] INFO  DSResponse - [builtinApplication.worldDS_fetch] DSResponse: List with 51 items
                               [java] === 2016-07-29 09:06:40,836 [6-42] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource worldDS
                               [java] === 2016-07-29 09:06:40,836 [6-42] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                               [java] === 2016-07-29 09:06:40,836 [6-42] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                               [java] === 2016-07-29 09:06:40,840 [6-42] DEBUG SQLDriver - Freeing SQLDriver dbConnection 841123075
                               [java] === 2016-07-29 09:06:40,840 [6-42] DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "841123075"
                               [java] === 2016-07-29 09:06:40,842 [6-42] INFO  Compression - /showcase/sc/IDACall: 10877 -> 2537 bytes

                          Comment


                            #14
                            ListGrid.autoFetchTextMatchStyle is "substring" and fetchData() documents a default textMatchStyle of "exact", so again, the behavior you're observing is per docs. defaultTextMatchStyle does not apply when higher layers in the software are explicitly documented to use specific textMatchStyles; as the property name says, it's a default.

                            Comment


                              #15
                              To round this up, hopefully in a way that is helpful to you, we have implemented the following:
                              • In 6.1 and greater, there is now server-side support for DataSource.defaultTextMatchStyle
                              • In 5.0 and greater, we have introduced a new server.properties flag, "global.default.textMatchStyle"., which specifies a global default textMatchStyle to be used in the absence of an explicit textMatchStyle (and, from 6.1 onwards, a DataSource-level defaultTextMatchStyle). If you set this attribute to "exactCase", that should give you the behavior you desire.
                              Just to clarify, there never should have been any need for you to trawl client code. defaultTextMatchStyle always worked on requests from the client for cases where there was no explicit textMatchStyle, so setting that property on appropriate dataSources would have been enough to set the correct textmatchStyle for cases like a direct fetch on a DataSource, where there is no explicit textMatchStyle. However, as the documentation states, ".. DSRequests issued by ListGrids and other components will generally have a setting for textMatchStyle on the component itself"; defaultTextMatchStyle would not apply to such requests, but that doesn't matter because nothing has changed in cases where there is an explicit textMatchStyle.

                              Regards,
                              Isomorphic Software Support

                              Comment

                              Working...
                              X