sql_query 1.0.5-dev.6 sql_query: ^1.0.5-dev.6 copied to clipboard
Extended Function for sqflite.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:sql_query/query.dart';
import 'package:sql_query_example/database/merge/data.dart';
import 'package:sql_query_example/produk.dart';
import 'package:sql_query_example/satuan.dart';
import 'package:sql_query_example/testing.dart';
import 'database/merge/config.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
Future.delayed(Duration.zero, () async {
await DB.init(
databaseName: 'testing',
tableList: [
Produk.tables(),
Satuan.tables(),
],
);
final qq = DB.table('DataKaryawan');
qq.whereNotHas('EMPID', (q) {
q.table = 'UserFaceBiometric';
return q.select(['EMPID']);
});
// await DB.deleteDB();
// await DB.init(
// databaseName: 'testing',
// tableList: [
// Produk.tables(),
// Satuan.tables(),
// ],
// );
});
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Testing(),
);
}
}