패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.35.3

drift_dev

drift 사용자를 위한 개발용 종속성입니다. 생성기 및 개발 도구를 포함합니다.

30일 다운로드
147만
좋아요
72
Pub 점수
130

패키지 설치

flutter pub add drift_dev

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

drift_dev 는 Flutter 애플리케이션에서 데이터베이스 관리를 간소화하기 위해 드리프트 패키지의 개발 의존성으로 코드 생성 도구 및 유틸리티를 제공합니다. SQL 스키마 정의에서 효율적이고 타입 안전한 Dart 코드를 생성하는 생성기가 포함되어 있으며, 반복 코드를 줄이고 런타임 오류를 최소화합니다. 로컬 데이터베이스 작업에 drift 를 사용하는 개발자를 위한 것으로, 모델 생성 및 마이그레이션 처리와 같은 반복 작업을 자동화하여 생산성을 향상시킵니다. 이 도구는 Flutter의 빌드 시스템과 원활하게 통합되어 개발 중 빠른 반복을 가능하게 합니다.

사용 사례

  • 타입 안전한 데이터베이스 모델 생성
  • 마이그레이션 스크립트 자동화
  • SQL 스키마 통합 간소화
  • 실시간 데이터베이스 업데이트 활성화
  • 오프라인 우선 앱 개발 지원

주요 기능

  • SQL 스키마에서 코드 생성
  • 형 안전한 데이터베이스 접근
  • Flutter 빌드 시스템과의 원활한 통합
  • 자동 마이그레이션 처리
  • 실시간 데이터 동기화 지원

적합한 대상

  • 로컬 데이터베이스용으로 드리프트를 사용하는 플러터 개발자
  • 오프라인 우선 기능을 필요로 하는 앱
  • 타입 안정성과 코드 품질을 우선시하는 팀
  • 보일러플레이트를 줄이려는 개발자
  • 복잡한 데이터베이스 스키마를 가진 프로젝트

고려 사항

  • drift를 종속성으로 필요로 합니다
  • Flutter 프로젝트에만 제한됨
  • 런타임 기능 없음
  • 개발 전용으로 사용해야 합니다
  • 코드 생성을 위해 build_runner에 의존합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Drift

Build Status Using melos

Core Generator
Main version Generator version

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.

With drift, persistence on Flutter is fun!

To start using drift, read our detailed docs.

If you have any questions, feedback or ideas, feel free to create an issue. If you enjoy this project, I'd appreciate your 🌟 on GitHub.

Sponsors

Drift is proudly Sponsored by Stream 💙 and PowerSync.


Try the Flutter Chat Tutorial  💬

Try PowerSync with Supabase

Working on this project

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 sqlparser.

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.

카테고리

의존성

의존성 목록 25 개

소스 저장소

이 패키지를 사용하는 프로젝트