private static int addColumns(boolean mainSchema, DbTableOrView table, StringBuilder buff, int treeIndex, boolean showColumnTypes, StringBuilder columnsBuffer) { DbColumn[] columns = table.getColumns(); for (int i = 0; columns != null && i < columns.length; i++) { DbColumn column = columns[i]; if (columnsBuffer.length() > 0) { columnsBuffer.append(' '); } columnsBuffer.append(column.getName()); String col = escapeIdentifier(column.getName()); String level = mainSchema ? ", 1, 1" : ", 2, 2"; buff.append("setNode(").append(treeIndex).append(level) .append(", 'column', '") .append(PageParser.escapeJavaScript(column.getName())) .append("', 'javascript:ins(\\'").append(col).append("\\')');\n"); treeIndex++; if (mainSchema && showColumnTypes) { buff.append("setNode(").append(treeIndex) .append(", 2, 2, 'type', '") .append(PageParser.escapeJavaScript(column.getDataType())) .append("', null);\n"); treeIndex++; } } return treeIndex; }
String best = null; DbTableOrView last = sentence.getLastMatchedTable(); if (last != null && last.getColumns() != null) { for (DbColumn column : last.getColumns()) { String compare = up; String name = StringUtils.toUpperEnglish(column.getName()); continue; if (table == null || table.getColumns() == null) { continue; for (DbColumn column : table.getColumns()) { String name = StringUtils.toUpperEnglish(column .getName());
private static int addColumns(boolean mainSchema, DbTableOrView table, StringBuilder buff, int treeIndex, boolean showColumnTypes, StringBuilder columnsBuffer) { DbColumn[] columns = table.getColumns(); for (int i = 0; columns != null && i < columns.length; i++) { DbColumn column = columns[i]; if (columnsBuffer.length() > 0) { columnsBuffer.append(' '); } columnsBuffer.append(column.getName()); String col = escapeIdentifier(column.getName()); String level = mainSchema ? ", 1, 1" : ", 2, 2"; buff.append("setNode(" + treeIndex + level + ", 'column', '" + PageParser.escapeJavaScript(column.getName()) + "', 'javascript:ins(\\'" + col + "\\')');\n"); treeIndex++; if (mainSchema && showColumnTypes) { buff.append("setNode(" + treeIndex + ", 2, 2, 'type', '" + PageParser.escapeJavaScript(column.getDataType()) + "', null);\n"); treeIndex++; } } return treeIndex; }
private static int addColumns(boolean mainSchema, DbTableOrView table, StringBuilder buff, int treeIndex, boolean showColumnTypes, StringBuilder columnsBuffer) { DbColumn[] columns = table.getColumns(); for (int i = 0; columns != null && i < columns.length; i++) { DbColumn column = columns[i]; if (columnsBuffer.length() > 0) { columnsBuffer.append(' '); } columnsBuffer.append(column.getName()); String col = escapeIdentifier(column.getName()); String level = mainSchema ? ", 1, 1" : ", 2, 2"; buff.append("setNode(" + treeIndex + level + ", 'column', '" + PageParser.escapeJavaScript(column.getName()) + "', 'javascript:ins(\\'" + col + "\\')');\n"); treeIndex++; if (mainSchema && showColumnTypes) { buff.append("setNode(" + treeIndex + ", 2, 2, 'type', '" + PageParser.escapeJavaScript(column.getDataType()) + "', null);\n"); treeIndex++; } } return treeIndex; }
String best = null; DbTableOrView last = sentence.getLastMatchedTable(); if (last != null && last.getColumns() != null) { for (DbColumn column : last.getColumns()) { String compare = up; String name = StringUtils.toUpperEnglish(column.getName()); continue; if (table == null || table.getColumns() == null) { continue; for (DbColumn column : table.getColumns()) { String name = StringUtils.toUpperEnglish(column .getName());
String best = null; DbTableOrView last = sentence.getLastMatchedTable(); if (last != null && last.getColumns() != null) { for (DbColumn column : last.getColumns()) { String compare = up; String name = StringUtils.toUpperEnglish(column.getName()); continue; if (table == null || table.getColumns() == null) { continue; for (DbColumn column : table.getColumns()) { String name = StringUtils.toUpperEnglish(column .getName());