# Flyweight - SQLite 용 ORM

> Clean Markdown view of GeekNews topic #14301. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=14301](https://news.hada.io/topic?id=14301)
- GeekNews Markdown: [https://news.hada.io/topic/14301.md](https://news.hada.io/topic/14301.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2024-04-13T10:31:01+09:00
- Updated: 2024-04-13T10:31:01+09:00
- Original source: [github.com/thebinarysearchtree](https://github.com/thebinarysearchtree/flyweight)
- Points: 16
- Comments: 1

## Topic Body

- SQLite 와 NodeJS를 위한 ORM   
- 매우 간단한 API와 ORM에서 파싱하는 SQL 쿼리를 생성하는 기능을 결합  
- 프로젝트에서 "npx create-flyweight database" 호출하고 나면 `import { db } from './database/db.js';` 처럼 바로 사용 가능   
- `npm run watch` 해두면 SQL 수정시 마다 자동으로 타입 업데이트   
- `npm run migrate &lt;migration-name&gt;` 으로 마이그레이션 가능(테이블 추가 및 변경)  
- 모든 테이블에 get, update, insert, remove 와 count/exists 제공

## Comments



### Comment 24425

- Author: kandk
- Created: 2024-04-15T10:01:04+09:00
- Points: 1

좋아보이네요. 모델을 js가 아닌 sql로 정의 한다는게 호불호가 갈릴 수도..
