Comments (7)
这个问题有解决方案了么?
from sharding.
The example no longer works and was fixed in the README.
If you want to use different sharding rules, currently you can use multiple database connections.
from sharding.
readme still old on website
from sharding.
Is there any the solution ?
from sharding.
The example no longer works and was fixed in the README. If you want to use different sharding rules, currently you can use multiple database connections.
@zishiguo We've fixed it internally. Due to the lack of maintenance of this community, we did not contributed our changes to the original repo.
BTW I am not recommand you to use this hook with gorm. We used it for couple months. There are too many issues and bugs under current implementation. Some of them are fatal. You should write sharding SQL with other plugin / manually, and should NOT use this repo in order to save your time.
from sharding.
@jiekun Thank you for your advice. Can you recommend other plugins ?
from sharding.
@jiekun Thank you for your advice. Can you recommend other plugins ?
We abondoned the plugin way. It's hard to manage the real SQL after re-writed. If the plugin goes wrong, that would be a very big problem, like, you throw your data (which belongs to table _001) to table _003 wrongly.
AFAIK there is no perfect plugin (that supports all kind of SQL stmt, like IN
/ JOIN
/ many advance usage) in Go yet. You may try shardingsphere, which may be a lot more heavy. I recommand specifying table name with Table()
method for short-term usage. Then you could evaluate shardingsphere and other proxy middleware later.
from sharding.
Related Issues (20)
- Error 1054 (42S22): Unknown column 'user_follow.deleted_at' in 'where clause' HOT 11
- example doesn't cover soft delete cases
- Preload 关联模式能用么?
- When DoubleWrite is on, is the query also run twice?
- sharding.Register((sharding.Config literal), (model.XXXX literal)).Register undefined (type *sharding.Sharding has no field or method
- Why restrict the primary key of sharding to int64 and must be called "ID" HOT 3
- Support for custom schema name in Postgres
- does gorm sharding support JOIN ? HOT 5
- 如何注册不同的shardingkey 分表策略 HOT 5
- [Warning!!!] Default snowflake id in multiple node deployment may result primary key CONFLICT!!! HOT 6
- 是否可以支持注册不同的shardingkey 分表策略 HOT 1
- mysql 驱动没有回填snowflake id HOT 2
- 替换sql, 让日志中记录真实执行的sql
- different tables have the different sharding config
- how to query by page
- mysql使用了for update报expected semicolon or EOF, found 'FOR'错误 HOT 1
- sharding key or id required, and use operator =
- sharding支持mysql吗? HOT 2
- Occur DATA RACE when use sharding in concurrency HOT 2
- panic: interface conversion: sharding.ShardingMigrator is not migrator.BuildIndexOptionsInterface: missing method BuildIndexOptions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharding.