init method

Future<void> init()

Inits the database

Implementation

Future<void> init() async {
  if (type.asString == "mysql") {
    conn = await MySQLConnection.createConnection(
      host: host,
      port: port,
      userName: user,
      password: password,
      databaseName: database,
    );
  } else {
    conn2 = await Connection.open(Endpoint(
      host: host,
      port: port,
      username: user,
      password: password,
      database: database,
    ));
  }
}