Skip to main content

sqlite_system 1.0.1 copy "sqlite_system: ^1.0.1" to clipboard
sqlite_system: ^1.0.1 copied to clipboard

async and sync sqlite bindings.

sqlite_system #

Simple SQLite bindings that link to the system SQLite shared library, with no build hooks.

All operations are synchronous except transaction. Don't share one Database across isolates.

Features #

  • Parameter binding: String, int, double, null, Uint8List (BLOB)
  • select / selectOne, execute, executeAll (multiple statements)
  • transaction and transactionSync
  • Typed helpers: selectT, selectOneT

Install #

dart pub add sqlite_system

Requires system SQLite (libsqlite3.so, sqlite3.dll, etc.) to be installed.

Usage #

import 'package:sqlite_system/sqlite_system.dart';

void main() {
  final db = Database.open('app.db'); // or ':memory:'

  db.execute('insert into users (name) values (?)', ['bob']);

  final rows = db.select('select * from users where id = ?', [1]);
  print(rows.first['name']);

  db.close();
}

Why? #

The default SQLite package is great for big apps, but its build hooks added about 2 seconds to every rebuild. This package just binds to the system library instead.

Platforms #

Tested on Linux. Windows/macOS loaders exist but are untested.

0
likes
125
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

async and sync sqlite bindings.

Repository

License

GPL-3.0 (license)

Dependencies

ffi

More

Packages that depend on sqlite_system