phoema opened a new issue #4806: Only Use Hint to shard switch database,with not sqlParse URL: https://github.com/apache/incubator-shardingsphere/issues/4806 Version 5.0.0-RC1-SNAPSHOT from master branch ## Question I used hint as a database rule. But does the SQL statement still have to execute the sqlparse call? I just want to use hint to perform sub database operations. My statements have some associated retrieval or more complex statistical statements. Sqlparse is not well supported. Of course, the release version may support it, but I don't want to witre many table config,Most tables only need to be sharding into databases What can I do to tell shardingsphere not to parse it? Just access the specified database according to my hint rules. or is there have some simple configuration writing methods to only shard with db and with not table? my config is: dataSources: #names: master,test master: !!com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/wise-master?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true username: root password: J #filters: stat maxActive: 20 initialSize: 1 maxWait: 60000 minIdle: 1 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true maxOpenPreparedStatements: 20 # filters: stat,wall,slf4j connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500;druid.stat.logSlowSql=true test: !!com.alibaba.druid.pool.DruidDataSource #type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/wise-test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true username: root password: J test2: !!com.alibaba.druid.pool.DruidDataSource #type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/wise-test2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true username: root password: J shardingRule: tables: v_s_biz_fee: #TODO saas databaseStrategy: hint: #Hint algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy v_s_official_notice: #TODO saas databaseStrategy: hint: #Hint algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy act_ru_history_job: databaseStrategy: hint: #Hint algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy act_ru_identitylink: databaseStrategy: hint: #Hint algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy ........ many tables with Hint sys_area: actualDataNodes: master.sys_area databaseStrategy: none: #Hint sys_area_cn: actualDataNodes: master.sys_area_cn databaseStrategy: none: #Hint sys_tenant_info: actualDataNodes: master.sys_tenant_info databaseStrategy: none: #Hint sys_column_define: actualDataNodes: master.sys_column_define databaseStrategy: none: #Hint mst_cpc_info: actualDataNodes: master.mst_cpc_info defaultDataSourceName: master defaultDatabaseStrategy: hint: #Hint algorithmClassName: com.smarttree.manage.config.mybatis.HintShardingStrategy bindingTables: - quartz_user_monitor,qrtz_triggers - qrtz_job_details,qrtz_fired_triggers props: sql.show: true
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
