Skip to content
forked from isar/isar

Extremely fast, easy to use, and fully async NoSQL database for Flutter

License

Notifications You must be signed in to change notification settings

prasant10050/isar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Isar Database

QuickstartDocumentationSample AppsSupport & IdeasPub.dev

Isar [ee-zahr]:

  1. River in Bavaria, Germany.
  2. Crazy fast NoSQL database that is a joy to use.

Features

  • 💙 Made for Flutter. Easy to use, no config, no boilerplate
  • 🚀 Highly scalable The sky is the limit (pun intended)
  • 🍭 Feature rich. Composite & multi-entry indexes, query modifiers, JSON support etc.
  • Asynchronous. Parallel query operations & multi-isolate support by default
  • 🦄 Open source. Everything is open source and free forever!

Isar database can do much more (and we are just getting started)

  • 🕵️ Full-text search. Make searching fast and fun
  • 📱 Multiplatform. iOS, Android, Desktop and FULL WEB SUPPORT!
  • 🧪 ACID semantics. Rely on database consistency
  • 💃 Static typing. Compile-time checked and autocompleted queries
  • Beautiful documentation. Readable, easy to understand and ever-improving

Join the Telegram group for discussion and sneak peeks of new versions of the DB.

If you want to say thank you, star us on GitHub and like us on pub.dev 🙌💙

Quickstart

Holy smokes you're here! Let's get started on using the coolest Flutter database out there...

1. Add to pubspec.yaml

isar_version: &isar_version 3.0.4 # define the version to be used

dependencies:
  isar: *isar_version
  isar_flutter_libs: *isar_version # contains Isar Core

dev_dependencies:
  isar_generator: *isar_version
  build_runner: any

2. Annotate a Collection

part 'email.g.dart';

@collection
class Email {
  Id id = Isar.autoIncrement; // you can also use id = null to auto increment

  @Index(type: IndexType.value)
  String? title;

  List<Recipient>? recipients;

  @enumerated
  Status status = Status.pending;
}

@embedded
class Recipient {
  String? name;

  String? address;
}

enum Status {
  draft,
  pending,
  sent,
}

3. Open a database instance

final isar = await Isar.open([EmailSchema]);

4. Query the database

final emails = await isar.emails.filter()
  .titleContains('awesome', caseSensitive: false)
  .sortByStatusDesc()
  .limit(10)
  .findAll();

Isar Database Inspector