diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index bb563603b..000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
-* text eol=lf
-*.png binary
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 7451db6d3..000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: problem
-assignees: ''
-
----
-
-**Steps to Reproduce**
-Please tell me exactly how to reproduce the problem you are running into.
-
-**Code sample**
-```
-Provide a few simple lines of code to show your problem.
-```
-
-**Version**
- - Platform: iOS, Android, Mac, Windows, Linux, Web
- - Flutter version: [e.g. 1.5.4]
- - Hive version: [e.g. 0.5.0]
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index b0d2dbb74..000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for this project
-title: ''
-labels: enhancement
-assignees: ''
-
----
-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
-
-**Version**
- - Platform: iOS, Android, Mac, Windows, Linux, Web
- - Flutter version: [e.g. 1.5.4]
- - Hive version: [e.g. 0.5.0]
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
deleted file mode 100644
index 072de68fd..000000000
--- a/.github/ISSUE_TEMPLATE/question.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: Question
-about: Describe this issue template's purpose here.
-title: ''
-labels: question
-assignees: ''
-
----
-
-**Question**
-Please explain the problem you are running into.
-
-**Code sample**
-```dart
-Provide a few simple lines of code to show your problem.
-```
-
-**Version**
- - Platform: iOS, Android, Mac, Windows, Linux, Web
- - Flutter version: [e.g. 1.5.4]
- - Hive version: [e.g. 0.5.0]
diff --git a/.github/benchmark_read.png b/.github/benchmark_read.png
deleted file mode 100644
index fde145777..000000000
Binary files a/.github/benchmark_read.png and /dev/null differ
diff --git a/.github/benchmark_write.png b/.github/benchmark_write.png
deleted file mode 100644
index e5549050b..000000000
Binary files a/.github/benchmark_write.png and /dev/null differ
diff --git a/.github/no-response.yml b/.github/no-response.yml
deleted file mode 100644
index 07d25d766..000000000
--- a/.github/no-response.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-daysUntilClose: 14
-responseRequiredLabel: more-information-needed
-closeComment: >
- This issue has been automatically closed because there has been no response
- to our request for more information from the original author. With only the
- information that is currently in the issue, we don't have enough information
- to take action. Please reach out if you have or find the answers we need so
- that we can investigate further.
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
deleted file mode 100644
index a32586d85..000000000
--- a/.github/workflows/coverage.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Coverage
-
-on:
- push:
- branches:
- - master
-
-jobs:
- coverage-hive:
- runs-on: ubuntu-latest
-
- container:
- image: google/dart:latest
-
- steps:
- - uses: actions/checkout@v1
- - name: Collect coverage
- run: |
- pub get
- pub global activate test_coverage
- pub global run test_coverage --exclude "**/js/**"
- working-directory: hive
- - uses: codecov/codecov-action@v1.0.0
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
- file: hive/coverage/lcov.info
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 04293a172..131fbbb41 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -3,74 +3,54 @@ name: Dart CI
on: [push, pull_request]
jobs:
- test-hive:
+ format:
+ name: Check formatting
runs-on: ubuntu-latest
- strategy:
- matrix:
- test-platform: [vm, chrome]
- dart-channel: ["2.16.0", "2.18.2"]
steps:
- - uses: actions/checkout@v1
- - uses: dart-lang/setup-dart@v1
- with:
- sdk: ${{ matrix.dart-channel }}
+ - uses: actions/checkout@v3
+ - name: Setup Dart
+ uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- working-directory: hive
- - name: Run tests
- run: dart pub run test -p ${{ matrix.test-platform }}
- working-directory: hive
+ - name: Check formatting
+ run: dart format -o none . --set-exit-if-changed
- test-hive-flutter:
+ lint:
+ name: Check lints
runs-on: ubuntu-latest
- strategy:
- matrix:
- flutter-channel: [dev, beta, stable]
steps:
- - uses: actions/checkout@v1
- - uses: actions/setup-java@v1
- with:
- java-version: "12.x"
- - uses: subosito/flutter-action@v1
- with:
- channel: ${{ matrix.flutter-channel }}
- - name: Override dependency version
- run: |
- echo -e "\ndependency_overrides:\n win32: 2.6.1\n hive:\n path: ../hive" >> pubspec.yaml
- working-directory: hive_flutter
+ - uses: actions/checkout@v3
+ - name: Setup Dart
+ uses: dart-lang/setup-dart@v1
- name: Install dependencies
- run: flutter pub get
- working-directory: hive_flutter
- - name: Run tests
- run: flutter test
- working-directory: hive_flutter
+ run: dart pub get
+ - name: Check Lints
+ run: dart analyze
- test-hive_generator:
+ test:
+ name: Test
runs-on: ubuntu-latest
- strategy:
- matrix:
- dart-channel: ["2.18.2"]
steps:
- - uses: actions/checkout@v1
- - uses: dart-lang/setup-dart@v1
- with:
- sdk: ${{ matrix.dart-channel }}
+ - uses: actions/checkout@v3
+ - name: Setup Dart
+ uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- working-directory: hive_generator/example
- - name: Generate build_runner output
- run: dart run build_runner build --delete-conflicting-outputs
- working-directory: hive_generator/example
+ - name: Run tests
+ run: dart test
- check-score:
+ coverage:
+ name: Code Coverage
runs-on: ubuntu-latest
- strategy:
- matrix:
- package: [hive, hive_generator, hive_flutter]
steps:
- - uses: actions/checkout@v1
- - uses: axel-op/dart-package-analyzer@v3
+ - uses: actions/checkout@v3
+ - name: Setup Flutter
+ uses: subosito/flutter-action@v2
+ - name: Install dependencies
+ run: flutter pub get
+ - name: Code Coverage
+ run: flutter test --coverage --coverage-path lcov.info
+ - name: Upload Coverage
+ uses: codecov/codecov-action@v3
with:
- githubToken: ${{ secrets.GITHUB_TOKEN }}
- relativePath: ${{ matrix.package }}
- minAnnotationLevel: warning
+ files: lcov.info
diff --git a/.gitignore b/.gitignore
index 03552a4f4..62a2881fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -103,3 +103,7 @@ web_worker.dart.js*
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
+
+*.dylib
+*.so
+*.dll
\ No newline at end of file
diff --git a/hive/CHANGELOG.md b/CHANGELOG.md
similarity index 100%
rename from hive/CHANGELOG.md
rename to CHANGELOG.md
diff --git a/LICENSE b/LICENSE
index e93f5543e..f49a4e16e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
Apache License
Version 2.0, January 2004
- https://www.apache.org/licenses/
+ http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@@ -175,16 +175,27 @@
END OF TERMS AND CONDITIONS
- Copyright 2019 Simon Leier
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
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
- https://www.apache.org/licenses/LICENSE-2.0
+ 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.
+ limitations under the License.
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 120000
index aace88ba4..000000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-hive/README.md
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..3761fe832
--- /dev/null
+++ b/README.md
@@ -0,0 +1,401 @@
+
+
+
+Fast, Enjoyable & Secure NoSQL Database
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Hive is a lightweight and blazing-fast key-value database made for Flutter and Dart.
+
+## Features ๐
+
+- ๐ Cross-platform: mobile, desktop, browser
+- ๐ Need for Speed? Hive's got it in spades.
+- ๐ก Simple, powerful, & intuitive API
+- ๐ Tighter than Fort Knox: Encryption is built right in.
+- ๐ง Think multi-tasking: Hive supports multiple isolates.
+- ๐ No need to pack extras: Hive comes with batteries included.
+
+> ๐ A single bee can visit 5,000 flowers in a day!
+
+## Buzz into Action ๐ฏ
+
+Feeling the excitement? Great! Let's help you take your first flight with Hive.
+
+#### ๐ Add dependencies
+
+To kickstart the journey add `hive`, `isar_flutter_libs` and `path_provider` to your `pubspec.yaml`.
+
+```yaml
+dependencies:
+ hive: ^4.0.0
+ isar_flutter_libs: ^4.0.0-dev.13
+ path_provider: ^2.1.0
+```
+
+Pssst! ๐คซ `path_provider` will help you to find the optimal directory for each platform.
+
+#### ๐ก Designate a Home
+
+Hive needs a place to call home. Using `path_provider` we can find a valid directory.
+
+```dart
+void main() async {
+ WidgetsFlutterBinding.ensureInitialized();
+ final dir = await getApplicationDocumentsDirectory();
+ Hive.defaultDirectory = dir.path;
+
+ // ...
+}
+```
+
+#### ๐ And... Action!
+
+๐ Woohoo! You're all set. Dive right in and let's get buzzing with Hive.
+
+```dart
+import 'package:hive/hive.dart';
+
+final box = Hive.box();
+box.put('name', 'David');
+
+final name = box.get('name');
+print('Name: $name');
+```
+
+> ๐ Honeybees can fly at a speed of up to 30 kilometers per hour!
+
+# ๐ Hive Handbook
+
+In Hive, data is neatly organized into containers known as boxes. Think of boxes as tables you'd find in SQL, but far more flexible โ they don't stick to a set structure and can contain a variety of data. Boxes can be encrypted to store sensitive data.
+
+## Table of Contents
+
+Want to jump to a specific section? Here's a handy table of contents:
+
+- [Opening Boxes](#-opening-boxes)
+- [Closing Boxes](#-bidding-adieu-closing-boxes)
+- [Inserting](#%EF%B8%8F-filling-the-honeycomb-inserting-data)
+- [Reading](#-extracting-honey-i-mean-data)
+- [Deleting](#-deleting-data)
+- [Using Boxes like Lists](#-using-boxes-like-lists)
+- [Type safety](#%EF%B8%8F-type-safety)
+- [Non-primitive Objects](#-bee-yond-the-basics-non-primitive-objects)
+- [Transactions](#-transactions)
+- [FAQ](#-buzzworthy-questions-faq)
+
+> ๐ Bees have five eyes โ three simple eyes on top of the head, and two compound eyes, with numerous hexagonal facets.
+
+### ๐ฆ Opening Boxes
+
+Your journey with Hive begins with opening your first box. Trust me, it's unbee-lievably easy:
+
+```dart
+final box = Hive.box(name: 'myBox');
+```
+
+When you call `Hive.box(name: 'myBox')` for the first time with a given name, Hive will craft a new box for you. If you call it again with the same name, Hive will return the already existing box.
+
+You can use `Hive.box()` without providing a name. In this case, Hive will return the default box.
+
+There are optional parameters you can pass to `Hive.box()`:
+
+| Parameter | Description |
+| --------------- | ------------------------------------------------------------------------- |
+| `name` | Label your box with a distinct name |
+| `directory` | Select a home for your box. If omitted, Hive uses the `defaultDirectory`. |
+| `encryptionKey` | Hand over this key, and Hive will encrypt your box. Keep it safe! |
+| `maxSizeMiB` | The maximum size of the box in MiB. Go for a modest number. |
+
+> ๐ Beeswax, which is secreted from the abdomen of worker bees, is used to construct the honeycomb.
+
+### ๐ Bidding Adieu: Closing Boxes
+
+It's not advised to close boxes that might be accessed again. This prevents unnecessary overhead of reopening the box and ensures smooth data retrieval.
+
+To close a box just call `box.close()`. Wipe the box from the face of the earth with `box.deleteFromDisk()`.
+
+> ๐ When a bee finds a good source of nectar, it flies back to the hive and shows its friends where the nectar source is by doing a dance.
+
+### โ๏ธ Filling the Honeycomb: Inserting Data
+
+Once we have a box, it's time to fill it with sweet data! At its core, a box is just a key-value store. String keys are mapped to arbitrary primitive values. You can think of a box as a persisted `Map`.
+
+```dart
+final box = Hive.box();
+box.put('danceMoves', 'Waggle Dance');
+box.put('wingSpeed', 200);
+```
+
+Updating values? If a particular key already exists, Hive simply updates its corresponding value. And complex types like lists and maps? They're in too!
+
+```dart
+box.put('friends', ['Buzzy', 'Stinger', 'Honey']);
+box.put('memories', {'firstFlight': 'Sunny Day', 'bestNectar': 'Rose'});
+```
+
+Instead of `.put()` you prefer the syntax of maps? Hive gets you:
+
+```dart
+box['danceMoves'] = 'Round Dance';
+box['wingSpeed'] = 220;
+```
+
+Got a bucket of honey facts? Drop them all at once with `box.putAll()`:
+
+```dart
+box.putAll({'favoriteFlower': 'Lavender', 'wingSpeed': 210});
+```
+
+> ๐ A single bee colony can produce anywhere from 30 to 100 pounds of honey in a year, depending on the availability of nectar sources.
+
+### ๐ Extracting Honey... I mean, Data!
+
+Need a snippet of info from your Hive? No need to don the beekeeper suit; just scoop it out using `box.get()` or `box.getAll()`. If a key doesn't exist, `box.get()` simply return a `null`. But fret not; you can tell it to have a backup plan:
+
+```dart
+final box = Hive.box(name: 'beeees');
+final fav = box.get('favoriteFlower');
+final moves = box.get('danceMoves', defaultValue: 'waggle');
+```
+
+Oh, and if you're feeling fancy, use the `[]` operator for a more stylish approach:
+
+```dart
+final fav = box['favoriteFlower'];
+final moves = box['danceMoves'] ?? 'waggle';
+```
+
+> ๐ Worker bees are the only bees most people ever see flying around outside the hive. They're female, and their roles are to forage for food, build and protect the hive, and more.
+
+### ๐งน Deleting Data
+
+Time for some spring cleaning in the hive! To remove a single entry from your box, use `box.delete()`:
+
+```dart
+final deleted = box.delete('lavenderHoney');
+print('Honey eaten: $deleted'); // Honey eaten: true
+```
+
+Perhaps it's time for a complete reset, making space for a fresh batch of honey. If you're looking to remove all key-value pairs from a box, use `box.clear()`:
+
+```dart
+box.clear();
+```
+
+> ๐ Bees have been around for more than 30 million years! Their long history predates the existence of humans and even dinosaurs.
+
+### โจ Using Boxes like Lists
+
+In the bee world, honeycombs aren't just random compartments; they're methodically organized. Similarly, while we've been viewing Hive boxes as maps so far, they can be used just like lists:
+
+```dart
+final box = Hive.box();
+
+box.add('Rose');
+box.add('Tulip');
+
+print(box.getAt(0)); // Rose
+print(box.getAt(1)); // Tulip
+```
+
+But remember, bees can't retrieve honey from a comb that's empty or doesn't exist. Likewise, index-based operations will throw an error if you try an index out of bounds:
+
+```dart
+final box = Hive.box();
+box.add('Daisy');
+print(box.getAt(1)); // This will make the bees buzz in confusion
+```
+
+Even if we insert a key-value pair we can still access the values by index.
+
+```dart
+final box = Hive.box();
+
+box.add('Lily');
+box.put('key', 'Orchid');
+
+print(box.getAt(0)); // Lily
+print(box.getAt(1)); // Orchid
+```
+
+Of course, we can also use the `[]` operator in combination with indexes :
+
+```dart
+final box = Hive.box();
+
+box.add('Marigold');
+print(box[0]); // Marigold
+
+box[0] = 'Daffodil';
+box[1] = 'Bluebell'; // This will get the bees in a whirl
+```
+
+> ๐ To produce one pound of honey, a hive's bees must visit 2 million flowers and fly over 55,000 miles.
+
+### ๐ก๏ธ Type safety
+
+Safety is the bee's priority! To keep your data sweet and pure boxes have an optional generic type parameter. It allows you to store only values of a specific type in a box:
+
+```dart
+final box = Hive.box(name: 'BeeTreasures');
+box.put('DaisyDance', 'SweetNectarShake');
+box.put('RoseRumba', 'GoldenPollenParty');
+box.put('TulipTango', 777); // Error - You can't fool the bees!
+```
+
+> ๐ Bees have two stomachs. One is for eating, and the other is for storing nectar collected from flowers or water so they can carry it back to their hive. Talk about a sweet backpack!
+
+### ๐งฉ Bee-yond the Basics: Non-primitive Objects
+
+Hive goes beyond storing just basic data types! Along with primitives, lists, and maps, Hive can store any Dart object of your liking. The only buzz you need to know? Your object should come equipped with a `.fromJson()` and `.toJson()` method:
+
+```dart
+class Bee {
+ Bee({required this.name, required this.role});
+
+ factory Bee.fromJson(Map json) => Bee(
+ name: json['name'] as String,
+ role: json['role'] as String,
+ );
+
+ final String name;
+ final String role;
+
+ Map toJson() => {
+ 'name': name,
+ 'role': role,
+ };
+}
+```
+
+Before our bee-friends can buzz around in Hive, you need to do the beekeeper's job and register the `Bee` class:
+
+```dart
+Hive.registerAdapter('Bee', Bee.fromJson);
+```
+
+Now, you're all set to let your bees fly:
+
+```dart
+final box = Hive.box();
+
+var bumble = Bee()
+ ..name = 'Bumble'
+ ..role = 'Worker';
+box.put('BumbleID', bumble);
+
+print(box.get('BumbleID')); // Bumble - Worker
+```
+
+> ๐ Bees are responsible for pollinating about one-third of the world's food crops.
+
+### ๐ชข Transactions
+
+Transactions are an efficient way to update multiple values at once. They are also useful if you want to make sure that a Box is not changed by other code while you are working with it.
+
+```dart
+final box = Hive.box();
+
+box.write(() {
+ box.store('nectar1', 'GoldenNectar');
+ box.store('nectar2', 'WildflowerBrew');
+ box.store('nectar3', 'CloverDew');
+});
+
+box.read(() {
+ box.get('nectar1');
+});
+```
+
+Changes made in a transaction are always atomic. Either all changes are applied or none of them. So if an error occurs during a transaction, the box will not be changed.
+
+```dart
+final box = Hive.box();
+box.put('honeyLevel', 5);
+
+box.write(() {
+ box.put('honeyLevel', 6);
+ throw Exception('Oh no!!!');
+});
+
+print(box.get('honeyLevel')); // 5
+```
+
+> ๐ Bees can recognize human faces, and they can even be trained to associate a picture of a face with sweet treats!
+
+### ๐ผ Buzzworthy Questions: FAQ
+
+#### To bee or not to bee: Hive or Isar?
+
+> It's not always black and yellow! Both Hive and Isar have their sweet spots. Hive is a lightweight wrapper around Isar so if you are looking for a simple key-value store, Hive is the way to go. Isar is the way to go if you need queries, relations, and more advanced features.
+
+#### Will using Hive make my app as fast as a bee?
+
+> While we can't promise your app will gain wings, Hive sure will give it the speed it deserves. Hive is very resource efficient and optimized for mobile devices. Flutter like a butterfly, sting like a bee!
+
+#### Where in the beehive does Hive hide my honey... I mean, data?
+
+> Remember the `defaultDirectory` we set at the beginning? That's where Hive stores your data in a file named `yourBoxName.isar` or `yourBoxName.sqlite`.
+
+#### I've got some bee-autiful images! Can I store them directly in Hive?
+
+> While you might be tempted to put those pics right into Hive, it's best to store your images and other binary data as files outside the Hive. You can then store the file path in Hive. Think of it like leaving honey out in the open; it's better to keep it neatly stored in the appropriate place.
+
+#### Yikes! What if my app meets an untimely demise (gets killed)? What becomes of my Hive?
+
+> No need for a bee-mergency! If your app buzzes off unexpectedly, Hive ensures that your data remains safe and sound. Transactions are atomic, so either all changes are applied or none of them. If an error occurs during a transaction, the box will not be changed.
+
+#### How does Hive keep our data safe from sticky fingers?
+
+> We've got the queen's guard on duty! If you encrypt your box Hive uses 256-bit AES in CBC mode. Every database page is safeguarded separately, ensuring your sweet stuff remains secure and only accessible to those with the right key. Buzz-worthy protection, right?
+
+#### When should I rally the troops and use transactions?
+
+> Just like a hive making big decisions together, you'll want to use transactions when you have several operations that should be executed together. If one fails, they all fail. It ensures your data stays consistent, safe, and buzzing in harmony!
+
+#### What if I'm allergic to bees?
+
+> No worries! Hive is 100% sting-free, although we're pretty sure you'll get a buzz out of its performance.
+
+#### Hive operations are synchronous. Doesn't that make the bee waltz a bit slow?
+
+> Hive is incredibly fast an efficient. It's built on top of Isar, a high-performance database engine. If you want to keep database operations away from your UI isolate, you can use `compute()` or `Isolate.run()` to run them in a separate isolate.
+
+#### How many boxes should a wise beekeeper have?
+
+> While the sky's the limit in the world of bees, in Hive, every box becomes a separate file. So, even if you're buzzing with excitement, it's wise not to overdo it.
+
+### ๐ License
+
+```
+Copyright 2023 Simon Choi
+
+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.
+```
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 000000000..85ad35931
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,11 @@
+include: package:very_good_analysis/analysis_options.yaml
+analyzer:
+ exclude:
+ - "**/*.g.dart"
+
+linter:
+ rules:
+ cascade_invocations: false
+ use_string_in_part_of_directives: false
+ always_put_required_named_parameters_first: false
+ use_setters_to_change_properties: false
diff --git a/hive/.pubignore b/hive/.pubignore
deleted file mode 100644
index b1c1a4ab6..000000000
--- a/hive/.pubignore
+++ /dev/null
@@ -1 +0,0 @@
-!lib/src/backend/js/web_worker/web_worker.dart.js*
diff --git a/hive/LICENSE b/hive/LICENSE
deleted file mode 100644
index e93f5543e..000000000
--- a/hive/LICENSE
+++ /dev/null
@@ -1,190 +0,0 @@
- Apache License
- Version 2.0, January 2004
- https://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- Copyright 2019 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
-
- https://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.
diff --git a/hive/README.md b/hive/README.md
deleted file mode 100644
index a4053f95f..000000000
--- a/hive/README.md
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-Fast, Enjoyable & Secure NoSQL Database
-
-[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/hivedb/hive/test.yml?label=tests&labelColor=333940&logo=github)](https://github.com/hivedb/hive/actions)
-[![Codecov branch](https://img.shields.io/codecov/c/github/hivedb/hive/nndb?labelColor=333940&logo=codecov&logoColor=white)](https://codecov.io/gh/hivedb/hive)
-[![Pub Version](https://img.shields.io/pub/v/hive?label=pub.dev&labelColor=333940&logo=dart)](https://pub.dev/packages/hive)
-[![GitHub](https://img.shields.io/github/license/hivedb/hive?color=%23007A88&labelColor=333940&logo=apache)](https://github.com/hivedb/hive/blob/master/LICENSE)
-
-Hive is a lightweight and blazing fast key-value database written in pure Dart. Inspired by [Bitcask](https://en.wikipedia.org/wiki/Bitcask).
-
-[Documentation & Samples](https://docs.hivedb.dev/) ๐
-
-### Before you start
-Consider using [Isar](https://github.com/isar/isar), a Flutter database by the author of Hive that is superior in every way!
-
-## Features
-
-- ๐ Cross platform: mobile, desktop, browser
-- โก Great performance (see [benchmark](#benchmark))
-- โค๏ธ Simple, powerful, & intuitive API
-- ๐ Strong encryption built in
-- ๐ **NO** native dependencies
-- ๐ Batteries included
-
-## Getting Started
-
-Check out the [Quick Start](https://docs.hivedb.dev) documentation to get started.
-
-## Usage
-
-You can use Hive just like a map. It is not necessary to await `Futures`.
-
-```dart
-var box = Hive.box('myBox');
-
-box.put('name', 'David');
-
-var name = box.get('name');
-
-print('Name: $name');
-```
-
-## BoxCollections
-
-`BoxCollections` are a set of boxes which can be similarly used as normal boxes, except of that
-they dramatically improve speed on web. They support opening and closing all boxes of a collection
-at once and more efficiently store data in indexed DB on web.
-
-Aside, they also expose Transactions which can be used to speed up tremendous numbers of database
-transactions on web.
-
-On `dart:io` platforms, there is no performance gain by BoxCollections or Transactions. Only
-BoxCollections might be useful for some box hierarchy and development experience.
-
-```dart
-// Create a box collection
- final collection = await BoxCollection.open(
- 'MyFirstFluffyBox', // Name of your database
- {'cats', 'dogs'}, // Names of your boxes
- path: './', // Path where to store your boxes (Only used in Flutter / Dart IO)
- key: HiveCipher(), // Key to encrypt your boxes (Only used in Flutter / Dart IO)
- );
-
- // Open your boxes. Optional: Give it a type.
- final catsBox = collection.openBox