Comments (3)
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.
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.
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)
- The Integers above 9 digits are getting converted to decimal even when DataTypes.STRING is Specified and stored as string HOT 1
- Lower and trim flags to be added in models field options HOT 1
- Through model casing has a different name depending on eager or lazy loading HOT 1
- Misc Internal Improvements HOT 5
- findOrCreate - Transaction cannot be committed because it has been finished with state: rollback HOT 1
- Bulk Update Bug
- Oracle: Cannot insert more than 255 chars into a Sequelize.STRING(1024) column through bulkCreate() : NJS-058: maxSize of 255 is too small for value of length 921 in row 0 HOT 3
- sql.trim() fatal error HOT 2
- Support Cloudflare D1 Connections HOT 1
- Drop subclasses of `SequelizeConnectionError`
- Bug: the type of the `beforeBulkDestroy` hander's `options` attribute is `BulkCreateOptions` instead of `BulkDestroyOptions`
- bulkCreate with updateOnDuplicate updates the record (updatedAt) even if it is not changed HOT 3
- Is Iterate over findAll result and update records possible? HOT 3
- Creating multiple references in databases for same foreign key HOT 7
- postgres-array not resolved with yarn v4 (Error: Please install postgres-array package manually) HOT 2
- Customize toJSON() for custom serialization logic HOT 5
- Can't make table queries. TypeError: _.includes is not a function HOT 1
- DATE parse function crashes in SQLite HOT 1
- PostgreSQL. Error in getQueryInterface().describeTable() with column comments and schemas
- Unable to find dialect at HOT 2
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 sequelize.