---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/import_foreign_schema.sql
---
SOURCE_FILE
  COMMENT "-- simple"
  WHITESPACE "\n"
  IMPORT_FOREIGN_SCHEMA
    IMPORT_KW "import"
    WHITESPACE " "
    FOREIGN_KW "foreign"
    WHITESPACE " "
    SCHEMA_KW "schema"
    WHITESPACE " "
    NAME_REF
      IDENT "s"
    WHITESPACE "\n  "
    FROM_KW "from"
    WHITESPACE " "
    SERVER_NAME
      SERVER_KW "server"
      WHITESPACE " "
      NAME_REF
        IDENT "a"
    WHITESPACE "\n  "
    INTO_SCHEMA
      INTO_KW "into"
      WHITESPACE " "
      NAME_REF
        IDENT "b"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- except"
  WHITESPACE "\n"
  IMPORT_FOREIGN_SCHEMA
    IMPORT_KW "import"
    WHITESPACE " "
    FOREIGN_KW "foreign"
    WHITESPACE " "
    SCHEMA_KW "schema"
    WHITESPACE " "
    NAME_REF
      IDENT "some_schema_name"
    WHITESPACE "\n    "
    EXCEPT_TABLES
      EXCEPT_KW "EXCEPT"
      WHITESPACE " "
      L_PAREN "("
      NAME_REF
        IDENT "t1"
      COMMA ","
      WHITESPACE " "
      NAME_REF
        IDENT "t2"
      R_PAREN ")"
    WHITESPACE "\n    "
    FROM_KW "FROM"
    WHITESPACE " "
    SERVER_NAME
      SERVER_KW "SERVER"
      WHITESPACE " "
      NAME_REF
        IDENT "server_name"
    WHITESPACE "\n    "
    INTO_SCHEMA
      INTO_KW "INTO"
      WHITESPACE " "
      NAME_REF
        IDENT "local_schema"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- options"
  WHITESPACE "\n"
  IMPORT_FOREIGN_SCHEMA
    IMPORT_KW "import"
    WHITESPACE " "
    FOREIGN_KW "foreign"
    WHITESPACE " "
    SCHEMA_KW "schema"
    WHITESPACE " "
    NAME_REF
      IDENT "a"
    WHITESPACE "\n  "
    FROM_KW "from"
    WHITESPACE " "
    SERVER_NAME
      SERVER_KW "server"
      WHITESPACE " "
      NAME_REF
        IDENT "b"
    WHITESPACE "\n  "
    INTO_SCHEMA
      INTO_KW "into"
      WHITESPACE " "
      NAME_REF
        IDENT "c"
    WHITESPACE "\n  "
    ALTER_OPTION_LIST
      OPTIONS_KW "options"
      WHITESPACE " "
      L_PAREN "("
      ALTER_OPTION
        NAME
          IDENT "foo"
        WHITESPACE " "
        LITERAL
          STRING "'bar'"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- options_multi"
  WHITESPACE "\n"
  IMPORT_FOREIGN_SCHEMA
    IMPORT_KW "import"
    WHITESPACE " "
    FOREIGN_KW "foreign"
    WHITESPACE " "
    SCHEMA_KW "schema"
    WHITESPACE " "
    NAME_REF
      IDENT "a"
    WHITESPACE "\n  "
    FROM_KW "from"
    WHITESPACE " "
    SERVER_NAME
      SERVER_KW "server"
      WHITESPACE " "
      NAME_REF
        IDENT "b"
    WHITESPACE "\n  "
    INTO_SCHEMA
      INTO_KW "into"
      WHITESPACE " "
      NAME_REF
        IDENT "c"
    WHITESPACE "\n  "
    ALTER_OPTION_LIST
      OPTIONS_KW "options"
      WHITESPACE " "
      L_PAREN "("
      ALTER_OPTION
        NAME
          IDENT "foo"
        WHITESPACE " "
        LITERAL
          STRING "'bar'"
      COMMA ","
      WHITESPACE " "
      ALTER_OPTION
        NAME
          IDENT "a"
        WHITESPACE " "
        LITERAL
          STRING "'b'"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- doc_example_1"
  WHITESPACE "\n"
  IMPORT_FOREIGN_SCHEMA
    IMPORT_KW "IMPORT"
    WHITESPACE " "
    FOREIGN_KW "FOREIGN"
    WHITESPACE " "
    SCHEMA_KW "SCHEMA"
    WHITESPACE " "
    NAME_REF
      IDENT "foreign_films"
    WHITESPACE "\n    "
    FROM_KW "FROM"
    WHITESPACE " "
    SERVER_NAME
      SERVER_KW "SERVER"
      WHITESPACE " "
      NAME_REF
        IDENT "film_server"
    WHITESPACE " "
    INTO_SCHEMA
      INTO_KW "INTO"
      WHITESPACE " "
      NAME_REF
        IDENT "films"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- doc_example_2"
  WHITESPACE "\n"
  IMPORT_FOREIGN_SCHEMA
    IMPORT_KW "IMPORT"
    WHITESPACE " "
    FOREIGN_KW "FOREIGN"
    WHITESPACE " "
    SCHEMA_KW "SCHEMA"
    WHITESPACE " "
    NAME_REF
      IDENT "foreign_films"
    WHITESPACE " "
    LIMIT_TO_TABLES
      LIMIT_KW "LIMIT"
      WHITESPACE " "
      TO_KW "TO"
      WHITESPACE " "
      L_PAREN "("
      NAME_REF
        IDENT "actors"
      COMMA ","
      WHITESPACE " "
      NAME_REF
        IDENT "directors"
      R_PAREN ")"
    WHITESPACE "\n    "
    FROM_KW "FROM"
    WHITESPACE " "
    SERVER_NAME
      SERVER_KW "SERVER"
      WHITESPACE " "
      NAME_REF
        IDENT "film_server"
    WHITESPACE " "
    INTO_SCHEMA
      INTO_KW "INTO"
      WHITESPACE " "
      NAME_REF
        IDENT "films"
  SEMICOLON ";"
  WHITESPACE "\n\n"
