新增: 加载自段

master
曹世达 6 months ago
parent 02c9281c98
commit 17011d5d0b

@ -0,0 +1,58 @@
package space.caoshd.otone.builder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import space.caoshd.otone.entity.ColumnInfo;
import space.caoshd.otone.tool.PropertyTools;
import space.caoshd.otone.util.ConfigConsts;
import space.caoshd.otone.util.DataTypeUtils;
import space.caoshd.otone.util.DatabaseUtils;
import space.caoshd.otone.util.PropertiesConsts;
import space.caoshd.otone.util.SqlConsts;
import space.caoshd.otone.util.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
public class FieldBuilder {
private static final Logger LOGGER = LoggerFactory.getLogger(TableBuilder.class);
private static final PropertyTools sqlProperties =
new PropertyTools(PropertiesConsts.MYSQL_PROPERTIES_PATH);
private static final PropertyTools configProperties =
new PropertyTools(PropertiesConsts.CONFIG_PROPERTIES_PATH);
public static List<ColumnInfo> loadFieldInfo(String schemaName, String tableName) {
String sql = sqlProperties.getString(SqlConsts.COLUMN_SQL_SCHEMA_TABLE);
List<String> params = Arrays.asList(schemaName, tableName);
List<Map<String, String>> columns = DatabaseUtils.list(sql, params);
List<ColumnInfo> result = new ArrayList<>();
for (Map<String, String> field : columns) {
result.add(createFiledInfo(field));
}
return result;
}
private static ColumnInfo createFiledInfo(Map<String, String> column) {
ColumnInfo result = new ColumnInfo();
String columnComment = sqlProperties.getString(SqlConsts.LABEL_COLUMN_COMMENT);
result.setComment(column.get(columnComment));
String columnName = sqlProperties.getString(SqlConsts.LABEL_COLUMN_NAME);
result.setColumnName(column.get(columnName));
String propertyName = StringUtils.toCamelCase(result.getColumnName(), false);
result.setPropertyName(propertyName);
String sqlDataType = sqlProperties.getString(SqlConsts.LABEL_DATA_TYPE);
result.setSqlDataType(column.get(sqlDataType));
String javaDataType = DataTypeUtils.toJavaDataType(result.getSqlDataType());
result.setJavaDataType(javaDataType);
String extra = sqlProperties.getString(SqlConsts.LABEL_EXTRA);
result.setAutoIncrement(column.get(extra).contains(SqlConsts.VALUE_AUTO_INCREMENT));
return result;
}
}

@ -4,13 +4,15 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import space.caoshd.otone.entity.TableInfo;
import space.caoshd.otone.tool.PropertyTools;
import space.caoshd.otone.util.ConfigConstants;
import space.caoshd.otone.util.ConfigConsts;
import space.caoshd.otone.util.DatabaseUtils;
import space.caoshd.otone.util.PropertiesConstants;
import space.caoshd.otone.util.SqlConstants;
import space.caoshd.otone.util.PropertiesConsts;
import space.caoshd.otone.util.SqlConsts;
import space.caoshd.otone.util.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@ -19,31 +21,43 @@ public class TableBuilder {
private static final Logger LOGGER = LoggerFactory.getLogger(TableBuilder.class);
private static final PropertyTools sqlProperties =
new PropertyTools(PropertiesConsts.MYSQL_PROPERTIES_PATH);
private static final PropertyTools configProperties =
new PropertyTools(PropertiesConsts.CONFIG_PROPERTIES_PATH);
public static List<TableInfo> loadTableInfo() {
List<TableInfo> result = new ArrayList<>();
PropertyTools configProperties =
new PropertyTools(PropertiesConstants.CONFIG_PROPERTIES_PATH);
List<String> schemaNames = configProperties.getStrings(ConfigConstants.SCHEMA_NAMES);
List<String> schemaNames = configProperties.getStrings(ConfigConsts.SCHEMA_NAMES);
if (schemaNames.isEmpty()) {
// TODO LOAD CURRENT SCHEMA
String sql = sqlProperties.getString(SqlConsts.TABLE_SQL);
List<Map<String, String>> tables = DatabaseUtils.list(sql);
for (Map<String, String> table : tables) {
result.add(createTableInfo(table));
}
} else {
for (String schemaName : schemaNames) {
result.addAll(loadTableInfo(schemaName));
}
}
System.out.println(result);
return result;
}
public static List<TableInfo> loadTableInfo(String schema) {
public static List<TableInfo> loadTableInfo(String schemaName) {
List<TableInfo> result = new ArrayList<>();
PropertyTools configProperties =
new PropertyTools(PropertiesConstants.CONFIG_PROPERTIES_PATH);
List<String> tables = configProperties.getStrings(ConfigConstants.TABLE_NAMES);
if (tables.isEmpty()) {
// TODO LOAD ALL TABLE
List<String> tableNames = configProperties.getStrings(ConfigConsts.TABLE_NAMES);
if (tableNames.isEmpty()) {
String sql = sqlProperties.getString(SqlConsts.TABLE_SQL_SCHEMA);
List<String> params = Collections.singletonList(schemaName);
List<Map<String, String>> tables = DatabaseUtils.list(sql, params);
for (Map<String, String> table : tables) {
result.add(createTableInfo(table));
}
} else {
for (String table : tables) {
TableInfo tableInfo = loadTableInfo(schema, table);
for (String tableName : tableNames) {
TableInfo tableInfo = loadTableInfo(schemaName, tableName);
if (Objects.nonNull(tableInfo)) {
result.add(tableInfo);
}
@ -53,21 +67,53 @@ public class TableBuilder {
}
public static TableInfo loadTableInfo(String schemaName, String tableName) {
PropertyTools sqlProperties = new PropertyTools(PropertiesConstants.MYSQL_PROPERTIES_PATH);
String sql = sqlProperties.getString(SqlConstants.TABLE_DETAIL_SQL_SCHEMA_TABLE);
String sql = sqlProperties.getString(SqlConsts.TABLE_SQL_SCHEMA_TABLE);
List<String> params = Arrays.asList(schemaName, tableName);
Map<String, String> table = DatabaseUtils.one(sql, params);
if (Objects.isNull(table)) {
LOGGER.warn("table: [{}] not exists", tableName);
return null;
}
return createTableInfo(table);
}
private static TableInfo createTableInfo(Map<String, String> table) {
TableInfo result = new TableInfo();
result.setTableName(tableName);
String tableCommentLabel =
sqlProperties.getString(SqlConstants.TABLE_DETAIL_LABEL_TABLE_COMMENT);
String comment = table.get(tableCommentLabel);
result.setComment(comment);
String tableSchema = sqlProperties.getString(SqlConsts.LABEL_TABLE_SCHEMA);
result.setTableSchema(table.get(tableSchema));
String tableComment = sqlProperties.getString(SqlConsts.LABEL_TABLE_COMMENT);
result.setComment(table.get(tableComment));
String tableName = sqlProperties.getString(SqlConsts.LABEL_TABLE_NAME);
result.setTableName(table.get(tableName));
String tableNameWithoutPrefix = getTableNameWithoutPrefix(result.getTableName());
String beanName = StringUtils.toCamelCase(tableNameWithoutPrefix, true);
result.setBeanName(beanName);
String suffix =
StringUtils.defaultIfBlank(
configProperties.getString(ConfigConsts.BEAN_SUFFIX),
ConfigConsts.VALUE_BEAN_SUFFIX
);
result.setQueryBeanName(beanName + suffix);
result.setFieldInfoList(FieldBuilder.loadFieldInfo(
result.getTableSchema(),
result.getTableName()
));
return result;
}
private static String getTableNameWithoutPrefix(String tableNameWithoutPrefix) {
List<String> tablePrefixes = configProperties.getStrings(ConfigConsts.TABLE_PREFIXIES);
for (String tablePrefix : tablePrefixes) {
tableNameWithoutPrefix = StringUtils.removePrefix(tableNameWithoutPrefix, tablePrefix);
}
return tableNameWithoutPrefix;
}
}

@ -0,0 +1,77 @@
package space.caoshd.otone.entity;
public class ColumnInfo {
private String columnName;
private String propertyName;
private String sqlDataType;
private String javaDataType;
private String comment;
private Boolean autoIncrement;
public String getColumnName() {
return columnName;
}
public void setColumnName(String columnName) {
this.columnName = columnName;
}
public String getPropertyName() {
return propertyName;
}
public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}
public String getSqlDataType() {
return sqlDataType;
}
public void setSqlDataType(String sqlDataType) {
this.sqlDataType = sqlDataType;
}
public String getJavaDataType() {
return javaDataType;
}
public void setJavaDataType(String javaDataType) {
this.javaDataType = javaDataType;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Boolean getAutoIncrement() {
return autoIncrement;
}
public void setAutoIncrement(Boolean autoIncrement) {
this.autoIncrement = autoIncrement;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("ColumnInfo{");
sb.append("columnName='").append(columnName).append('\'');
sb.append(", propertyName='").append(propertyName).append('\'');
sb.append(", sqlType='").append(sqlDataType).append('\'');
sb.append(", javaType='").append(javaDataType).append('\'');
sb.append(", comment='").append(comment).append('\'');
sb.append(", autoIncrement=").append(autoIncrement);
sb.append('}');
return sb.toString();
}
}

@ -1,64 +0,0 @@
package space.caoshd.otone.entity;
public class FieldInfo {
private String fieldName;
private String propertyName;
private String sqlType;
private String javaType;
private String comment;
private Boolean autoIncrement;
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public String getPropertyName() {
return propertyName;
}
public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}
public String getSqlType() {
return sqlType;
}
public void setSqlType(String sqlType) {
this.sqlType = sqlType;
}
public String getJavaType() {
return javaType;
}
public void setJavaType(String javaType) {
this.javaType = javaType;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Boolean getAutoIncrement() {
return autoIncrement;
}
public void setAutoIncrement(Boolean autoIncrement) {
this.autoIncrement = autoIncrement;
}
}

@ -9,17 +9,17 @@ public class TableInfo {
private String comment;
private String tableSchema;
private String tableName;
private String beanName;
private String beanParamName;
private List<FieldInfo> fieldInfoList = new ArrayList<>();
private String queryBeanName;
private Map<String, List<FieldInfo>> indexMap = new LinkedHashMap<>();
private List<ColumnInfo> columnInfoList = new ArrayList<>();
private Boolean booleanExists;
private Map<String, List<ColumnInfo>> indexMap = new LinkedHashMap<>();
private Boolean dateExists;
@ -35,6 +35,14 @@ public class TableInfo {
this.comment = comment;
}
public String getTableSchema() {
return tableSchema;
}
public void setTableSchema(String tableSchema) {
this.tableSchema = tableSchema;
}
public String getTableName() {
return tableName;
}
@ -51,19 +59,55 @@ public class TableInfo {
this.beanName = beanName;
}
public String getBeanParamName() {
return beanParamName;
public String getQueryBeanName() {
return queryBeanName;
}
public void setQueryBeanName(String queryBeanName) {
this.queryBeanName = queryBeanName;
}
public void setBeanParamName(String beanParamName) {
this.beanParamName = beanParamName;
public List<ColumnInfo> getFieldInfoList() {
return columnInfoList;
}
public List<FieldInfo> getFieldInfoList() {
return fieldInfoList;
public void setFieldInfoList(List<ColumnInfo> columnInfoList) {
this.columnInfoList = columnInfoList;
}
public void setFieldInfoList(List<FieldInfo> fieldInfoList) {
this.fieldInfoList = fieldInfoList;
public Map<String, List<ColumnInfo>> getIndexMap() {
return indexMap;
}
public void setIndexMap(Map<String, List<ColumnInfo>> indexMap) {
this.indexMap = indexMap;
}
public Boolean getDateExists() {
return dateExists;
}
public Boolean getBigDecimalExists() {
return bigDecimalExists;
}
@Override
public String toString() {
return String.format(
"TableInfo{comment='%s', tableSchema='%s', tableName='%s', beanName='%s', "
+ "queryBeanName='%s', fieldInfoList=%s, indexMap=%s,"
+ "dateExists=%s, dateTimeExists=%s, bigDecimalExists=%s}",
comment,
tableSchema,
tableName,
beanName,
queryBeanName,
columnInfoList,
indexMap,
dateExists,
dateTimeExists,
bigDecimalExists
);
}
}

@ -1,6 +1,8 @@
package space.caoshd.otone.util;
public class ConfigConstants {
public class ConfigConsts {
private ConfigConsts() {}
public static final String SCHEMA_NAMES = "database.schemas";
@ -8,5 +10,7 @@ public class ConfigConstants {
public static final String TABLE_PREFIXIES = "table.prefixes";
public static final String BEAN_SUFFIX = "bean.suffix";
public static final String VALUE_BEAN_SUFFIX = "Query";
}

@ -0,0 +1,59 @@
package space.caoshd.otone.util;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class DataTypeUtils {
public static final List<String> SQL_TYPE_DATE_TIME = Arrays.asList("datetime", "timestamp");
public static final List<String> SQL_TYPE_DATE = Collections.singletonList("date");
public static final List<String> SQL_TYPE_DECIMAL = Arrays.asList("decimal", "double", "float");
public static final List<String> SQL_TYPE_STRING = Arrays.asList(
"char",
"varchar",
"text",
"mediumtext",
"longtext"
);
public static final List<String> SQL_TYPE_INT = Arrays.asList("int", "tinyint");
public static final List<String> SQL_TYPE_LONG = Collections.singletonList("bigint");
public static final String JAVA_TYPE_STRING = "String";
public static final String JAVA_TYPE_INTEGER = "Integer";
public static final String JAVA_TYPE_LONG= "Long";
public static final String JAVA_TYPE_DECIMAL= "BigDecimal";
public static final String JAVA_TYPE_DATE= "Date";
public static String toJavaDataType(String sqlDataType) {
if (SQL_TYPE_STRING.contains(sqlDataType)) {
return JAVA_TYPE_STRING;
}
if (SQL_TYPE_INT.contains(sqlDataType)) {
return JAVA_TYPE_INTEGER;
}
if (SQL_TYPE_LONG.contains(sqlDataType)) {
return JAVA_TYPE_LONG;
}
if (SQL_TYPE_DATE.contains(sqlDataType)) {
return JAVA_TYPE_DATE;
}
if (SQL_TYPE_DATE_TIME.contains(sqlDataType)) {
return JAVA_TYPE_DATE;
}
if (SQL_TYPE_DECIMAL.contains(sqlDataType)) {
return JAVA_TYPE_DECIMAL;
}
throw new RuntimeException("unknown sql type:" + sqlDataType);
}
}

@ -20,7 +20,7 @@ public class DatabaseUtils {
public static Connection getConnection() {
try {
InputStream datasourcePropertiesStream = ResourceUtils.getClassPathFileStream(
PropertiesConstants.DATASOURCE_PROPERTIES_PATH);
PropertiesConsts.DATASOURCE_PROPERTIES_PATH);
PropertyTools propertyTools = new PropertyTools(datasourcePropertiesStream);
String username = propertyTools.getString("username");
String password = propertyTools.getString("password");
@ -34,6 +34,10 @@ public class DatabaseUtils {
}
public static List<Map<String, String>> list(String sql) {
return list(sql, new ArrayList<>());
}
public static List<Map<String, String>> list(String sql, List<?> params) {
try (Connection connection = getConnection()) {
List<Map<String, String>> result = new ArrayList<>();
@ -45,13 +49,13 @@ public class DatabaseUtils {
ResultSetMetaData metaData = resultSet.getMetaData();
int columnCount = metaData.getColumnCount();
while (resultSet.next()) {
Map<String, String> row = new HashMap<>();
for (int i = 1; i <= columnCount; i++) {
Map<String, String> row = new HashMap<>();
String columnLabel = metaData.getColumnLabel(i);
String columnValue = resultSet.getString(i);
row.put(columnLabel.toUpperCase(), columnValue);
result.add(row);
}
result.add(row);
}
return result;
} catch (Exception e) {

@ -1,8 +1,8 @@
package space.caoshd.otone.util;
public class PropertiesConstants {
public class PropertiesConsts {
public PropertiesConstants() {}
public PropertiesConsts() {}
public static final String DATASOURCE_PROPERTIES_PATH = "datasource.properties";

@ -1,18 +0,0 @@
package space.caoshd.otone.util;
public class SqlConstants {
private SqlConstants() {}
public static final String TABLE_DETAIL_SQL = "table.detail.sql";
public static final String TABLE_DETAIL_SQL_SCHEMA = "table.detail.sql.schema";
public static final String TABLE_DETAIL_SQL_SCHEMA_TABLE = "table.detail.sql.schema.table";
public static final String TABLE_DETAIL_LABEL_TABLE_NAME = "table.detail.label.table-name";
public static final String TABLE_DETAIL_LABEL_TABLE_COMMENT =
"table.detail.label.table-comment";
}

@ -0,0 +1,31 @@
package space.caoshd.otone.util;
public class SqlConsts {
private SqlConsts() {}
public static final String TABLE_SQL = "table.sql";
public static final String TABLE_SQL_SCHEMA = "table.sql.schema";
public static final String TABLE_SQL_SCHEMA_TABLE = "table.sql.schema.table";
public static final String COLUMN_SQL_SCHEMA_TABLE = "column.sql.schema.table";
public static final String LABEL_TABLE_NAME = "label.table_name";
public static final String LABEL_TABLE_SCHEMA = "label.table_schema";
public static final String LABEL_TABLE_COMMENT = "label.table_comment";
public static final String LABEL_COLUMN_NAME = "label.column_name";
public static final String LABEL_COLUMN_COMMENT = "label.column_comment";
public static final String LABEL_DATA_TYPE = "label.data_type";
public static final String LABEL_EXTRA = "label.extra";
public static final String VALUE_AUTO_INCREMENT = "auto_increment";
}

@ -0,0 +1,52 @@
package space.caoshd.otone.util;
public class StringUtils {
private StringUtils() {}
public static String last(String str, String regex) {
String[] split = str.split(regex);
return split.length >= 1 ? split[split.length - 1] : "";
}
public static String first(String str, String regex) {
String[] split = str.split(regex);
return split.length >= 1 ? split[0] : "";
}
public static String removePrefix(String str, String prefix) {
if (str.startsWith(prefix)) {
return str.substring(prefix.length());
} else {
return str;
}
}
public static String defaultIfBlank(String str, String defaultStr) {
if (str == null || str.trim().isEmpty()) {
return defaultStr;
}
return str;
}
public static String toCamelCase(String str, boolean capitalizeFirstLetter) {
String lowerCaseStr = str.toLowerCase();
StringBuilder sb = new StringBuilder();
boolean upperCase = capitalizeFirstLetter;
for (int i = 0; i < lowerCaseStr.length(); i++) {
char c = lowerCaseStr.charAt(i);
if (c == '_') {
upperCase = true;
} else {
if (upperCase) {
sb.append(Character.toUpperCase(c));
upperCase = false;
} else {
sb.append(c);
}
}
}
return sb.toString();
}
}

@ -1,3 +1,4 @@
database.schemas=otone
table.names=t_file_export_instance,t_file_export_path,t_file_export_type_text,t_file_export_workspace
table.prefixes=t_,m_
#database.schemas=otone
#table.names=t_file_export_instance,t_file_export_path,t_file_export_type_text,t_file_export_workspace
table.prefixes=t_,m_
bean.suffix=Query

@ -1,5 +1,13 @@
table.detail.sql=select * from information_schema.tables
table.detail.sql.schema=select * from information_schema.tables where table_schema = ?
table.detail.sql.schema.table=select * from information_schema.tables where table_schema = ? and table_name = ?
table.detail.label.table-name=TABLE_NAME
table.detail.label.table-comment=TABLE_COMMENT
table.sql=select * from information_schema.tables where TABLE_SCHEMA not in ('mysql', 'information_schema', 'performance_schema', 'sys')
table.sql.schema=select * from information_schema.tables where table_schema = ?
table.sql.schema.table=select * from information_schema.tables where table_schema = ? and table_name = ?
column.sql.schema.table=select * from information_schema.columns where TABLE_SCHEMA = ? and table_name = ?
label.table_schema=TABLE_SCHEMA
label.table_name=TABLE_NAME
label.table_comment=TABLE_COMMENT
label.column_name=COLUMN_NAME
label.column_comment=COLUMN_COMMENT
label.data_type=DATA_TYPE

@ -2,8 +2,8 @@ package space.caoshd.otone.tool;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import space.caoshd.otone.util.ConfigConstants;
import space.caoshd.otone.util.PropertiesConstants;
import space.caoshd.otone.util.ConfigConsts;
import space.caoshd.otone.util.PropertiesConsts;
import space.caoshd.otone.util.ResourceUtils;
import java.io.*;
@ -13,7 +13,7 @@ class PropertyToolsTest {
@Test
void loadProperties() {
InputStream fileStream = ResourceUtils.getClassPathFileStream(PropertiesConstants.DATASOURCE_PROPERTIES_PATH);
InputStream fileStream = ResourceUtils.getClassPathFileStream(PropertiesConsts.DATASOURCE_PROPERTIES_PATH);
PropertyTools propertyTools = new PropertyTools(fileStream);
Assertions.assertNotNull(propertyTools);
}
@ -24,9 +24,9 @@ class PropertyToolsTest {
@Test
void getStrings() {
InputStream fileStream = ResourceUtils.getClassPathFileStream(PropertiesConstants.CONFIG_PROPERTIES_PATH);
InputStream fileStream = ResourceUtils.getClassPathFileStream(PropertiesConsts.CONFIG_PROPERTIES_PATH);
PropertyTools configProperties = new PropertyTools(fileStream);
List<String> strings = configProperties.getStrings(ConfigConstants.TABLE_PREFIXIES);
List<String> strings = configProperties.getStrings(ConfigConsts.TABLE_PREFIXIES);
System.out.println(strings);
}

@ -12,12 +12,12 @@ class DatabaseUtilsTest {
@Test
void executeQuery() {
PropertyTools sqlProperties = new PropertyTools(PropertiesConstants.MYSQL_PROPERTIES_PATH);
String sql = sqlProperties.getString(SqlConstants.TABLE_DETAIL_SQL_SCHEMA_TABLE);
PropertyTools sqlProperties = new PropertyTools(PropertiesConsts.MYSQL_PROPERTIES_PATH);
String sql = sqlProperties.getString(SqlConsts.TABLE_SQL_SCHEMA_TABLE);
PropertyTools configProperties =
new PropertyTools(PropertiesConstants.CONFIG_PROPERTIES_PATH);
List<String> schemas = configProperties.getStrings(ConfigConstants.SCHEMA_NAMES);
List<String> tables = configProperties.getStrings(ConfigConstants.TABLE_NAMES);
new PropertyTools(PropertiesConsts.CONFIG_PROPERTIES_PATH);
List<String> schemas = configProperties.getStrings(ConfigConsts.SCHEMA_NAMES);
List<String> tables = configProperties.getStrings(ConfigConsts.TABLE_NAMES);
List<Object> params = Arrays.asList(schemas.get(0), tables.get(0));
List<Map<String, String>> maps = DatabaseUtils.list(sql, params);
Assertions.assertFalse(maps.isEmpty());

@ -0,0 +1,29 @@
package space.caoshd.otone.util;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class StringUtilsTest {
@Test
void last() {
}
@Test
void first() {
}
@Test
void removePrefix(){
String username = StringUtils.removePrefix("t_user_name", "t_");
System.out.println(username);
}
@Test
void toCamelCase() {
String userName = StringUtils.toCamelCase("user_name", false);
String className = StringUtils.toCamelCase("class_name", true);
System.out.println(userName);
System.out.println(className);
}
}

@ -1,3 +1,4 @@
database.schemas=otone
table.names=t_file_export_instance,t_file_export_path,t_file_export_type_text,t_file_export_workspace
table.prefixes=t_,m_
#database.schemas=otone
#table.names=t_file_export_instance,t_file_export_path,t_file_export_type_text,t_file_export_workspace
#bean.suffix=Query
table.prefixes=t_,m_

@ -1,5 +1,13 @@
table.detail.sql=select * from information_schema.tables
table.detail.sql.schema=select * from information_schema.tables where table_schema = ?
table.detail.sql.schema.table=select * from information_schema.tables where table_schema = ? and table_name = ?
table.detail.label.table-name=TABLE_NAME
table.detail.label.table-comment=TABLE_COMMENT
table.sql=select * from information_schema.tables where TABLE_SCHEMA not in ('mysql', 'information_schema', 'performance_schema', 'sys')
table.sql.schema=select * from information_schema.tables where table_schema = ?
table.sql.schema.table=select * from information_schema.tables where table_schema = ? and table_name = ?
column.sql.schema.table=select * from information_schema.columns where TABLE_SCHEMA = ? and table_name = ?
label.table_schema=TABLE_SCHEMA
label.table_name=TABLE_NAME
label.table_comment=TABLE_COMMENT
label.column_name=COLUMN_NAME
label.column_comment=COLUMN_COMMENT
label.data_type=DATA_TYPE
label.extra=EXTRA

Loading…
Cancel
Save