ShardingAlgorithm

Fully-qualified class name

org.apache.shardingsphere.sharding.spi.ShardingAlgorithm

Definition

Sharding Algorithm definition

Implementation classes

Configuration TypeAuto Create TablesDescriptionFully-qualified class name
MODYModulo sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.mod.ModShardingAlgorithm
HASH_MODYHash modulo sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.mod.HashModShardingAlgorithm
BOUNDARY_RANGEYBoundary based range sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.range.BoundaryBasedRangeShardingAlgorithm
VOLUME_RANGEYVolume based range sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.range.VolumeBasedRangeShardingAlgorithm
AUTO_INTERVALYMutable interval sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.datetime.AutoIntervalShardingAlgorithm
INTERVALNFixed interval sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.datetime.IntervalShardingAlgorithm
CLASS_BASEDNClass based sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.classbased.ClassBasedShardingAlgorithm
INLINENInline sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.inline.InlineShardingAlgorithm
COMPLEX_INLINENComplex inline sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.complex.ComplexInlineShardingAlgorithm
HINT_INLINENHint inline sharding algorithmorg.apache.shardingsphere.sharding.algorithm.sharding.hint.HintInlineShardingAlgorithm
COSID_MODNModulo sharding algorithm provided by CosIdorg.apache.shardingsphere.sharding.cosid.algorithm.sharding.mod.CosIdModShardingAlgorithm
COSID_INTERVALNFixed interval sharding algorithm provided by CosIdorg.apache.shardingsphere.sharding.cosid.algorithm.sharding.interval.CosIdIntervalShardingAlgorithm
COSID_INTERVAL_SNOWFLAKENSnowflake key-based fixed interval sharding algorithm provided by CosIdorg.apache.shardingsphere.sharding.cosid.algorithm.sharding.interval.CosIdSnowflakeIntervalShardingAlgorithm

KeyGenerateAlgorithm

Fully-qualified class name

org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm

Definition

Distributed Key Generating Algorithm definition

Implementation classes

Configuration TypeDescriptionFully-qualified class name
SNOWFLAKESnowflake key generate algorithmorg.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm
UUIDUUID key generate algorithmorg.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm
NANOIDNanoId key generate algorithmorg.apache.shardingsphere.sharding.nanoid.algorithm.keygen.NanoIdKeyGenerateAlgorithm
COSIDCosId key generate algorithmorg.apache.shardingsphere.sharding.cosid.algorithm.keygen.CosIdKeyGenerateAlgorithm
COSID_SNOWFLAKESnowflake key generate algorithm provided by CosIdorg.apache.shardingsphere.sharding.cosid.algorithm.keygen.CosIdSnowflakeKeyGenerateAlgorithm

ShardingAuditAlgorithm

Fully-qualified class name

org.apache.shardingsphere.sharding.spi.ShardingAuditAlgorithm

Definition

Sharding audit algorithm definition

Implementation classes

Configuration TypeDescriptionFully-qualified class name
DML_SHARDING_CONDITIONSProhibit DML auditing algorithm without sharding conditionsorg.apache.shardingsphere.sharding.algorithm.audit.DMLShardingConditionsShardingAuditAlgorithm

DatetimeService

Fully-qualified class name

org.apache.shardingsphere.infra.datetime.DatetimeService

Definition

Obtain the current date for routing definition

Implementation classes

Configuration TypeDescriptionFully-qualified class name
DatabaseDatetimeServiceGet the current time from the database for routingorg.apache.shardingsphere.datetime.database.DatabaseDatetimeService
SystemDatetimeGet the current time from the application system for routingorg.apache.shardingsphere.datetime.system.SystemDatetimeService