discontinuedPackage connect_database has been discontinued.

createTable method

Future<Result<Unit>> createTable(
  1. String tableName,
  2. String ddlBody
)

Creates a new table if it doesn't exist (manual verification can be done by the caller beforehand). ddlBody should contain the definition body, e.g., "(Id INT, Nome VARCHAR(100))"

Implementation

Future<Result<Unit>> createTable(String tableName, String ddlBody) async {
  return (await driver.execute('CREATE TABLE $tableName $ddlBody')).map((_) => unit);
}