def set_sqlite_autocommit(cn, autocommit):
  """SQLite autocommit setter for core."""
  if isinstance(autocommit, bool):
    cn.isolation_level = None if autocommit else ""
  else:
    cn.isolation_level = autocommit