Skip to content
CAI
Software that uses CAICheck a score

tekartik/sqflite

64.2

Adequate · 13 November 2026

22.7k

lines of production code

Dart

with Objective-C, Java, C

8

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add FFI-based SQLite example applications for Dart VM

The example directory now includes three Dart scripts demonstrating the FFI-based SQLite implementation on the Dart VM. These examples show how to initialize the FFI loader, perform in-memory and persistent database operations using the new \databaseFactoryFfi\, and query the SQLite version, utilizing the updated \Map\<String, Object?\>\ type signature.

_sqflite\_common\ffi/example · high confidence

Add example app demonstrating shared worker support

The example application for sqflite\_common\_ffi\_web has been updated to demonstrate the new shared worker implementation. The new files (index.html, main.dart, sw.dart, ui.dart, styles.css) provide a working demo that initializes the database factory using shared workers, including options to force basic worker fallback, and includes specific test logic for BigInt support and exception handling within the web worker context.

_packages\_web/sqflite\_common\_ffi\web/example · high confidence

Add isolated web1 example demonstrating custom SQLite worker and database naming

The example project now includes a new 'web1' directory containing an HTML page and Dart entry point that demonstrates configuring the sqflite\_common\_ffi\_web library with custom identifiers. This setup allows users to override the shared worker URI, IndexedDB name, and SQLite3 WASM file name, ensuring database isolation for testing or multi-instance scenarios.

_packages\_web/sqflite\_common\_ffi\_web\test/example · high confidence

Added Android-specific test runner for sqflite\_common\_test

A new Android example project has been added to enable running the sqflite\_common\_test suite on Android devices and emulators. Users can now execute these unit tests via the console by running \flutter run -t lib/test\_main.dart\, which utilizes the \SqfliteAndroidTestContext\ to validate the Android plugin's behavior.

_packages\_flutter/sqflite\_example\android · high confidence

Added FFI async example application

The example application for the sqflite\_common\_ffi\_async package has been added, demonstrating how to initialize the FFI loader and use the asynchronous database factory to create tables, insert records, and query data.

_packages/sqflite\_common\_ffi\async/example · high confidence

Added FFI test utilities and web simulation plugin for the test app

The test application now includes new source files to support testing across desktop and web platforms. A new \ffi\_test\_utils.dart\ module provides helper functions for managing build directories, detecting the current desktop platform (Windows, macOS, Linux), and executing Flutter build commands for desktop targets. Additionally, \sqflite\_web\_sim.dart\ introduces a web plugin registration class that configures the default database factory to use the FFI-based web implementation, while \import.dart\ centralizes exports for development and debugging utilities from the underlying sqflite packages.

_sqflite\_test\app/lib/src · high confidence

Added FFI-based SQLite console test application

A new console application has been added to demonstrate initializing the SQLite FFI backend and performing basic database operations, such as opening an in-memory database, querying the SQLite version, and setting the database version.

_packages/console\_test\app/bin · high confidence

Added Linux setup utility script

A new Dart script (linux\_setup.dart) has been added to the tool directory to automate the installation of SQLite dependencies (libsqlite3-0 and libsqlite3-dev) on Linux systems, primarily to support CI environments.

_sqflite\_common\ffi/tool · high confidence

Added Swift Package Manager configuration utilities and iOS/macOS test project helpers

The sqflite\_support library now includes new tools to manage Swift Package Manager (SPM) integration and streamline testing on Apple platforms. A new spm.dart module provides functions to detect, enable, and disable the SPM feature in the Flutter environment, ensuring the installed Flutter version meets the minimum requirement (3.26.0). Additionally, test\_project.dart introduces utilities to create and clean iOS and macOS test projects, locate active iOS devices, and run applications in debug or release modes, facilitating easier validation of the plugin on these platforms.

_sqflite\support/lib · high confidence

Added Swift Package Manager test application for Darwin platforms

A new test application has been added to validate Swift Package Manager (SPM) support for the sqflite Darwin implementation. This location provides the iOS and macOS test project scaffolding, including configuration files (analysis options, gitignore) and a suite of tooling scripts to enable SPM, generate the test projects, and run or validate them on iOS and macOS targets.

_packages\_flutter/sqflite\_test\_app\_darwin\spm · high confidence

Added debug flag for web worker testing

A new debug utility has been added to the sqflite\_common\_ffi\_web package, exposing a \sqliteFfiWebDebugWebWorker\ getter and setter. This feature allows developers to toggle a debug state specifically for testing the web worker implementation, with the setter marked as deprecated to indicate its testing-only purpose.

_packages\_web/sqflite\_common\_ffi\web/lib/src/debug · high confidence

Added local tooling scripts for building and serving the sqflite\_common\_ffi\_web example

New Dart scripts have been added to the \tool\ directory to streamline the local development workflow for the \sqflite\_common\_ffi\_web\ package. These scripts automate the setup of SQLite binaries for the example directory, run \webdev\ to build or serve the application, and start a local HTTP server (\dhttpd\) for testing. This allows developers to easily set up, build, and serve the web worker example locally without relying on global installations or manual command sequences.

_packages\_web/sqflite\_common\_ffi\web/tool · high confidence

Added sqflite\_ffi test application with sandbox and isolate tests

A new test application (\sqflite\_ffi\_test\_app\) has been added to verify the \sqflite\_ffi\ plugin. This app includes a dedicated test page that exercises SQLite isolate sharing between Flutter isolates using \IsolateNameServer\, and specific unit tests confirming the new \sandbox()\ extension method on \DatabaseFactory\ correctly scopes database paths. The package also provides tooling scripts to run the FFI test runner on Linux and via a test menu.

_packages\_flutter/sqflite\_ffi\_test\app · high confidence

Added tool to generate escaped SQL keyword names

A new Dart script, generate\_escape\_names.dart, has been added to the tool directory. This script reads the official list of SQLite language keywords and outputs them as a list of escaped string literals, facilitating the generation of code that safely handles reserved SQL words.

_sqflite\common/tool · high confidence

Export Windows initialization helper

A new \setup.dart\ file is introduced in the Windows-specific source directory, exporting a \windowsInit\ function. This helper forces an in-memory SQLite database open and close in the main isolate, serving as a reference implementation to resolve known Windows DLL loading issues that occur when initialization happens in other isolates.

_sqflite\_common\ffi/lib/src/windows · high confidence

Extract sqflite\_common as a standalone library with sandboxing and iteration support

The core database logic has been extracted into the new sqflite\_common package, providing a platform-agnostic implementation for database operations, batching, and cursors. This change introduces a sandbox extension on DatabaseFactory that allows scoping database paths to a specific directory for isolation, and adds iteration extensions (rawQueryIterate, queryIterate) to process query results row-by-row without loading everything into memory. The package also includes a new DatabaseFileSystem abstraction for file operations and exposes extended SQLite result codes in exceptions for better error handling.

_sqflite\common/lib/src · high confidence

Initial Android example project for sqflite

The sqflite\_android/example directory now contains a complete example application demonstrating how to use the sqflite plugin on Android. This includes a main entry point that enables compatibility mode, standard Flutter analysis options, a README with instructions for running the app and executing Android unit/connected tests, and a .gitignore file tailored for the project structure.

_sqflite\android/example · high confidence

Initial implementation of sqflite\_common\_ffi\_web with Shared Worker support

The \sqflite\_common\_ffi\_web\ package now provides a functional web implementation for SQLite, introducing a \databaseFactoryFfiWeb\ that utilizes a Shared Worker to run the SQLite3 WASM engine off the main UI thread. This change adds a new file system abstraction (\SqfliteDatabaseFileSystemFfiWeb\) that persists database files in IndexedDB, and includes a \checkOpenDatabaseArgumentsWeb\ validation that prevents opening persistent databases with \singleInstance: false\ to avoid corruption from concurrent writes without locking. The implementation also features a custom encoding layer in \utils.dart\ to safely serialize complex types like \BigInt\ across the worker boundary.

_packages\_web/sqflite\_common\_ffi\web/lib/src · high confidence

Initial release of sqflite 2.4.4 with agent skills and Dart 3.12 requirement

The sqflite package introduces version 2.4.4, which adds installable agent skills (\sqflite-crud-and-transactions\, \sqflite-open-database\, and \sqflite-testing-and-platforms\) to the \skills/\ directory. This release also enforces a requirement for Dart 3.12, aligning with the latest SDK standards.

sqflite · high confidence

Initial release of sqflite\_common\_ffi\_web package

The sqflite\_common\_ffi\_web package is now available, providing a Web implementation for sqflite using SQLite3 compiled to WebAssembly. This release introduces a new setup entry point (setup.dart) and exposes multiple database factory options, including support for running with a shared worker, without a worker, or with basic worker capabilities. It also includes utilities for loading the SQLite3 WASM binary and managing the shared worker lifecycle, along with debug helpers for web worker inspection.

_packages\_web/sqflite\_common\_ffi\_web/lib, packages\_web/sqflite\_common\_ffi\_web\test · high confidence

Introduce FFI-based SQLite implementation with isolate support

The sqflite\_common\_ffi library is now available, providing an FFI-based implementation of sqflite. This release exports the core FFI initialization and database factory functions (databaseFactoryFfi, databaseFactoryFfiNoIsolate, createDatabaseFactoryFfi) and introduces a custom isolate port server (SqfliteFfiIsolatePortServer) to allow FFI imports in web apps and support for running FFI without spawning an isolate.

_sqflite\_common\ffi/lib · high confidence

Introduce concurrent FFI async database support for Dart and Web

This change adds a new asynchronous database implementation layer that leverages the \sqlite\_async\ library to enable concurrent read and write transactions, addressing previous blocking behavior. The update introduces platform-specific factories and database classes for both IO (native) and Web environments, allowing applications to open databases with concurrent access enabled by default. For users, this means improved performance and responsiveness when performing database operations, particularly in scenarios requiring parallel reads or writes, while maintaining compatibility with existing sqflite APIs.

_packages/sqflite\_common\_ffi\async/lib/src · high confidence

Introduce sqflite\_common\_ffi\_async library for async SQLite integration

A new library package, sqflite\_common\_ffi\_async, has been added to provide SQLite functionality built on top of sqlite\_async. This package exposes the FFI-based async database factories (databaseFactoryFfiAsync and databaseFactoryFfiAsyncTest) by re-exporting the core sqflite\_common API alongside the specific platform implementation, allowing users to utilize async SQLite operations via FFI.

_packages/sqflite\_common\_ffi\async/lib · high confidence

Introduce sqflite\_ffi plugin for cross-isolate SQLite access

A new Flutter plugin, sqflite\_ffi, is added to provide an FFI-based SQLite implementation that shares a single database isolate across multiple Flutter isolates (such as main, compute, and Isolate.run) using IsolateNameServer. This allows different parts of an application to access the same database instances seamlessly, unlike the previous sqflite\_common\_ffi which spawned separate isolates. The plugin automatically registers itself at startup to set sqfliteDatabaseFactoryFfi as the default factory, and includes platform-specific handling for web (no-op) and IO platforms (Windows, Mac, Linux).

_packages\_flutter/sqflite\ffi · high confidence

Introduction of sqflite\_darwin plugin entry point

A new entry point file (sqflite\_darwin.dart) has been added to the sqflite\_darwin package. This file defines the SqfliteDarwin class, which extends SqflitePlatform and provides a registerWith method to initialize the plugin using the method channel database factory. This change establishes the core registration logic for the Darwin-specific implementation of the sqflite plugin.

_sqflite\darwin/lib · high confidence

Introduction of sqflite\_platform\_interface for platform abstraction

A new platform interface layer has been added to the sqflite package, introducing the \sqflite\_platform\_interface\ library. This change establishes a standardized abstraction for database operations, allowing platform-specific implementations (such as Android and iOS/macOS) to register their own database factories via method channels. For users, this provides a more robust foundation for cross-platform database access, ensuring that platform-specific plugins can seamlessly integrate with the common sqflite API while maintaining consistent error handling and method invocation across different operating systems. Also in this area: 1 commit (0 fixes) modifying packages\_flutter/sqflite\_example\_common, sqflite\_platform\_interface; Detect SQLite-rolled-back transactions in platform exceptions.

_sqflite\_platform\_interface/lib, sqflite\_platform\interface/lib/src · low confidence · unverified

New Android example app demonstrating SQLite WAL mode

Added a new Android example application (\sqflite\_example\_android\_wal\) that demonstrates using SQLite's Write-Ahead Logging (WAL) mode on Android. The app configures WAL via the \com.tekartik.sqflite.wal\_enabled\ meta-data in \AndroidManifest.xml\ and includes specific tests to verify that update and delete operations correctly return row counts in this mode, addressing previous issues where these operations returned 0. The example also updates the Android Gradle wrapper to version 8.14. Also in this area: Updated test imports in sqflite Android WAL example.

_packages\_flutter/sqflite\_example\_android\_wal, packages\_flutter/sqflite\_example\_android\wal/test · medium confidence

New CI tooling for cross-platform build and test automation

The sqflite\_support/tool directory now includes a suite of Dart scripts and shell utilities to automate continuous integration tasks across multiple platforms. These tools enable the automated creation, dependency configuration, and building of Android, iOS, macOS, and Web applications, as well as the execution of unit and integration tests. Specific scripts handle platform-specific setup, such as installing Linux system dependencies (sqlite3, ninja-build, libgtk-3-dev) and managing Android/IOS project generation and APK/IPA builds, ensuring consistent testing environments for the sqflite packages.

_sqflite\support/tool · high confidence

New CLI setup tool for configuring SQLite WASM binaries

A new command-line entry point (setup.dart) has been added to the sqflite\_common\_ffi\_web package, allowing users to build the shared worker and fetch the sqlite3.wasm binary. This tool provides options to specify a custom URL for the sqlite3.wasm file, skip fetching it entirely (for manual installation), force rebuilds, and control output verbosity and directory, giving developers more flexibility in how the WebAssembly dependencies are integrated into their web projects.

_packages\_web/sqflite\_common\_ffi\web/bin · high confidence

New example project scaffolding for sqflite\_darwin

The example directory now includes a complete project structure for iOS and macOS, featuring a main entry point that enables compatibility mode, a \.gitignore\ file tailored for Flutter/Dart development, and an \analysis\_options.yaml\ with strict linting rules. It also provides utility scripts to generate the platform-specific project files and run podspec lints, along with a basic widget test to ensure the example builds correctly.

_sqflite\darwin/example · high confidence

New experimental logger API for database events

An experimental logging system has been introduced in sqflite\_common, providing structured events for database lifecycle operations (open, close, delete) and SQL commands. This new API exposes specific identifiers such as databaseId and transactionId within logger events, allowing for more granular debugging and performance tracking of SQLite operations compared to previous generic logging methods.

_sqflite\common/lib/src/logger · high confidence

New mixin-based database factory for non-Flutter environments

The sqflite\_common library now exposes a new set of files under lib/src/mixin to support running database operations without Flutter plugins. This includes a buildDatabaseFactory function that creates a DatabaseFactory implementation by invoking a provided callback instead of using Flutter services, enabling unit testing and non-Flutter usage. The change also introduces helper exports for constants, development utilities, platform details, and a consolidated import\_mixin file that aggregates necessary internal classes for implementation packages like sqflite and sqflite\_common\_ffi.

_sqflite\common/lib/src/mixin · high confidence

New setup tooling for managing SQLite3 WebAssembly binaries and shared workers

The package introduces a new setup infrastructure in \lib/src/setup\ to handle the download, caching, and building of the SQLite3 WebAssembly binary and the associated shared worker. This includes a \SqfliteWebSetupOptions\ configuration class, a \SetupContext\ for managing build paths and metadata, and a \copy\_binaries\ entry point. Users can now explicitly control the setup process, including overriding the SQLite3 WASM URI, disabling automatic fetching, and managing the shared worker build output, replacing previous implicit or manual setup steps.

_packages\_web/sqflite\_common\_ffi\web/lib/src/setup · high confidence

New sqflite\_ffi test application with FFI-backed database path configuration

A new test application has been added to demonstrate the sqflite\_ffi plugin, featuring a dedicated database path utility that stores data in the application support directory across all platforms (Android, iOS, macOS, Linux, and Windows). The app includes a main entry point that initializes the FFI database factory and registers a test page, as well as a separate test runner that executes the common sqflite test suite using the FFI backend. This setup allows users to verify sqflite functionality when using the Foreign Function Interface (FFI) implementation instead of the native plugin.

_packages\_flutter/sqflite\_ffi\_test\app/lib · high confidence

New sqflite\_test\_app with multi-platform entry points

A new test application (sqflite\_test\_app) has been added to provide dedicated entry points for running the example suite across different platforms and configurations. The app includes specific main files for standard Flutter (main\_sqflite.dart), FFI-based execution on desktop/web (main\_ffi.dart), FFI with async support (main\_ffi\_async.dart), and various testing modes such as verbose logging (main\_dev.dart), single-route debugging (main\_dev\_single.dart), and test runner contexts (main\_sqflite\_test\_runner.dart). This structure allows users to easily switch between native SQLite, FFI implementations, and web workers for testing and development purposes.

_sqflite\_test\app/lib · high confidence

New tooling scripts for building, running, and testing the sqflite test app

The sqflite\_test\_app/tool directory now includes a comprehensive suite of Dart scripts to streamline development and testing workflows. These tools automate building and serving the web application (including JavaScript and WebAssembly targets) with necessary CORS headers, create and run the Flutter project on various platforms (Windows, Linux, macOS, iOS, Android), and execute integration and driver tests. Specific scripts handle FFI setup for web workers, release builds for desktop platforms, and simplified entry points for Chrome debugging, significantly reducing the manual effort required to set up and run the test application across different environments.

_sqflite\_test\app/tool · high confidence

New tooling scripts for web test setup and execution

Added a suite of Dart scripts in the \tool\ directory to streamline the setup and running of web-based tests for \sqflite\_common\_ffi\_web\. These scripts automate the installation of required binaries (SQLite WASM, service workers) via \setupSqfliteWebBinaries\ or the \sqflite\_common\_ffi\_web:setup\ CLI, and provide dedicated entry points for running tests in Chrome, including specific support for dart2wasm compilation and basic web worker scenarios.

_packages\_web/sqflite\_common\_ffi\_web\test/tool · high confidence

New utility functions and database configuration constants

The \sqflite\_common\ library now exposes helper functions \firstIntValue\ and \firstStringValue\ to easily extract the first value from query results, along with a \hex\ utility for encoding blobs for SQL queries. Additionally, new constants \sqflitePragmaPrefix\ and \sqflitePragmaDbDefensiveOff\ are provided to facilitate custom pragma usage, and the \setLockWarningInfo\ function allows users to configure database lock warning behavior.

_sqflite\common/lib/utils · high confidence

New web-focused test application for sqflite

A new web-only test application has been added to the sqflite ecosystem, providing a dedicated environment for testing \sqflite\_common\_ffi\_web\ and SQLite on the web platform. This app includes multiple entry points to exercise different execution modes, such as standard FFI, FFI without web workers, and basic web workers, alongside tools for building and serving the app via Chrome (both JS and WASM targets). It also features a custom web platform handler that utilizes \IndexedDbFileSystem\ for database storage, enabling comprehensive integration and driver testing for web-based SQLite operations.

_packages\_web/sqflite\_test\_app\web · high confidence

Web platform support for SQLite database operations

The database layer now supports running on web platforms by introducing a new \database\_web.dart\ implementation that uses \IndexedDbFileSystem\ to store and retrieve SQLite database files. This change adds conditional exports in \database.dart\ to select the appropriate platform handler (\database\_io.dart\ for native, \database\_web.dart\ for web), enabling the application to perform database operations like reading, writing, and checking file existence in a browser environment.

_sqflite\_test\app/lib/database · high confidence

Architecture

Extraction of sqflite\_common as a standalone, non-Flutter database layer

The core SQLite API and database factory logic have been extracted from the Flutter-specific sqflite package into a new, standalone library called sqflite\_common. This change introduces a new package structure with dedicated entry points: sqflite.dart for high-level database operations (openDatabase, getDatabasesPath, deleteDatabase), sqlite\_api.dart for the core abstract interfaces (DatabaseFactory, DatabaseExecutor), and sql.dart for SQL helpers. This separation allows developers to use the database layer in non-Flutter environments (such as command-line tools or FFI implementations) without depending on Flutter SDK packages, while the original sqflite package now acts as a Flutter-specific wrapper around this common core.

_sqflite\common/lib · high confidence

Behavioural changes

1 commit (0 fixes) modifying packages\_flutter/sqflite\_example\_android\_wal/android

A change to existing behaviour in packages\_flutter/sqflite\_example\_android\_wal/android — 1 commit, 8 files: “add android example that uses WAL”.

_packages\_flutter/sqflite\_example\_android\wal/android · medium confidence · unverified

1 commit (0 fixes) modifying packages\_flutter/sqflite\_example\_common, sqflite\_platform\_interface

A change to existing behaviour in packages\_flutter/sqflite\_example\_common, sqflite\_platform\_interface — 1 commit, 9 files: “sqflite\_common\_ffi 2.4.6, sqflite\_platform\_interface 2.4.4: ffi init, batch, cursor, bytes path”.

_sqflite\_platform\interface/test · low confidence · unverified

2 commits (0 fixes) modifying packages\_flutter/sqflite\_plugin\_test\_app

A change to existing behaviour in packages\_flutter/sqflite\_plugin\_test\_app — 2 commits, 2 files: “test apps: run sqflite\_common\_test on a device, add sqflite\_plugin\_test\_app”; “sqflite\_plugin\_test\_app: flutter run starts the example app on the plugin”.

_packages\_flutter/sqflite\_plugin\_test\app · medium confidence · unverified

3 commits (1 fix) modifying packages\_flutter

A change to existing behaviour in packages\_flutter — 3 commits (1 fix), 7 files: “sqflite\_example\_common: exception page test cleanup best effort (windows)”; “sqflite\_common\_ffi 2.4.6, sqflite\_platform\_interface 2.4.4: ffi init, batch, cursor, bytes path”; “sqflite\_android 2.4.6, sqflite\_darwin 2.4.6, sqflite\_ffi 0.1.1+2: fixes and docs”. Also in this area: Initial commit of sqflite\_example\_common package.

_packages\_flutter/sqflite\_example\common/test · medium confidence · unverified

Android example project regenerated for Flutter 3.32.0

The Android example project has been recreated using the default Flutter 3.32.0 template. This update brings the example up to date with current Flutter standards, including a Gradle wrapper upgrade to version 9.5.0, a Kotlin-based MainActivity, and standard Android manifest configurations. It also adds instrumented tests to verify locale handling and basic SQLite operations.

_sqflite\android/example/android · high confidence

Android implementation refactored with new operation model and SDK 36 support

The Android native code has been restructured to use a new operation-based architecture (BaseOperation, MethodCallOperation) and a dedicated worker pool for database tasks, which improves concurrency handling and fixes issues where different database instances were used for execution and results. The plugin now targets Android SDK 36, utilizing modern APIs like Thread.threadId() and Locale.of() where available, and includes updated build configurations and a new .gitignore. Also in this area: 1 commit (1 fix) fixing (repo-wide); Handle SQLite-rolled-back transactions on Android; Fixes database hangs caused by failed commits and unawaited close operations.

_sqflite\android/android · medium confidence · unverified

Darwin backend switches to an internal SqfliteDarwinDB fork

The sqflite Darwin implementation now uses a locally copied and renamed fork of the FMDB library (namespaced as \SqfliteDarwinDB\) instead of the external CocoaPods dependency. This change, visible in the new Objective-C source files (e.g., \SqfliteDarwinDatabase.m\, \SqfliteDarwinDatabaseQueue.m\) and the \README.md\, was made to bypass the outdated upstream FMDB version. Users must run \flutter clean\ and delete \Podfile.lock\ to ensure the build system picks up the new internal implementation.

_sqflite\darwin/darwin · high confidence

Enable compatibility mode in the example app

The example application now runs in compatibility mode by setting \supportsCompatMode\ to true in \main.dart\. This change, along with the new \compat\_test\_run.dart\ test file, allows users to verify the behavior of deprecated APIs (such as \Sqflite.setDebugModeOn\) and ensures the plugin functions correctly when older API patterns are used.

sqflite/example · high confidence

Example app migrated to sqflite\_common with new IO and FFI test pages

The example application has been restructured into a shared package (sqflite\_example\_common) and migrated from the sqflite package to sqflite\_common, updating all internal imports and test pages to use the new library. This change introduces a new IO test page that verifies database file cleanup in both standard and WAL modes, and adds an FFI entry point (main\_ffi.dart) to demonstrate SQLite operations via FFI. Additionally, the manual test page now includes specific menu items for opening databases in WAL mode and retrieving database information, while the rest of the test suite has been updated to use the new common imports and formatting.

_packages\_flutter/sqflite\_example\common/lib · high confidence

Expose internal FFI implementation details via handler mixin

The \handler\_mixin.dart\ file has been added to export specific internal components of the FFI-based SQLite implementation, including \ffiMethodCallhandleInIsolate\, \FfiMethodCall\, \SqfliteFfiException\, and exception wrapping utilities (\ffiWrapSqliteException\, \ffiWrapAnyException\). This change makes these internal implementation details available for use by other parts of the library or external consumers, effectively broadening the accessible API surface for the FFI backend.

_sqflite\_common\ffi/lib/src/mixin · high confidence

Introduce FFI database factory with isolate and no-isolate modes

The \sqflite\_common\_ffi\ library now exposes a dedicated FFI database factory (\databaseFactoryFfi\) that routes database operations through a background isolate by default, with an alternative \databaseFactoryFfiNoIsolate\ for running directly on the main thread. This architecture uses conditional imports to separate IO and web implementations, ensuring the isolate-based factory is unavailable on the web while providing a stub for web-specific handling. The change also includes a \DatabaseTracker\ to mitigate SQLite connection leaks and deadlocks during Flutter hot restarts by tracking native handles in an in-memory database, and introduces \SqfliteFfiException\ to expose extended SQLite result codes and transaction state in error messages.

_sqflite\_common\ffi/lib/src · high confidence

Platform abstraction refactored to support web environments

The platform detection logic has been restructured to introduce a unified \Platform\ abstraction that distinguishes between IO and web execution contexts. This change replaces previous platform-specific implementations with a conditional export strategy (\platform\_io.dart\ vs \platform\_web.dart\), enabling the library to correctly identify web environments via the \isWeb\ flag while maintaining existing OS-specific checks (Windows, iOS, Android, Linux, macOS) for native platforms. This structural shift lays the groundwork for web support by decoupling platform identity from direct IO dependencies in the common interface.

_sqflite\common/lib/src/platform · high confidence

Update example app to Dart 3.7 formatting and add warning state support

The example application code has been updated to comply with Dart 3.7 formatting standards, involving reformatting of function signatures and argument lists in test utilities. Additionally, the item display widget now supports a 'warning' state, displaying an orange warning icon for items with this status, and list tiles in both item and main item widgets have been set to dense mode for a more compact appearance.

_packages\_flutter/sqflite\_example\common/lib/src · high confidence

Web worker implementation with shared worker support and fallback

The web library now executes SQLite operations in a background worker to improve responsiveness. It defaults to using a SharedWorker for better cross-tab state sharing, but automatically falls back to a standard Worker if SharedWorkers are unavailable (e.g., on Android mobile web). The implementation includes new configuration options (\sharedWorkerUri\, \forceAsBasicWorker\) to control worker behavior, robust JavaScript-to-Dart value conversion utilities, and improved error handling for worker initialization failures.

_packages\_web/sqflite\_common\_ffi\web/lib/src/web · high confidence

Test coverage

6 commits adding/updating tests in packages/sqflite\_common\_ffi\_async\_test/test; Add Flutter Driver integration tests for sqflite\_test\_app; Add web test demo for shared worker configuration; Added Android native test runner script; Added FFI and plugin test runners with platform-specific IO tests; Added FFI integration and platform build tests for sqflite\_test\_app; Added FFI isolate test page for cross-isolate database sharing; Added UI test entry points for single and no-worker modes; Added comprehensive test suite for sqflite\_common; Added iOS/macOS test app scaffolding for Swift Package Manager validation; Added integration tests for Flutter and Dart project workflows; Added integration tests for sqflite\_ffi\_simple\_bin execution modes; Added integration tests for sqflite\_test\_app; Added placeholder unit and integration test files for the Android example app; Added plugin test page for Darwin folder creation and isolate transaction handling; Added test coverage for web platform detection, database options, and data encoding; Added test runner for sqflite\_common\_ffi\_async; Added test suite for sqflite\_common\_ffi; Added tests for sqflite\_common\_ffi\_async database factory; Added tests for sqflite\_common\_ffi\_web setup and web worker configurations; Added tests for sqflite\_ffi isolate management and database operations; Added tests for the experimental Sqflite logger and FFI no-isolate factory; New common test suite for sqflite\_common.

Dependencies

Update to Dart 3.12 SDK and modernize build configurations

The sqflite packages and their example applications have been updated to require the Dart SDK ^3.12.0. This change is accompanied by a migration of Android build files to the Kotlin DSL (build.gradle.kts) and an upgrade of the Android Gradle Plugin to version 9.1.0, along with setting Java compatibility to version 17. Additionally, the \sqflite\_common\_ffi\_async\ package has been introduced to provide an asynchronous FFI implementation based on \sqlite\_async\, and the \sqflite\_ffi\ Flutter plugin has been added to facilitate sharing the SQLite isolate across isolates using \IsolateNameServer\.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 58 → 64 (+5.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 80 → 80 (+0.4)
  • Architecture 99 → 99 (-0.0)
  • Maturity 45 → 57 (+12.1)
  • Readiness 50 → 54 (+4.0)
  • Security 93 → 93 (+0.0)
  • Performance 100 → 100 (+0.0)

Resolved (2)

  • Change coupling: isolate.dart ↔ sqflite_ffi_io.dart (sqflite_common_ffi/lib/src/isolate.dart)
  • No ADRs found

New (13)

  • Edited copy of a member (18 corresponding lines) (packages/sqflite_common_ffi_async/lib/src/sqflite_ffi_async_database.dart)
  • Edited copy of a member (21 corresponding lines) (packages/sqflite_common_ffi_async/lib/src/sqflite_ffi_async_factory_io.dart)
  • Edited copy of a member (23 corresponding lines) (sqflite_android/android/src/main/java/com/tekartik/sqflite/Database.java)
  • Edited copy of a member (27 corresponding lines) (sqflite_common/lib/src/batch.dart)
  • Edited copy of a member (3 corresponding lines) (packages_web/sqflite_common_ffi_web/lib/src/database_factory_web.dart)
  • Edited copy of a member (33 corresponding lines) (sqflite_common/lib/src/logger/sqflite_logger.dart)
  • Edited copy of a member (5 corresponding lines) (sqflite_android/android/src/main/java/com/tekartik/sqflite/DatabaseWorker.java)
  • Edited copy of a member (7 corresponding lines) (packages/sqflite_common_ffi_async/lib/src/sqflite_ffi_async_database.dart)
  • Hotspot: packages_flutter/sqflite_example_common/lib/exception_test_page.dart (packages_flutter/sqflite_example_common/lib/exception_test_page.dart)
  • Hotspot: sqflite_android/android/src/main/java/com/tekartik/sqflite/SqflitePlugin.java (sqflite_android/android/src/main/java/com/tekartik/sqflite/SqflitePlugin.java)
  • No ADRs found (sqflite_test_app/lib/main.dart)
  • Repeated repair: packages/sqflite_common_ffi_async/lib/src/sqflite_ffi_async_database.dart (packages/sqflite_common_ffi_async/lib/src/sqflite_ffi_async_database.dart)
  • SqfliteDatabaseMixin.endTransaction (cognitive 32) (sqflite_common/lib/src/database_mixin.dart)

Changes since last survey

  • 22 commits — 15 feature/other, 7 fixes

By area

  • sqflite/doc — 3 commits
  • packages_flutter/sqflite_plugin_test_app — 2 commits
  • packages_web/sqflite_common_ffi_web — 2 commits
  • sqflite_common/CHANGELOG.md — 2 commits
  • (repo) — 1 commit
  • packages_flutter/sqflite_example_android_wal — 1 commit
  • packages_flutter/sqflite_example_common — 1 commit
  • packages_flutter/sqflite_ffi — 1 commit
  • packages_flutter/sqflite_ffi_test_app — 1 commit
  • sqflite/CHANGELOG.md — 1 commit
  • sqflite_common/lib — 1 commit
  • sqflite_common_ffi/CHANGELOG.md — 1 commit
  • sqflite_common_ffi/README.md — 1 commit
  • sqflite_common_ffi/lib — 1 commit
  • sqflite_darwin/darwin — 1 commit
  • sqflite_support/pubspec.yaml — 1 commit
  • sqflite_test_app/lib — 1 commit

Notable commits

  • fix: Merge pull request #1219 from PolynomialDivision/fix/db-locks
  • fix: sqflite 2.4.6, sqflite_common 2.5.17, sqflite_common_ffi_web 1.2.2: fixes and docs
  • fix: sqflite 2.4.6: require the fixed platform packages; link the dart2wasm issue
  • fix: sqflite docs: getting started per platform, pitfalls, examples, doc fixes
  • fix: sqflite_android 2.4.6, sqflite_darwin 2.4.6, sqflite_ffi 0.1.1+2: fixes and docs
  • fix: sqflite_common_ffi_web 1.2.1, sqflite_common_ffi_async 1.0.5: fixes and docs
  • fix: sqflite_darwin: 2.4.5, fix transaction hangs and rolled back transactions, keep call order
  • change: bump dev_build dependency to version 1.2.0
  • change: docs(ffi): explain public exception handling (#1220)
  • change: example READMEs: add the missing final newline
  • change: sqflite_common: 2.5.16 single instance cache, batch in the open callbacks
  • change: sqflite_common: changelog, thank PolynomialDivision for #1219
  • change: sqflite_common: roll back a transaction whose COMMIT failed
  • change: sqflite_common_ffi 2.4.6, sqflite_platform_interface 2.4.4: ffi init, batch, cursor, bytes path
  • change: sqflite_common_ffi: 2.4.7
  • change: sqflite_common_ffi: error message as DatabaseException(ffi ...); handling errors doc
  • change: sqflite_common_ffi_web 1.2.1: requires sqflite_common_ffi 2.4.6
  • change: sqflite_example_common: exception page test cleanup best effort (windows)
  • change: sqflite_plugin_test_app: flutter run starts the example app on the plugin
  • change: sqflite_test_app: first-run iOS test, Windows release tool; docs
  • …and 2 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

tekartik/sqflite was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 0d30d7d335194597bd2ece058c0d7062ea719204 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.57+preprod-8ebfb01cf4c0.