Single Table

Background

Single rule is used to specify which single tables need to be managed by ShardingSphere, or to set the default single table data source.

Parameters

  1. rules:
  2. - !SINGLE
  3. tables:
  4. # MySQL style
  5. - ds_0.t_single # Load specified single table
  6. - ds_1.* # Load all single tables in the specified data source
  7. - "*.*" # Load all single tables
  8. # PostgreSQL style
  9. - ds_0.public.t_config
  10. - ds_1.public.*
  11. - ds_2.*.*
  12. - "*.*.*"
  13. defaultDataSource: ds_0 # The default data source is used when executing CREATE TABLE statement to create a single table. The default value is null, indicating random unicast routing.