sqlparser 패키지는 SQLite 문장을 파싱하고 이를 정적 분석하기 위해 설계된 Dart 라이브러리입니다. 개발자가 쿼리를 실행하지 않고도 프로그래밍 방식으로 SQL 쿼리를 검증하고 조사하며 조작할 수 있게 해줍니다. 코드 생성기, 리нтер 또는 데이터베이스 마이그레이션 유틸리티와 같이 SQL 구문에 대한 깊은 이해가 필요한 도구에 적합합니다. 파서는 표준 SQLite 구문을 지원하며, Dart용 인기 있는 SQLite ORM인 drift와 잘 통합됩니다. Android, iOS, Web, macOS, Windows 및 Linux를 포함한 모든 주요 플랫폼에서 작동합니다.
사용 사례
SQL 쿼리 검증
데이터베이스 마이그레이션 도구
SQL에서 코드 생성
SQL 스크립트의 정적 분석
개발 워크플로우에서 SQL 린팅
주요 기능
SQLite 구문 분석
정적 분석 기능
크로스 플랫폼 지원
드리프트와의 통합
강력한 오류 보고
적합한 대상
SQLite를 사용하는 Dart 개발자
SQL 검사가 필요한 도구
데이터베이스 스키마 관리
코드 생성 파이프라인
개발 시 SQL 검증
고려 사항
SQLite 구문에 한정
쿼리를 실행하지 않습니다
복잡한 SQL을 신중하게 다뤄야 합니다
빌드 또는 개발 도구에서 가장 잘 사용됨
런타임 쿼리 실행을 위한 것이 아님
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Drift
Core
Generator
Drift is a reactive persistence library for Flutter and Dart, built on top of
SQLite.
Drift is:
Flexible: Drift lets you write queries in both SQL and Dart,
providing fluent apis for both languages. You can filter and order results
or use joins to run queries on multiple tables. You can even use complex
SQL features like WITH and WINDOW clauses.
🔥 Feature rich: Drift has builtin support for transactions, schema
migrations, complex filters and expressions, batched updates and joins. We
even have a builtin IDE for SQL!
📦 Modular: Thanks to builtin support for daos and imports in SQL files, drift helps you keep your database code simple.
🛡️ Safe: Drift generates type-safe code based on your tables and queries. If you make a mistake in your queries, drift will find it at compile time and
provide helpful and descriptive lints.
⚡ Fast: Even though drift lets you write powerful queries, it can keep
up with the performance of key-value stores like shared preferences and Hive. Drift is the only major persistence library with builtin threading support, allowing you to run database code across isolates with zero additional effort.
Reactive: Turn any SQL query into an auto-updating stream! This includes complex queries across many tables.
⚙️ Cross-Platform support: Drift works on Android, iOS, macOS, Windows, Linux and the web. This template is a Flutter todo app that works on all platforms.
🗡️ Battle tested and production ready: Drift is stable and well tested with a wide range of unit and integration tests. It powers production Flutter apps.
This repository contains a number of packages making up the drift project, most
notably:
drift: The main runtime for drift, which provides most APIs.
drift_dev: The compiler for drift tables, databases and daos. It
also contains a fully-featured SQL IDE for the Dart analyzer.
sqlparser: A SQL parser and static analyzer, written in pure Dart. This package can be used without drift to perform analysis on SQL statements.
It's on pub at
.
We use melos to manage the different packages
in this repository.
You can install it with dart pub global activate melos. To activate it in this
repository, run dart pub get in this directory followed by melos bootstrap.