Apache ShardingSphere 5.4.1 Documentstatements of PostgreSQL and openGauss database. When no schema is specified in SQL, default access to‘public’schema. Other schemas need to declare before the table name, and do not support ‘SEARCH_PATH’to the specified data source - "*.*" # Load all single tables # PostgreSQL style - ds_0.public.t_config - ds_1.public.* - ds_2.*.* - "*.*.*" defaultDataSource: ds_0 # The default data source is used when subject to create the ShardingSphereDataSource. Sample public final class ShardingDatabasesAndTablesConfigurationPrecise { @Override public DataSource getDataSource() throws SQLException { return0 码力 | 572 页 | 3.73 MB | 1 年前3
Apache ShardingSphere v5.5.0 documentstatements of PostgreSQL and openGauss database. When no schema is specified in SQL, default access to‘public’schema. Other schemas need to declare before the table name, and do not support ‘SEARCH_PATH’to the specified data source - "*.*" # Load all single tables # PostgreSQL style - ds_0.public.t_config - ds_1.public.* - ds_2.*.* - "*.*.*" defaultDataSource: ds_0 # The default data source is used when HikariConfig; import com.zaxxer.hikari.HikariDataSource; import javax.sql.DataSource; public class ExampleUtils { public DataSource createDataSource() { HikariConfig config = new HikariConfig(); config0 码力 | 602 页 | 3.85 MB | 1 年前3
Apache ShardingSphere 5.2.0 Documentcreate the ShardingSphereDataSource. Sample public final class ShardingDatabasesAndTablesConfigurationPrecise implements ExampleConfiguration { @Override public DataSource getDataSource() throws SQLException Set load balancing algorithms 3. Use read‐write splitting data source Configuration Examples public DataSource getDataSource() throws SQLException { ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfig to create ShardingSphereData‐ Source. Sample public final class EncryptDatabasesConfiguration implements ExampleConfiguration { @Override public DataSource getDataSource() { Properties props = new0 码力 | 483 页 | 4.27 MB | 1 年前3
Apache ShardingSphere 5.2.1 Documentcreate the ShardingSphereDataSource. Sample public final class ShardingDatabasesAndTablesConfigurationPrecise implements ExampleConfiguration { @Override public DataSource getDataSource() throws SQLException Set load balancing algorithms 3. Use read‐write splitting data source Configuration Examples public DataSource getDataSource() throws SQLException { ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfig to create ShardingSphereData‐ Source. Sample public final class EncryptDatabasesConfiguration implements ExampleConfiguration { @Override public DataSource getDataSource() { Properties props = new0 码力 | 523 页 | 4.51 MB | 1 年前3
Apache ShardingSphere 中文文档 5.4.1DAL。支持分页、去重、排序、分组、聚合、表关联等复杂查询。 支持 PostgreSQL 和 openGauss 数据库的 schema DDL 和 DML 语句,当 SQL 中不指定 schema 时,默认 访问 public schema,其他 schema 则需要在表名前显示声明,暂不支持 SEARCH_PATH 修改 schema 搜索路径。 常规查询 • SELECT 主语句 SELECT select_expr 9.1. ShardingSphere-JDBC 75 Apache ShardingSphere document # PostgreSQL 风格 - ds_0.public.t_config - ds_1.public.* - ds_2.*.* - "*.*.*" defaultDataSource: ds_0 # 默认数据源,仅在执行 CREATE TABLE 创建单表时有效。缺失值为空,表 createDataSource 方法,创建 ShardingSphere‐ DataSource。 配置示例 public final class ShardingDatabasesAndTablesConfigurationPrecise { @Override public DataSource getDataSource() throws SQLException { return0 码力 | 530 页 | 4.49 MB | 1 年前3
Apache ShardingSphere v5.5.0 中文文档DAL。支持分页、去重、排序、分组、聚合、表关联等复杂查询。 支持 PostgreSQL 和 openGauss 数据库的 schema DDL 和 DML 语句,当 SQL 中不指定 schema 时,默认 访问 public schema,其他 schema 则需要在表名前显示声明,暂不支持 SEARCH_PATH 修改 schema 搜索路径。 常规查询 • SELECT 主语句 SELECT select_expr t_single # 加载指定单表 - ds_1.* # 加载指定数据源中的全部单表 - "*.*" # 加载全部单表 # PostgreSQL 风格 - ds_0.public.t_config - ds_1.public.* - ds_2.*.* - "*.*.*" defaultDataSource: ds_0 # 默认数据源,仅在执行 CREATE TABLE 创建单表时有效。缺失值为空,表 HikariConfig; import com.zaxxer.hikari.HikariDataSource; import javax.sql.DataSource; public class ExampleUtils { public DataSource createDataSource() { HikariConfig config = new HikariConfig(); config0 码力 | 557 页 | 4.61 MB | 1 年前3
Apache ShardingSphere 中文文档 5.3.2DAL。支持分页、去重、排序、分组、聚合、表关联等复杂查询。 支持 PostgreSQL 和 openGauss 数据库的 schema DDL 和 DML 语句,当 SQL 中不指定 schema 时,默认 访问 public schema,其他 schema 则需要在表名前显示声明,暂不支持 SEARCH_PATH 修改 schema 搜索路径。 常规查询 • SELECT 主语句 SELECT select_expr 9.1. ShardingSphere-JDBC 75 Apache ShardingSphere document # PostgreSQL 风格 - ds_0.public.t_config - ds_1.public.* - ds_2.*.* - "*.*.*" defaultDataSource: ds_0 # 默认数据源,仅在执行 CREATE TABLE 创建单表时有效。缺失值为空,表 createDataSource 方法,创建 ShardingSphere‐ DataSource。 配置示例 public final class ShardingDatabasesAndTablesConfigurationPrecise { @Override public DataSource getDataSource() throws SQLException { return0 码力 | 508 页 | 4.44 MB | 1 年前3
Apache ShardingSphere 中文文档 5.2.0Apache ShardingSphere document, v5.2.0 配置示例 public final class ShardingDatabasesAndTablesConfigurationPrecise implements ExampleConfiguration { @Override public DataSource getDataSource() throws SQLException 设置负载均衡算法 3. 使用读写分离数据源 4.1. ShardingSphere-JDBC 86 Apache ShardingSphere document, v5.2.0 配置示例 public DataSource getDataSource() throws SQLException { ReadwriteSplittingDataSourceRuleConfiguration dataSourceConfig createDataSource 方法,创建 ShardingSphere‐ DataSource。 配置示例 public final class EncryptDatabasesConfiguration implements ExampleConfiguration { @Override public DataSource getDataSource() { Properties props = new0 码力 | 449 页 | 5.85 MB | 1 年前3
Apache ShardingSphere 中文文档 5.0.0-alphacases=false 运行调试模式 • 标 准 测 试 引 擎 运 行 org.apache.shardingsphere.test.integration.engine.it. ${SQL-TYPE}.General${SQL-TYPE}IT 以启动不同 SQL 类型的测试引擎。 • 批量测试引擎运行 org.apache.shardingsphere.test.integration.engine.it t public class TransactionConfiguration { @Bean public PlatformTransactionManager txManager(final DataSource dataSource) { return new DataSourceTransactionManager(dataSource); } @Bean public JdbcTemplate Type(TransactionType.XA) // 支持 TransactionType.LOCAL, TransactionType.XA, TransactionType.BASE public void insert() { jdbcTemplate.execute("INSERT INTO t_order (user_id, status) VALUES (?, ?)", (P0 码力 | 301 页 | 3.44 MB | 1 年前3
Apache ShardingSphere 中文文档 5.0.0t public class TransactionConfiguration { @Bean public PlatformTransactionManager txManager(final DataSource dataSource) { return new DataSourceTransactionManager(dataSource); } @Bean public JdbcTemplate Type(TransactionType.XA) // 支持 TransactionType.LOCAL, TransactionType.XA, TransactionType.BASE public void insert() { jdbcTemplate.execute("INSERT INTO t_order (user_id, status) VALUES (?, ?)", (P Type(TransactionType.XA) // 支持 TransactionType.LOCAL, TransactionType.XA, TransactionType.BASE public void insert() { jdbcTemplate.execute("INSERT INTO t_order (user_id, status) VALUES (?, ?)", (P0 码力 | 385 页 | 4.26 MB | 1 年前3
共 26 条
- 1
- 2
- 3













