class ScriptRead extends AbstractSqlRead {

    public ScriptRead(SQLParserVO config) {
        super(config);
    }

    @Override
    public boolean hasEnableFiled() {
        String scriptEnableField = super.config.getScriptEnableField();
        return StrUtil.isNotBlank(scriptEnableField);
    }

    @Override
    public boolean getEnableFiledValue(ResultSet rs) throws SQLException {
        String scriptEnableField = super.config.getScriptEnableField();
        byte enable = rs.getByte(scriptEnableField);

        return enable == 1;
    }

    @Override
    public String buildQuerySql() {
        String scriptTableName = super.config.getScriptTableName();
        String scriptApplicationNameField = super.config.getScriptApplicationNameField();

        return StrUtil.format(
                SqlReadConstant.SCRIPT_SQL_PATTERN,
                scriptTableName,
                scriptApplicationNameField);
    }

    @Override
    public void checkConfig() {
        String scriptTableName = super.config.getScriptTableName();
        String scriptIdField = super.config.getScriptIdField();
        String scriptDataField = super.config.getScriptDataField();
        String scriptTypeField = super.config.getScriptTypeField();
        String scriptApplicationNameField = super.config.getScriptApplicationNameField();

        if(StrUtil.isBlank(scriptTableName)){
            throw new ELSQLException("You did not define the scriptTableName property");
        }
        if(StrUtil.isBlank(scriptIdField)){
            throw new ELSQLException("You did not define the scriptIdField property");
        }
        if(StrUtil.isBlank(scriptDataField)){
            throw new ELSQLException("You did not define the scriptDataField property");
        }
        if(StrUtil.isBlank(scriptTypeField)){
            throw new ELSQLException("You did not define the scriptTypeField property");
        }
        if(StrUtil.isBlank(scriptApplicationNameField)){
            throw new ELSQLException("You did not define the scriptApplicationNameField property");
        }
    }

    @Override
    public String buildXmlElement(ResultSet rs) throws SQLException {
        String scriptDataField = super.config.getScriptDataField();

        return getStringFromRs(rs, scriptDataField);

    }

    @Override
    public String buildXmlElementUniqueKey(ResultSet rs) throws SQLException {<FILL_FUNCTION_BODY>}

    @Override
    public boolean needRead() {
        if (StrUtil.isBlank(super.config.getScriptTableName())) {
            return false;
        }

        String sqlCmd = StrUtil.format(
                SqlReadConstant.SCRIPT_SQL_CHECK_PATTERN,
                super.config.getScriptTableName()
        );

        Connection conn = LiteFlowJdbcUtil.getConn(super.config);
        return LiteFlowJdbcUtil.checkConnectionCanExecuteSql(conn, sqlCmd);
    }

    @Override
    public ReadType type() {
        return ReadType.SCRIPT;
    }

    /**
     * 脚本是否带语言
     */
    private boolean withLanguage() {
        return StrUtil.isNotBlank(super.config.getScriptLanguageField());
    }
}

        String scriptIdField = super.config.getScriptIdField();
        String scriptNameField = super.config.getScriptNameField();
        String scriptTypeField = super.config.getScriptTypeField();
        String scriptLanguageField = super.config.getScriptLanguageField();

        String id = getStringFromRsWithCheck(rs, scriptIdField);
        String name = getStringFromRsWithCheck(rs, scriptNameField);
        String type = getStringFromRsWithCheck(rs, scriptTypeField);
        String language = withLanguage() ? getStringFromRs(rs, scriptLanguageField) : null;

        NodeTypeEnum nodeTypeEnum = NodeTypeEnum.getEnumByCode(type);
        if (Objects.isNull(nodeTypeEnum)) {
            throw new ELSQLException(StrUtil.format("Invalid type value[{}]", type));
        }

        if (!nodeTypeEnum.isScript()) {
            throw new ELSQLException(StrUtil.format("The type value[{}] is not a script type", type));
        }

        if (withLanguage() && !ScriptTypeEnum.checkScriptType(language)) {
            throw new ELSQLException(StrUtil.format("The language value[{}] is invalid", language));
        }
        List<String> keys = CollUtil.newArrayList(id, type, name);
        if (StrUtil.isNotBlank(language)) {
            keys.add(language);
        }

        return StrUtil.join(StrUtil.COLON, keys);
    
<methods>public void <init>(com.yomahub.liteflow.parser.sql.vo.SQLParserVO) ,public abstract java.lang.String buildQuerySql() ,public abstract java.lang.String buildXmlElement(java.sql.ResultSet) throws java.sql.SQLException,public abstract java.lang.String buildXmlElementUniqueKey(java.sql.ResultSet) throws java.sql.SQLException,public abstract void checkConfig() ,public abstract boolean getEnableFiledValue(java.sql.ResultSet) throws java.sql.SQLException,public java.lang.String getStringFromRs(java.sql.ResultSet, java.lang.String) throws java.sql.SQLException,public java.lang.String getStringFromRsWithCheck(java.sql.ResultSet, java.lang.String) throws java.sql.SQLException,public abstract boolean hasEnableFiled() ,public boolean needRead() ,public Map<java.lang.String,java.lang.String> read() <variables>private static com.yomahub.liteflow.log.LFLog LOG,public final non-sealed com.yomahub.liteflow.parser.sql.vo.SQLParserVO config