code: private void validateSelectQuery(final String selectQuery) {
          final SimpleDBParser parser = new SimpleDBParser(selectQuery);
          try {
              parser.selectQuery();
          } catch (Exception e) {
              throw new InvalidSimpleDBQueryException("The following query is an invalid SimpleDB query: " + selectQuery,
                      e);
          }
      }
docs: /*
  Validate a custom query before sending the request to the DB.