@Test public void testGetMetadata() { queryController.getMetadata(new MetaRequest(ProjectInstance.DEFAULT_PROJECT_NAME)); }
@RequestMapping(value = "/tables_and_columns", method = RequestMethod.GET) @ResponseBody public List<TableMeta> getMetadata(MetaRequest metaRequest) { try { return queryService.getMetadata(metaRequest.getProject()); } catch (SQLException e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e.getLocalizedMessage(), e); } }
QueryController extends BasicController { @RequestMapping(value = "/tables_and_columns", method = RequestMethod.GET) @ResponseBody public List<TableMeta> getMetadata(MetaRequest metaRequest) { try { return queryService.getMetadata(metaRequest.getProject()); } catch (SQLException e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e.getLocalizedMessage(), e); } } }
QueryController extends BasicController { @RequestMapping(value = "/tables_and_columns", method = RequestMethod.GET) @ResponseBody public List<TableMeta> getMetadata(MetaRequest metaRequest) { try { return queryService.getMetadata(metaRequest.getProject()); } catch (SQLException e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e.getLocalizedMessage(), e); } }  }
QueryController extends BasicController { @RequestMapping(value = "/tables_and_columns", method = RequestMethod.GET) @ResponseBody public List<TableMeta> getMetadata(MetaRequest metaRequest) { try { return queryService.getMetadata(metaRequest.getProject()); } catch (SQLException e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e.getLocalizedMessage(), e); } }  @RequestMapping(value = "/query", method = RequestMethod.POST) @ResponseBody @Timed(name = "query") SQLResponse query(@RequestBody SQLRequest sqlRequest); @RequestMapping(value = "/query/prestate", method = RequestMethod.POST, produces = "application/json") @ResponseBody @Timed(name = "query") SQLResponse prepareQuery(@RequestBody PrepareSqlRequest sqlRequest); @RequestMapping(value = "/saved_queries", method = RequestMethod.POST) @ResponseBody @Timed(name = "saveQuery") void saveQuery(@RequestBody SaveSqlRequest sqlRequest); @RequestMapping(value = "/saved_queries/{id}", method = RequestMethod.DELETE) @ResponseBody @Timed(name = "removeQuery") void removeQuery(@PathVariable String id); @RequestMapping(value = "/saved_queries", method = RequestMethod.GET) @ResponseBody @Timed(name = "getQueries") List<Query> getQueries(); @RequestMapping(value = "/query/format/{format}", method = RequestMethod.GET) @ResponseBody @Timed(name = "downloadResult") void downloadQueryResult(@PathVariable String format, SQLRequest sqlRequest, HttpServletResponse response); @RequestMapping(value = "/tables_and_columns", method = RequestMethod.GET) @ResponseBody List<TableMeta> getMetadata(MetaRequest metaRequest); void setQueryService(QueryService queryService); void setCacheManager(CacheManager cacheManager); }
QueryController extends BasicController { @RequestMapping(value = "/tables_and_columns", method = RequestMethod.GET) @ResponseBody public List<TableMeta> getMetadata(MetaRequest metaRequest) { try { return queryService.getMetadata(metaRequest.getProject()); } catch (SQLException e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e.getLocalizedMessage(), e); } }  @RequestMapping(value = "/query", method = RequestMethod.POST) @ResponseBody @Timed(name = "query") SQLResponse query(@RequestBody SQLRequest sqlRequest); @RequestMapping(value = "/query/prestate", method = RequestMethod.POST, produces = "application/json") @ResponseBody @Timed(name = "query") SQLResponse prepareQuery(@RequestBody PrepareSqlRequest sqlRequest); @RequestMapping(value = "/saved_queries", method = RequestMethod.POST) @ResponseBody @Timed(name = "saveQuery") void saveQuery(@RequestBody SaveSqlRequest sqlRequest); @RequestMapping(value = "/saved_queries/{id}", method = RequestMethod.DELETE) @ResponseBody @Timed(name = "removeQuery") void removeQuery(@PathVariable String id); @RequestMapping(value = "/saved_queries", method = RequestMethod.GET) @ResponseBody @Timed(name = "getQueries") List<Query> getQueries(); @RequestMapping(value = "/query/format/{format}", method = RequestMethod.GET) @ResponseBody @Timed(name = "downloadResult") void downloadQueryResult(@PathVariable String format, SQLRequest sqlRequest, HttpServletResponse response); @RequestMapping(value = "/tables_and_columns", method = RequestMethod.GET) @ResponseBody List<TableMeta> getMetadata(MetaRequest metaRequest); void setQueryService(QueryService queryService); void setCacheManager(CacheManager cacheManager); static final String SUCCESS_QUERY_CACHE; static final String EXCEPTION_QUERY_CACHE; }