test_class.file: web/api/src/test/java/leap/web/api/query/SelectParserTest.java
test_class.identifier: SelectParserTest
test_class.superclass: extends TestBase
test_case.body: @Test
      public void testSingle() {
          Select select = SelectParser.parse("name");
          assertSingleSelect(select, "name", null, null);
          select = SelectParser.parse("name n");
          assertSingleSelect(select, "name", "n", null);
          select = SelectParser.parse("t.name");
          assertSingleSelect(select, "name", null, "t");
          select = SelectParser.parse("t.name n");
          assertSingleSelect(select, "name", "n", "t");
      }
test_case.class_method_signature: SelectParserTest.testSingle()
test_case.full_signature: @Test public void testSingle()
test_case.identifier: testSingle
test_case.invocations: parse assertSingleSelect parse assertSingleSelect parse assertSingleSelect parse assertSingleSelect
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSingle()
focal_class.declarator: SELETE = "select"
focal_class.modifier: public static final
focal_class.original_string: public static final String SELETE = "select";
focal_class.type: String
focal_class.var_name: SELETE
focal_class.file: web/api/src/main/java/leap/web/api/query/SelectParser.java
focal_class.identifier: SelectParser
focal_class.class_method_signature: SelectParser.parse(String expr)
focal_class.full_signature: public static Select parse(String expr)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (String expr)
focal_class.return: Select
focal_class.signature: Select parse(String expr)
focal_method.body: public static Select parse(String expr) {
          List<Select.Item> items = new ArrayList<>();
          Select.Item item;
          String[] names = Strings.split(expr, ',');
          for (String name : names) {
              String[] parts = Strings.splitWhitespaces(name);
              if (parts.length <= 2) {
                  String[] join = Strings.split(parts[0], ".");
                  if (join.length == 1) {
                      if (parts.length == 1) {
                          item = new Select.Item(parts[0]);
                      } else {
                          item = new Select.Item(parts[0], parts[1]);
                      }
                  } else if (join.length == 2) {
                      if (parts.length == 1) {
                          item = new Select.Item(join[1], null, join[0]);
                      } else {
                          item = new Select.Item(join[1], parts[1], join[0]);
                      }
                  } else {
                      throw new BadRequestException("Invalid join item '" + parts[0] + "'");
                  }
              } else {
                  throw new BadRequestException("Invalid select item '" + name + "'");
              }
              items.add(item);
          }
          return new Select(items.toArray(new Select.Item[items.size()]));
      }
focal_method.class_method_signature: SelectParser.parse(String expr)
focal_method.full_signature: public static Select parse(String expr)
focal_method.identifier: parse
focal_method.invocations: split splitWhitespaces split add toArray size
focal_method.modifiers: public static
focal_method.parameters: (String expr)
focal_method.return: Select
focal_method.signature: Select parse(String expr)