---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/alter_role.sql
---
SOURCE_FILE
  COMMENT "-- with_options"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    ROLE_OPTION_LIST
      WITH_KW "with"
      WHITESPACE " "
      ROLE_OPTION
        IDENT "superuser"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- all_options"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE "\n  "
    ROLE_OPTION_LIST
      WITH_KW "with"
      WHITESPACE " "
      ROLE_OPTION
        IDENT "superuser"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "nosuperuser"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "nosuperuser"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "createdb"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "nocreatedb"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "createrole"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "nocreaterole"
      WHITESPACE "\n  "
      ROLE_OPTION
        INHERIT_KW "inherit"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "noinherit"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "login"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "nologin"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "replication"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "noreplication"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "bypassrls"
      WHITESPACE "\n  "
      ROLE_OPTION
        IDENT "nobypassrls"
      WHITESPACE "\n  "
      ROLE_OPTION
        CONNECTION_KW "connection"
        WHITESPACE " "
        LIMIT_KW "limit"
        WHITESPACE " "
        LITERAL
          INT_NUMBER "100"
      WHITESPACE "\n  "
      ROLE_OPTION
        ENCRYPTED_KW "encrypted"
        WHITESPACE " "
        PASSWORD_KW "password"
        WHITESPACE " "
        LITERAL
          STRING "'foo'"
      WHITESPACE "\n  "
      ROLE_OPTION
        PASSWORD_KW "password"
        WHITESPACE " "
        LITERAL
          STRING "'bar'"
      WHITESPACE " "
      ROLE_OPTION
        PASSWORD_KW "password"
        WHITESPACE " "
        NULL_KW "null"
      WHITESPACE "\n  "
      ROLE_OPTION
        VALID_KW "valid"
        WHITESPACE " "
        UNTIL_KW "until"
        WHITESPACE " "
        LITERAL
          STRING "'2042-02-22'"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- rename"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "newname"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_config"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "param"
      WHITESPACE " "
      EQ "="
      WHITESPACE " "
      LITERAL
        STRING "'value'"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "param"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      LITERAL
        STRING "'value'"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "param"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      DEFAULT_KW "default"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- set_config_from_current"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "param"
      WHITESPACE " "
      FROM_KW "from"
      WHITESPACE " "
      CURRENT_KW "current"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- reset_config"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    RESET_KW "reset"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "param"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- reset_all"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    RESET_KW "reset"
    WHITESPACE " "
    ALL_KW "all"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- in_database"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      NAME_REF
        IDENT "r"
    WHITESPACE " "
    IN_KW "in"
    WHITESPACE " "
    DATABASE_KW "database"
    WHITESPACE " "
    NAME_REF
      IDENT "d"
    WHITESPACE " "
    SET_CONFIG_PARAM
      SET_KW "set"
      WHITESPACE " "
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "param"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      LITERAL
        STRING "'value'"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- using_current_user"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ROLE_REF
      CURRENT_USER_KW "current_user"
    WHITESPACE " "
    ROLE_OPTION_LIST
      WITH_KW "with"
      WHITESPACE " "
      ROLE_OPTION
        IDENT "nologin"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- for_all_roles"
  WHITESPACE "\n"
  ALTER_ROLE
    ALTER_KW "alter"
    WHITESPACE " "
    ROLE_KW "role"
    WHITESPACE " "
    ALL_KW "all"
    WHITESPACE " "
    RESET_KW "reset"
    WHITESPACE " "
    ALL_KW "all"
  SEMICOLON ";"
  WHITESPACE "\n\n"
