close method

void close()

Close the database.

This should only be called once on a database unless an exception is thrown. It should be called at least once to finalize the database and avoid resource leaks.

Implementation

void close() {
  assert(_open);
  final int resultCode = bindings.sqlite3_close_v2(_database);
  if (resultCode == Errors.SQLITE_OK) {
    _open = false;
  } else {
    throw _loadError(resultCode);
  }
}