existsTable method

Future<bool> existsTable(
  1. DatabaseDriver conn
)

Checks if the table exists in the MySQL database. This method queries the MySQL information schema to determine if a table with the current name exists in the database. Parameters:

  • conn - The active MySQL database connection Returns true if the table exists, false otherwise. Example:
if (await table.existsTable(conn)) {
  print('Table already exists');
} else {
  await table.createTable(conn);
}

Implementation

Future<bool> existsTable(DatabaseDriver conn) async {
  return conn.existTable(name);
}