-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0523703
commit c5decd2
Showing
14 changed files
with
119 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'package:paas_dashboard_flutter/module/mysql/mysql_database.dart'; | ||
|
||
class MysqlDatabaseApi { | ||
static Future<List<DatabaseResp>> getDatabaseList( | ||
String host, int port, String username, String password) async { | ||
throw UnimplementedError(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'package:paas_dashboard_flutter/module/mysql/mysql_table.dart'; | ||
|
||
class MysqlTablesApi { | ||
static Future<List<TableResp>> getTableList(String host, int port, | ||
String username, String password, String databaseName) async { | ||
throw UnimplementedError(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class MysqlConst { | ||
static const String infoDb = "information_schema"; | ||
static const String defaultHost = "localhost"; | ||
static const int defaultPort = 3306; | ||
static const String defaultUsername = "hzj"; | ||
static const String defaultPassword = "Mysql@123"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class DatabaseResp { | ||
final String databaseName; | ||
|
||
DatabaseResp(this.databaseName); | ||
|
||
DatabaseResp deepCopy() { | ||
return new DatabaseResp(this.databaseName); | ||
} | ||
|
||
@override | ||
String toString() { | ||
return 'DatabaseResp{databaseName: $databaseName}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class TableResp { | ||
final String tableName; | ||
|
||
TableResp(this.tableName); | ||
|
||
TableResp deepCopy() { | ||
return new TableResp(this.tableName); | ||
} | ||
|
||
@override | ||
String toString() { | ||
return 'TableResp{tableName: $tableName}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:paas_dashboard_flutter/api/mysql/mysql_databases_api.dart'; | ||
import 'package:paas_dashboard_flutter/module/mysql/const.dart'; | ||
|
||
void main() { | ||
test("test_query_databases", () async { | ||
var list = await MysqlDatabaseApi.getDatabaseList( | ||
MysqlConst.defaultHost, | ||
MysqlConst.defaultPort, | ||
MysqlConst.defaultUsername, | ||
MysqlConst.defaultPassword); | ||
print(list); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:paas_dashboard_flutter/api/mysql/mysql_tables_api.dart'; | ||
import 'package:paas_dashboard_flutter/module/mysql/const.dart'; | ||
|
||
void main() { | ||
test("test_query_tables", () async { | ||
var list = await MysqlTablesApi.getTableList( | ||
MysqlConst.defaultHost, | ||
MysqlConst.defaultPort, | ||
MysqlConst.defaultUsername, | ||
MysqlConst.defaultPassword, | ||
MysqlConst.infoDb); | ||
print(list); | ||
}); | ||
} |