Giter Site home page Giter Site logo

Comments (3)

sdepold avatar sdepold commented on May 3, 2024

Hmm could u please add a comment to the relevant lines ^_^ I can't find them :> One major issue with the original version of sequelize was the crappy code structure. What do you think about the current code(-structure) ?

from sequelize.

pvsundarram avatar pvsundarram commented on May 3, 2024

Hi,
I like the new interface, better than what it was before. And it was fairly easy for me to get around the code.
AFAIK the table options such as collation, default character set, engine etc, only come in the end and are all separated by whitespace in a 'create table statement'.

https://github.com/pinetechlabs/sequelize/blob/rewrite/lib/sequelize/query-generator.js#L11
https://github.com/pinetechlabs/sequelize/blob/rewrite/lib/sequelize/query-generator.js#L22-25
https://github.com/pinetechlabs/sequelize/blob/rewrite/lib/sequelize/model-definition.js#L54

Additional table creation options could be separately passed inside options:
{
tableOptions : {
ENGINE : 'innodb',
'DEFAULT CHARACTER SET' : 'big5'
}
}

from sequelize.

sdepold avatar sdepold commented on May 3, 2024

i build this on my own. you can now define the engine for all models via:

sequelize = new Sequelize(db, user, pw, {define: { engine: 'InnoDB' }})

or via:

Person = sequelize.define('Person', { name: Sequelize.STRING }, { engine: 'InnoDB' })

from sequelize.

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.