toPermission method

Permission toPermission()

Implementation

Permission toPermission() {
  switch (this) {
    case 'ALL':
      return Permission.all;
    case 'SELECT':
      return Permission.select;
    case 'ALTER':
      return Permission.alter;
    case 'DROP':
      return Permission.drop;
    case 'DELETE':
      return Permission.delete;
    case 'INSERT':
      return Permission.insert;
    case 'DESCRIBE':
      return Permission.describe;
    case 'CREATE_DATABASE':
      return Permission.createDatabase;
    case 'CREATE_TABLE':
      return Permission.createTable;
    case 'DATA_LOCATION_ACCESS':
      return Permission.dataLocationAccess;
  }
  throw Exception('$this is not known in enum Permission');
}