plugins
                                
                                 plugins copied to clipboard
                                
                                    plugins copied to clipboard
                            
                            
                            
                        [sqflite] The FFI implementation of sqflite_tizen
Source code
https://github.com/swift-kim/plugins/tree/sqflite/packages/sqflite
Usage
Add sqflite_tizen as a git package dependency in your pubspec.yaml.
dependencies:
  sqflite:
  sqflite_tizen:
    git: https://github.com/swift-kim/plugins
    ref: sqflite
    path: packages/sqflite
Current status
The following tests (from the sqflite example app) are currently failing. No critical error found. None of the errors are Tizen-specific.
- Raw tests
- Options: Not implemented by sqflite_common_ffi.
- Debug mode (log): Partially implemented by sqflite_common_ffi.
- without rowid: Bad test case (0 is returned on Tizen).
 
- Open tests
- open in transaction: A bug in sqflite_common_ffi.
- Open non sqlite file: Bad test case (succeeds only on Android).
 
- Type tests
- blob: Not implemented by sqflite_common_ffi (see getSqlArgumentsinsqflite_ffi_impl.dart).
- bool: Not implemented by sqflite_common_ffi.
 
- blob: Not implemented by sqflite_common_ffi (see 
- Exp tests
- sql dump file
 
- Exception tests
- Sqlite Exception
- Sqlite batch Exception
- Bind no argument (no iOS)
- crash ios (no iOS)
- Bind no parameter
- Thread dead lock
 
https://github.com/flutter-tizen/plugins/pull/276#issuecomment-970168882
We can even use sqlite3 directly without needing to extend sqflite.
import 'dart:ffi';
import 'package:sqlite3/open.dart';
import 'package:sqlite3/sqlite3.dart';
open.overrideFor(OperatingSystem.linux, () {
  return DynamicLibrary.open('libsqlite3.so.0');
});
Database db = sqlite3.openInMemory();
db.execute('...');
Basic operations (such as CREATE and INSERT) just worked but more testing is needed.
Comparisons:
- sqflite_tizen(current): An implementation of- sqflitebased on Tizen's sqlite3 API.
- sqflite_tizen(FFI-based): An implementation of- sqflitebased on- sqflite_common_ffi.
- sqflite_common_ffi: An async wrapper around- sqlite3based on isolates.
- sqlite3: The core binding library that has no built-in async support.
- drift: An alternative relational database for Dart built on top of- sqlite3(written by the author of- sqlite3).