# simple-sharding **Repository Path**: yan8755/simple-sharding ## Basic Information - **Project Name**: simple-sharding - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-06-17 - **Last Updated**: 2024-11-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Simple-Sharding [![Build Status](https://travis-ci.org/yuanwhy/simple-sharding.svg?branch=master)](https://travis-ci.org/yuanwhy/simple-sharding) [![Join the chat at https://gitter.im/yuanwhy/simple-sharding](https://badges.gitter.im/yuanwhy/simple-sharding.svg)](https://gitter.im/yuanwhy/simple-sharding?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) A simple database shard middleware, based on JDBC API. Applications can scale database by using new DataSource with simple-sharding. This project is not finished, and feel free to study. ## Features * Transaction in single database shard * Sharding * Rewriting rules ## Quick Start #### 1. Get source code ``` git clone https://github.com/yuanwhy/simple-sharding.git ``` and then execute `test/create_schema.sql` to init data. #### 2. Install simple-sharding to you local repository by ``` mvn clean install ``` #### 3. Add artifact dependency ```xml com.yuanwhy simple-sharding 0.0.1-SNAPSHOT ``` #### 4. Set logic datasource and physic datasources ```xml ``` #### 5. Feel free to use JDBC API or ORM framework (e.g. MyBatis ) to execute your SQL ## Document [Simple-Sharding 中文](http://www.jianshu.com/p/9784a3d4c7a8) [References](http://yuanwhy.com/tags/%E5%88%86%E5%BA%93%E5%88%86%E8%A1%A8/) ## Todo - [x] Support Spring custom namespace - [ ] Finish other methods - [ ] Support multiple tables in one datasource ## License Apache License, Version 2.0