All Projects → isar → Isar

isar / Isar

Licence: apache-2.0
Super Fast Cross Platform Database for Flutter & Web Apps

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Isar

Keyvast
KeyVast - A key value store
Stars: ✭ 33 (-86.02%)
Mutual labels:  database, cross-platform
Polodb
PoloDB is an embedded JSON-based database.
Stars: ✭ 282 (+19.49%)
Mutual labels:  database, cross-platform
Mogwaierdesignerng
Java 2D & 3D visual entity relationship design & modeling (ERD,SQL) for Oracle,MSSQL,Postgres and MySQL
Stars: ✭ 90 (-61.86%)
Mutual labels:  database, cross-platform
Sqlectron Gui
A simple and lightweight SQL client desktop with cross database and platform support.
Stars: ✭ 3,852 (+1532.2%)
Mutual labels:  database, cross-platform
Sqlitebrowser
Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at:
Stars: ✭ 15,801 (+6595.34%)
Mutual labels:  database, cross-platform
Aiida Core
The official repository for the AiiDA code
Stars: ✭ 238 (+0.85%)
Mutual labels:  database
Gorm Bulk Insert
implement BulkInsert using gorm, just pass a Slice of Struct. Simple and compatible.
Stars: ✭ 241 (+2.12%)
Mutual labels:  database
Gdx Rpg
java & libgdx制作的RPG游戏! an RPG by java and LibGDX
Stars: ✭ 239 (+1.27%)
Mutual labels:  cross-platform
Hprose Html5
Hprose is a cross-language RPC. This project is Hprose 2.0 Client for HTML5
Stars: ✭ 237 (+0.42%)
Mutual labels:  cross-platform
Cgofuse
Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD
Stars: ✭ 245 (+3.81%)
Mutual labels:  cross-platform
Sqlfiddle3
New version based on vert.x and docker
Stars: ✭ 242 (+2.54%)
Mutual labels:  database
Neo4j Java Driver
Neo4j Bolt driver for Java
Stars: ✭ 241 (+2.12%)
Mutual labels:  database
Grakn
TypeDB: a strongly-typed database
Stars: ✭ 2,947 (+1148.73%)
Mutual labels:  database
Rsock
The best companion of kcptun
Stars: ✭ 242 (+2.54%)
Mutual labels:  cross-platform
Classicuo
ClassicUO - an open source implementation of the Ultima Online Classic Client.
Stars: ✭ 239 (+1.27%)
Mutual labels:  cross-platform
Pillar Valley
👾A cross-platform video game built with Expo, three.js, and Firebase! 🎮🕹
Stars: ✭ 242 (+2.54%)
Mutual labels:  cross-platform
Granite
ORM Model with Adapters for mysql, pg, sqlite in the Crystal Language.
Stars: ✭ 238 (+0.85%)
Mutual labels:  database
Sqlhelper
SQL Tools ( Dialect, Pagination, DDL dump, UrlParser, SqlStatementParser, WallFilter, BatchExecutor for Test) based Java. it is easy to integration into any ORM frameworks
Stars: ✭ 242 (+2.54%)
Mutual labels:  database
Asciimatics
A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations
Stars: ✭ 2,869 (+1115.68%)
Mutual labels:  cross-platform
Mitype
Typing speed test in terminal
Stars: ✭ 241 (+2.12%)
Mutual labels:  cross-platform

Isar Database

🚧 Very unstable and not ready for serious usage 🚧

QuickstartDocumentationExamplesSupport & IdeasPub.dev

Isar [ee-zahr]:

  1. River in Bavaria, Germany.
  2. Database that will make your life easier.

Features

  • ⚡️ Launch your app instantly no matter how much data you have
  • 📈 Highly scalable from hundreds to tens of thousands of records
  • 😎 Lazy loaded. Only load data when you need it
  • 🔎 Full-text search. Make searching fast and fun
  • 📱 Multiplatform. iOS, Android, Desktop and the web (soon™)
  • 💙 Made for Flutter. Easily use it in your Flutter app
  • 🧪 ACID semantics. Rely on consistency
  • Asynchronous. Parallel query operations & multi-isolate support
  • ⚠️ Static typing with compile-time checked and autocompleted queries

Add to pubspec.yaml

dependencies:
  isar: any
  isar_flutter_libs: any # contains the binaries

dev_dependencies:
  isar_generator: any
  build_runner: any

Schema definition

@Collection()
class Post {
  int? id; // auto increment id

  @Index(indexType: IndexType.words, caseSensitive: false) // Search index
  String title;

  List<String> comments
}

CRUD operations

All basic crud operations are available via the IsarCollection.

final newPost = Post()
  ..id = uuid.v4()
  ..title = 'Amazing new database'
  ..comments = ['First'];

await isar.writeTxn((isar) {
  await isar.posts.put(newPost); // insert
});

final existingPost = await isar.get(newPost.id); // get

await isar.writeTxn((isar) {
  await isar.posts.delete(existingPost.id); // delete
});

Queries

Isar has a powerful query language that allows you to make use of your indexes, filter distinct objects, use complex and() and or() groups and sort the results.

final isar = await openIsar();

final databasePosts = isar.posts
  .where()
  .titleWordBeginsWith('DaTAb') // use case insensitive search index
  .limit(10)
  .findAll()

final postsWithFirstCommentOrTitle = isar.posts
  .where()
  .filter()
  .commentsAnyEqualTo('first', caseSensitive: false)
  .or()
  .titleEqualTo('first')
  .findAll();

Links

You can easily define relationships between objects. In Isar they are called links and backlinks:

@IsarCollection()
class Teacher {
    int id;

    String subject;

    @Backlink(to: 'teacher')
    final students = IsarLinks<Student>();
}

@IsarCollection()
class Student {
    int id;

    String name;

    final teacher = IsarLink<Teacher>();
}

Watchers

With Isar, you can watch Collections, Objects, or Queries. A watcher is notified after a transaction commits successfully and the target actually changes. Watchers can be lazy and not reload the data or they can be non-lazy and fetch new results in the background.

Stream<void> collectionStream = isar.posts.watch(lazy: true);

Stream<List<Post>> queryStream = databasePosts.watch(lazy: false);

queryStream.listen((newResult) {
  // do UI updates
})

License

Copyright 2021 Simon Leier

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].