PhilWaldmann / openrecord

Make ORMs great again!
https://openrecord.js.org
MIT License
486 stars 38 forks source link

How can i make raw sql query? #102

Closed Feelthewind closed 4 years ago

Feelthewind commented 4 years ago

Hi, author.

I wonder how i can make raw sql query.

Is there any example or something else to solve this?

Plus, I also wonder how i can define models when primary key is more than one.

PhilWaldmann commented 4 years ago

Hi @Feelthewind

use Model.raw("SQL QUERY", arguments) or store.connection.raw("SQL QUERY") (see knex)