2

I tried using sequelize and node-orm as well - but is there a way to reuse existing mysql schema? I Have a db schema defined with tables in mysql and wanted to use this with my node.js app (using express). So, I don't have to write all the define methods of defining tables again. Any help appreciated... I went through bunch of stackoverflow questions already such as: Which ORM should I use for Node.js and MySQL?

Thanks, JP

1 Answer 1

3

Checkout bookshelf.js, it doesn't require that you define the schema in the model layer.

Sign up to request clarification or add additional context in comments.

2 Comments

Great library. But is it possible there to query specific columns? Select col1, col2, col3 from table where id >=1
model.query({column: ['col1', 'col2', 'col3'], where: {id: 1}}).fetch() - it's just a thin relational model layer over knexjs.org

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.