Skip to content

Commit ebabfe7

Browse files
committed
Added more information to the README.
1 parent 282bac3 commit ebabfe7

File tree

1 file changed

+53
-22
lines changed

1 file changed

+53
-22
lines changed

README.md

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ This is a [Flutter](https://flutter.io/) plugin that bundles and wraps
1111
an open-source extension to [SQLite](https://www.sqlite.org) that provides
1212
transparent 256-bit AES encryption of database files.
1313

14+
Features
15+
--------
16+
17+
- Implements fully-encrypted SQLite databases stored on disk or in memory.
18+
19+
- Provides a high-fidelity subset of the
20+
[`android.database.sqlite`](https://developer.android.com/reference/android/database/sqlite/package-summary)
21+
API to aid Android developers migrating to Flutter.
22+
1423
Compatibility
1524
-------------
1625

@@ -30,6 +39,50 @@ var cursor = await db.rawQuery("SELECT 1 AS a, 2 as b, 3 AS c", []);
3039
await DatabaseUtils.dumpCursor(cursor);
3140
```
3241

42+
Frequently Asked Questions
43+
--------------------------
44+
45+
### Which releases of SQLite and SQLCipher does this plugin bundle?
46+
47+
SQLCipher for Android 3.5.9, SQLCipher 3.4.2, and SQLite 3.20.1.
48+
49+
### Why use this plugin instead of another plugin wrapping Android's native SQLite support?
50+
51+
Two good reasons are:
52+
53+
1. **Encryption**.
54+
Android's native SQLite support does not feature database encryption.
55+
By using this plugin, you can trivially enable encryption for your app
56+
database, something likely appreciated by both you as well as your users.
57+
58+
2. **Compatibility**.
59+
Android's native SQLite version
60+
[varies](https://developer.android.com/reference/android/database/sqlite/package-summary)
61+
greatly depending on the Android release, from SQLite 3.4 (released in
62+
2007) to SQLite 3.19 (released in 2017, bundled in Android 8.1). Further,
63+
some device manufacturers include different versions of SQLite on their
64+
devices. By using this plugin, you gain a consistent, predictable, and
65+
up-to-date version of SQLite for your app regardless of the Android
66+
release your app runs on.
67+
68+
### How much does using this plugin increase my final app size?
69+
70+
Due to the bundled SQLCipher libraries, your APK size increases by about
71+
7 MiB. We are investigating potential ways (e.g., ProGuard) to reduce that.
72+
73+
Caveats
74+
-------
75+
76+
- **At present, iOS is not supported.**
77+
This may eventually be addressed going forward by bundling
78+
[FMDB](https://github.com/ccgus/fmdb) which includes SQLCipher support.
79+
80+
- **At present, cursors are fully materialized.**
81+
This means that queries which return very large result sets will incur
82+
nontrivial overhead in the IPC transfer of the cursor data from Java to
83+
Dart. We are planning to add windowed cursor and streaming support in a
84+
future release. In the meanwhile, `OFFSET` and `LIMIT` are your friends.
85+
3386
Reference
3487
---------
3588

@@ -61,25 +114,3 @@ Reference
61114
import 'package:flutter_sqlcipher/sqlcipher.dart';
62115

63116
- [`SQLCipher.version`](https://pub.dartlang.org/documentation/flutter_sqlcipher/latest/sqlcipher/SQLCipher/version.html)
64-
65-
Frequently Asked Questions
66-
--------------------------
67-
68-
### Why use this plugin instead of a plugin wrapping Android's native SQLite support?
69-
70-
Two good reasons are:
71-
72-
1. **Encryption**.
73-
Android's native SQLite support does not support database encryption.
74-
By using this plugin, you can trivially enable encryption for your app
75-
database, something likely appreciated by both you as well as your users.
76-
77-
2. **Compatibility**.
78-
Android's native SQLite version
79-
[varies](https://developer.android.com/reference/android/database/sqlite/package-summary)
80-
greatly depending on the Android release, from SQLite 3.4 (released in
81-
2007) to SQLite 3.19 (released in 2017, bundled in Android 8.1). Further,
82-
some device manufacturers include different versions of SQLite on their
83-
devices. By using this plugin, you gain a consistent, predictable, and
84-
up-to-date version of SQLite for your app regardless of the Android
85-
release your app runs on.

0 commit comments

Comments
 (0)