vaudb_flutter 0.1.1 copy "vaudb_flutter: ^0.1.1" to clipboard
vaudb_flutter: ^0.1.1 copied to clipboard

Flutter FFI plugin for the VauDB embedded Rust database engine.

vaudb_flutter | FarOFF V STUDIO #

Flutter FFI package for the VauDB embedded Rust database engine.

Features #

  • Embedded offline database access via dart:ffi
  • Key/value CRUD
  • Transactions (begin, commit, rollback)
  • Table/row CRUD
  • Basic filtering (selectWhere)
  • Foreign keys with restrict/cascade actions

Install #

flutter pub add vaudb_flutter

Windows Native Library Setup #

Build vaudb_engine.dll from your Rust engine project, then place it next to your app executable:

  • Flutter Windows app location: windows/runner/vaudb_engine.dll

If your Rust project has a build script (for example cargo bcopy), run that first.

Example App DLL Integration #

The example Windows CMake checks these locations in order:

  1. VAUDB_ENGINE_DLL environment variable (full DLL path)
  2. example/windows/runner/vaudb_engine.dll

PowerShell example:

$env:VAUDB_ENGINE_DLL='C:\path\to\vaudb_engine.dll'
flutter run -d windows

Usage #

import 'package:vaudb_flutter/vaudb_flutter.dart';

final db = VauDB();
db.open('app_data.vdb');

// Create table without foreign keys.
db.createTable('users', ['id', 'name']);

// Create table with foreign keys using the same createTable method.
db.createTable(
  'orders',
  ['id', 'user_id'],
  foreignKeys: const [
    ForeignKeyDefinition(
      column: 'user_id',
      refTable: 'users',
      refColumn: 'id',
      onDelete: 'cascade',
      onUpdate: 'cascade',
    ),
  ],
);

db.insertRow('users', ['1', 'Varish']);
db.insertRow('orders', ['1', '1']);

final rows = db.selectAll('orders');
print(rows.rows.length);

db.close();

Notes #

  • Foreign key checks are enabled by default in the engine.
  • Current dynamic loading is configured for Windows DLL (vaudb_engine.dll).
0
likes
140
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter FFI plugin for the VauDB embedded Rust database engine.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

ffi, flutter

More

Packages that depend on vaudb_flutter

Packages that implement vaudb_flutter