sqflite_ext 1.2.0 sqflite_ext: ^1.2.0 copied to clipboard
Useful utilities to augment sqflite.
sqflite_ext #
Useful utilities to augment sqflite. Designed to be unobtrusive helpers, so you still access sqflite directly (not a wrapper).
Usage #
Bool utilities #
Sqflite does not support the bool
type (reference).
import 'package:sqflite_ext/sqflite_ext.dart';
boolToInt(true);
// => 1
boolToIntOrNull(null);
// => null
intToBool(1);
// => true
intToBoolOrNull(null);
// => null
Named arguments #
import 'package:sqflite_ext/sqflite_ext.dart';
final result = parseNamedArgs(
'SELECT * FROM demo WHERE id = :id',
{'id': 83},
);
// result.query => 'SELECT * FROM demo WHERE id = ?'
// result.arguments => [83]