GithubHelp home page GithubHelp logo

Comments (7)

yikezhan avatar yikezhan commented on June 30, 2024

这个问题有解决方案了么?

from sharding.

hyperphoton avatar hyperphoton commented on June 30, 2024

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.

TangMonk avatar TangMonk commented on June 30, 2024

readme still old on website

from sharding.

zishiguo avatar zishiguo commented on June 30, 2024

Is there any the solution ?

from sharding.

jiekun avatar jiekun commented on June 30, 2024

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.

zishiguo avatar zishiguo commented on June 30, 2024

@jiekun Thank you for your advice. Can you recommend other plugins ?

from sharding.

jiekun avatar jiekun commented on June 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.