test_class.file: ndbc-core/src/test/java/io/trane/ndbc/util/PositionalQueryTest.java
test_class.identifier: PositionalQueryTest
test_case.body: @Test
    public void noParams() {
      final String query = "SELECT * FROM test";
      assertEquals(PositionalQuery.apply(query), query);
    }
test_case.class_method_signature: PositionalQueryTest.noParams()
test_case.full_signature: @Test public void noParams()
test_case.identifier: noParams
test_case.invocations: assertEquals apply
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void noParams()
focal_class.file: ndbc-core/src/main/java/io/trane/ndbc/util/PositionalQuery.java
focal_class.identifier: PositionalQuery
focal_class.class_method_signature: PositionalQuery.apply(final String query)
focal_class.full_signature: public static final String apply(final String query)
focal_class.identifier: apply
focal_class.modifiers: public static final
focal_class.parameters: (final String query)
focal_class.return: String
focal_class.signature: String apply(final String query)
focal_method.body: public static final String apply(final String query) {
      int idx = 0;
      final StringBuilder sb = new StringBuilder();
  
      for (int i = 0; i < query.length(); i++) {
        final char c = query.charAt(i);
        if (c == '?') {
          // escape ??
          if ((query.length() > (i + 1)) && (query.charAt(i + 1) == '?')) {
            sb.append("?");
            i++;
          } else {
            idx += 1;
            sb.append("$");
            sb.append(idx);
          }
        } else
          sb.append(c);
      }
      return sb.toString();
    }
focal_method.class_method_signature: PositionalQuery.apply(final String query)
focal_method.full_signature: public static final String apply(final String query)
focal_method.identifier: apply
focal_method.invocations: length charAt length charAt append append append append toString
focal_method.modifiers: public static final
focal_method.parameters: (final String query)
focal_method.return: String
focal_method.signature: String apply(final String query)