lib/_data_ingestion: improve openLocalDB
This commit is contained in:
@@ -25,11 +25,6 @@ class CreateDb extends Command {
|
||||
readWrite: true,
|
||||
);
|
||||
|
||||
if (db == null) {
|
||||
print("Failed to open database");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
seedData(db).then((_) {
|
||||
print("Database created successfully");
|
||||
}).catchError((error) {
|
||||
|
||||
@@ -29,11 +29,6 @@ class QueryKanji extends Command {
|
||||
libsqlitePath: argResults!.option('libsqlite')!,
|
||||
);
|
||||
|
||||
if (db == null) {
|
||||
print("Failed to open database");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
final result = await JaDBConnection(db).searchKanji('漢');
|
||||
|
||||
if (result == null) {
|
||||
|
||||
@@ -29,11 +29,6 @@ class QueryWord extends Command {
|
||||
libsqlitePath: argResults!.option('libsqlite')!,
|
||||
);
|
||||
|
||||
if (db == null) {
|
||||
print("Failed to open database");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
final result = await JaDBConnection(db).searchWord('kana');
|
||||
|
||||
if (result == null) {
|
||||
|
||||
Reference in New Issue
Block a user