분류 Nodejs

PostgreSQL, MySQL, SQLite3 및 RESTful 데이터 스토어용 ORM

컨텐츠 정보

  • 조회 351 (작성일 )

본문

OPENRECORD는 nodejs를 위한 ActiveRecord에서 영감을 받은 ORM입니다.


https://github.com/PhilWaldmann/openrecord 


const Store = require('openrecord/store/sqlite3')

const store = new Store({
  file: './my-posts-db.sqlite3',
  autoLoad: true
})

store.ready(async () => {
  const post = await store.Model('Post').find(1)
  console.log(post)
})