/** * Get the complete TapSchema. * * @return complete TapSchema */ public TapSchema get() { // depth MIN = schemas and tables // depth MAX = columns + keys + functions return get(MAX_DEPTH); }
/** * Create and configure a TapSchemaDAO instance. * * @return */ protected final TapSchemaDAO getTapSchemaDAO() { PluginFactory pf = new PluginFactory(); TapSchemaDAO dao = pf.getTapSchemaDAO(); DataSource ds = getDataSource(); dao.setDataSource(ds); dao.setOrdered(true); return dao; }
protected TapSchemaDAO getTapSchemaDAO() { return new TapSchemaDAO(); }
dao.setDataSource(ds); dao.setOrdered(true); TableDesc td = dao.getTable(tableName); if (td == null) throw new NoSuchElementException("not found: " + tableName); TapSchema tapSchema = dao.get(depth); TableSetWriter tsw = new TableSetWriter(); response.setStatus(HttpServletResponse.SC_OK);
ts.setDataSource(ds); TableDesc td = ts.getTable(tableName); if (td != null) { throw new ResourceAlreadyExistsException("table " + tableName + " already exists"); ts.put(inputTable);
addTablesToSchemas(schemaDescs, tableDescs); addColumnsToTables(tableDescs, columnDescs); addKeyColumnsToKeys(keyDescs, keyColumnDescs); addForeignKeys(schemaDescs, keyDescs); ret.getFunctionDescs().addAll(getFunctionDescs()); return ret;
dao.setDataSource(tapSchemaDataSource); TapSchema tapSchema = dao.get();
ts.setDataSource(ds); ts.delete(tableName);
public PreparedStatement createPreparedStatement(Connection conn) throws SQLException { StringBuilder sb = new StringBuilder(); sb.append("SELECT ").append(toCommaList(tsSchemaCols, 0)); sb.append(" FROM ").append(tap_schema_tab); // customisation String tmp = appendWhere(tap_schema_tab, sb.toString()); sb = new StringBuilder(); sb.append(tmp); if (orderBy != null) sb.append(orderBy); String sql = sb.toString(); log.debug(sql); PreparedStatement prep = conn.prepareStatement(sql); return prep; } }
addKeyColumnsToKeys(keyDescs, keyColumnDescs); ret.getKeyDescs().addAll(keyDescs);
ts.setDataSource(ds); TableDesc td = ts.getTable(tableName); if (td == null) { ts.put(td);
String tmp = appendWhere(tap_schema_tab, sb.toString());
String tmp = appendWhere(tap_schema_tab, sb.toString());
public TapSchemaDAO getTapSchemaDAO() { final TapSchemaDAO ret; String name = TapSchemaDAO.class.getName(); String cname = config.getProperty(name); if (cname == null) { ret = new TapSchemaDAO(); } else { try { Class c = Class.forName(cname); ret = (TapSchemaDAO) c.newInstance(); } catch (Throwable ex) { throw new RuntimeException("config error: failed to create TapSchemaDAO " + cname, ex); } } return ret; } }
String tmp = appendWhere(tap_schema_tab, sb.toString());
String tmp = appendWhere(tap_schema_tab, sb.toString());