| | |
| | | switch (this.sqlOsType) { |
| | | case MYSQL: |
| | | Class.forName("com.mysql.jdbc.Driver").newInstance(); |
| | | conn = DriverManager.getConnection("jdbc:mysql://"+url, username, password); |
| | | conn = DriverManager.getConnection("jdbc:mysql://"+url+"?useSSL=false", username, password); |
| | | this.columns = getMysqlColumns(conn, table, true, sqlOsType); |
| | | break; |
| | | case SQL_SERVER: |
| | |
| | | sb.append(" <ReferenceInput\n"); |
| | | sb.append(" source=\"").append(column.getHumpName()).append("\"\n"); |
| | | sb.append(" reference=\"").append(GeneratorUtils.firstCharConvert(column.getForeignKey())).append("\"\n"); |
| | | sb.append(" perPage={REFERENCE_INPUT_PAGESIZE}\n"); |
| | | if (count == 0) { |
| | | sb.append(" autoFocus\n"); |
| | | } |
| | |
| | | case "Double": |
| | | if (!Cools.isEmpty(column.getForeignKeyMajor())) { |
| | | sb.append(" <ReferenceInput source=\"").append(column.getHumpName()).append("\" label=\"table.field.").append(simpleEntityName).append(".").append(column.getHumpName()).append("\" reference=\"").append(GeneratorUtils.firstCharConvert(column.getForeignKey())).append("\">\n"); |
| | | sb.append(" <AutocompleteInput label=\"table.field.").append(simpleEntityName).append(".").append(column.getHumpName()).append("\" optionText=\"").append(GeneratorUtils.firstCharConvert(column.getForeignKeyMajor())).append("\" />\n"); |
| | | sb.append(" <AutocompleteInput label=\"table.field.").append(simpleEntityName).append(".").append(column.getHumpName()).append("\" optionText=\"").append(GeneratorUtils.firstCharConvert(column.getForeignKeyMajor())).append("\" filterToQuery={(val) => ({ ").append(GeneratorUtils.firstCharConvert(column.getForeignKeyMajor())).append(": val })} />\n"); |
| | | sb.append(" </ReferenceInput>,\n"); |
| | | } else { |
| | | if (Cools.isEmpty(column.getEnums())) { |