MCPcopy Create free account
hub / github.com/ddf-project/DDF / showTables

Method showTables

core/src/main/java/io/ddf/etl/ASqlHandler.java:42–53  ·  view source on GitHub ↗

@brief Show tables in the database. @return The table names.

()

Source from the content-addressed store, hash-verified

40 * @return The table names.
41 */
42 public SqlResult showTables() throws DDFException {
43 List<String> tableNames = new ArrayList<String>();
44 for (DDF ddf : this.getManager().listDDFs()) {
45 if (ddf.getName() != null) {
46 tableNames.add(ddf.getName());
47 }
48 }
49 List<Column> columnList = new ArrayList<Column>();
50 columnList.add(new Column("table_name", Schema.ColumnType.STRING));
51 Schema schema = new Schema("tables", columnList);
52 return new SqlResult(schema, tableNames);
53 }
54
55 /**
56 * @brief Get the column information of this table.

Callers 1

sqlHandleMethod · 0.95

Calls 4

getNameMethod · 0.65
addMethod · 0.65
listDDFsMethod · 0.45
getManagerMethod · 0.45

Tested by

no test coverage detected