build_app

This commit is contained in:
2026-09-18 18:43:28 +00:00
parent bcc657c2be
commit 503bc78d41
22 changed files with 2762 additions and 0 deletions
@@ -2,17 +2,101 @@
import 'package:sqflite/sqflite.dart';
class TableQuery {
Future<void> createOtherTable(Database db) async {
// Table Query
_createWorld(db, 'World');
_createHello(db, 'Hello');
// OLD: _createGauravt2(db, 'Gauravt2'); // demo table from old template - disabled for clean base - by Azmat
// OLD: _createGauravtest1(db, 'Gauravtest1'); // demo table from old template - disabled for clean base - by Azmat
}
// Table Query Data
Future<void> _createWorld(Database db, String tableName) async {
var tableExists = await _isTableExists(db, tableName);
if (!tableExists) {
print('$tableName making.....');
await db.execute(
'''
CREATE TABLE $tableName (
id INTEGER PRIMARY KEY AUTOINCREMENT,
accountId TEXT,
createdAt TEXT,
createdBy TEXT,
updatedAt TEXT,
updatedBy TEXT,
extn1 TEXT,
extn2 TEXT,
extn3 TEXT,
extn4 TEXT,
extn5 TEXT,
extn6 TEXT,
extn7 TEXT,
extn8 TEXT,
extn9 TEXT,
extn10 TEXT,
extn11 TEXT,
extn12 TEXT,
extn13 TEXT,
extn14 TEXT,
extn15 TEXT,
Name TEXT,
)''');
} else {
print('$tableName table exist');
}
}
Future<void> _createHello(Database db, String tableName) async {
var tableExists = await _isTableExists(db, tableName);
if (!tableExists) {
print('$tableName making.....');
await db.execute(
'''
CREATE TABLE $tableName (
id INTEGER PRIMARY KEY AUTOINCREMENT,
accountId TEXT,
createdAt TEXT,
createdBy TEXT,
updatedAt TEXT,
updatedBy TEXT,
extn1 TEXT,
extn2 TEXT,
extn3 TEXT,
extn4 TEXT,
extn5 TEXT,
extn6 TEXT,
extn7 TEXT,
extn8 TEXT,
extn9 TEXT,
extn10 TEXT,
extn11 TEXT,
extn12 TEXT,
extn13 TEXT,
extn14 TEXT,
extn15 TEXT,
Number_Fieldn INTEGER,
)''');
} else {
print('$tableName table exist');
}
}
Future<void> _createGauravt2(Database db, String tableName) async {
var tableExists = await _isTableExists(db, tableName);
if (!tableExists) {