idris_db 1.0.4 copy "idris_db: ^1.0.4" to clipboard
idris_db: ^1.0.4 copied to clipboard

High-performance NoSQL database for Flutter with exclusive developer tools - Enhanced error messages, smart logging, query analyzer, and Arabic support. Built by IDRISIUM Corp.

example/main.dart

import 'package:idris_db/idris_db.dart';

// 1. Define your model
@collection
class User {
  Id? id;

  @Index()
  late String name;

  late int age;
}

void main() async {
  // 2. Open the database
  final idrisDb = await IdrisDb.open([UserSchema]);

  // 3. Create a new user
  final newUser = User()
    ..name = 'Idris Ghamid'
    ..age = 25;

  // 4. Write data
  await idrisDb.writeTxn(() async {
    await idrisDb.users.put(newUser);
  });

  // 5. Query data
  final users = await idrisDb.users.where().nameEqualTo('Idris Ghamid').findAll();
  
  print('Found ${users.length} users');
  
  // 6. Use the NEW Query Analyzer (Exclusive to idris DB)
  final analyzer = QueryAnalyzer(idrisDb);
  final analysis = await analyzer.analyze(() {
    return idrisDb.users.filter().ageGreaterThan(18).findAll();
  });
  
  print(analysis);
}
1
likes
115
points
173
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

High-performance NoSQL database for Flutter with exclusive developer tools - Enhanced error messages, smart logging, query analyzer, and Arabic support. Built by IDRISIUM Corp.

Repository (GitHub)
View/report issues

Topics

#database #nosql #flutter #performance #offline-first

Funding

Consider supporting this project:

github.com

License

Apache-2.0 (license)

Dependencies

analyzer, build, ffi, json_annotation, logger, meta, source_gen, web

More

Packages that depend on idris_db