Interface SQLRouter<T extends org.apache.shardingsphere.infra.rule.ShardingSphereRule>

Type Parameters:
T - type of rule
All Superinterfaces:
org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI<T>

public interface SQLRouter<T extends org.apache.shardingsphere.infra.rule.ShardingSphereRule> extends org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI<T>
SQL Router.
  • Method Summary

    Modifier and Type
    Method
    Description
    createRouteContext(QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData globalRuleMetaData, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext)
    Create route context.
    void
    decorateRouteContext(RouteContext routeContext, QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext)
    Decorate route context.

    Methods inherited from interface org.apache.shardingsphere.infra.util.spi.type.ordered.OrderedSPI

    getOrder, getTypeClass
  • Method Details

    • createRouteContext

      RouteContext createRouteContext(QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.rule.ShardingSphereRuleMetaData globalRuleMetaData, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext)
      Create route context.
      Parameters:
      queryContext - query context
      globalRuleMetaData - global rule meta data
      database - database
      rule - rule
      props - configuration properties
      connectionContext - connection context
      Returns:
      route context
    • decorateRouteContext

      void decorateRouteContext(RouteContext routeContext, QueryContext queryContext, org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase database, T rule, org.apache.shardingsphere.infra.config.props.ConfigurationProperties props, org.apache.shardingsphere.infra.context.ConnectionContext connectionContext)
      Decorate route context.
      Parameters:
      routeContext - route context
      queryContext - query context
      database - database
      rule - rule
      props - configuration properties
      connectionContext - connection context