构建between区间查询的sqlInfo信息.
@param fieldText 字段文本值
@param startText 参数开始值
@param endText 参数结束值
@return 返回SqlInfo信息
553403
public SqlInfo buildBetweenSql(String fieldText, String startText, String endText) {
        // 获取开始属性值和结束属性值,作区间查询
        Object startValue = ParseHelper.parseExpress(startText, context);
        Object endValue = ParseHelper.parseExpress(endText, context);
        return super.buildBetweenSql(fieldText, startValue, endValue);
    }
1209590
public String getSnippet(LineColumn start, LineColumn end) {
        // preconditions
        if (start == null || end == null) { return null; } // no text to return
        if (start.equals(end)) { return null; } // no text to return
        if (lines.size() == 1 && current.length() == 0) { return null; } // buffer hasn't been filled yet

        // working variables
        int startLine = start.getLine();
        int startColumn = start.getColumn();
        int endLine = end.getLine();
        int endColumn = end.getColumn();

        // reset any out of bounds requests
        if (startLine < 1) { startLine = 1;}
        if (endLine < 1) { endLine = 1;}
        if (startColumn < 1) { startColumn = 1;}
        if (endColumn < 1) { endColumn = 1;}
        if (startLine > lines.size()) { startLine = lines.size(); }
        if (endLine > lines.size()) { endLine = lines.size(); }

        // obtain the snippet from the buffer within specified bounds
        StringBuilder snippet = new StringBuilder();
        for (int i = startLine - 1; i < endLine;i++) {
            String line = ((StringBuilder)lines.get(i)).toString();
            if (startLine == endLine) {
                // reset any out of bounds requests (again)
                if (startColumn > line.length()) { startColumn = line.length();}
                if (startColumn < 1) { startColumn = 1;}
                if (endColumn > line.length()) { endColumn = line.length() + 1;}
                if (endColumn < 1) { endColumn = 1;}
                if (endColumn < startColumn) { endColumn = startColumn;}

                line = line.substring(startColumn - 1, endColumn - 1);
            } else {
                if (i == startLine - 1) {
                    if (startColumn - 1 < line.length()) {
                        line = line.substring(startColumn - 1);
                    }
                }
                if (i == endLine - 1) {
                    if (endColumn - 1 < line.length()) {
                        line = line.substring(0,endColumn - 1);
                    }
                }
            }
            snippet.append(line);
        }
        return snippet.toString();
    }
296541
public SqlPara getSqlParaByString(String content, Map data) {
		Template template = engine.getTemplateByString(content);
		
		SqlPara sqlPara = new SqlPara();
		data.put(SQL_PARA_KEY, sqlPara);
		sqlPara.setSql(template.renderToString(data));
		data.remove(SQL_PARA_KEY);	// 避免污染传入的 Map
		return sqlPara;
	}
23772
public SpannableStringBuilder insert(int where, CharSequence tb, int start, int end) {
        return replace(where, where, tb, start, end);
    }
54776
@Override
    public int getNbLines() throws TechnicalException {
        String sqlRequest = "";
        try {
            final Path file = Paths.get(dataInPath + scenarioName + ".sql");
            sqlRequest = new String(Files.readAllBytes(file), Charset.forName(Constants.DEFAULT_ENDODING));
            sqlSanitized4readOnly(sqlRequest);
        } catch (final IOException e) {
            throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE) + e.getMessage(), e);
        }
        try (Connection connection = getConnection();
                Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                ResultSet rs = statement.executeQuery(sqlRequest);) {
            return rs.last() ? rs.getRow() + 1 : 0;
        } catch (final SQLException e) {
            logger.error("error DBDataProvider.getNbLines()", e);
            return 0;
        }
    }
919464
public void setTimeRange(String fieldName, Date startTime, Date endTime) {
		this.where += " and " + fieldName + ">=? and " + fieldName + "<=?";
		this.getParam().setDate(startTime);
		this.getParam().setDate(endTime);
	}
226155
public SqlInfo end() {
        SqlInfo sqlInfo = this.source.getSqlInfo();
        sqlInfo.setSql(StringHelper.replaceBlank(sqlInfo.getJoin().toString()));
        SqlInfoPrinter.newInstance().printZealotSqlInfo(sqlInfo, false, null, null);
        return sqlInfo;
    }
682843
public SqlInfo buildLikePatternSql(String fieldText, String pattern) {
        this.suffix = StringHelper.isBlank(this.suffix) ? ZealotConst.LIKE_KEY : this.suffix;
        join.append(prefix).append(fieldText).append(this.suffix).append("'").append(pattern).append("' ");
        return sqlInfo.setJoin(join);
    }
1182449
public int dataToField(Field field) throws DBException
    {
        return ((BaseBuffer)this.getDataSource()).getNextField((FieldInfo)field, Constants.DISPLAY, Constants.READ_MOVE);
    }
162675
@SuppressWarnings("unchecked")
    public static SqlInfo buildSqlInfo(String nameSpace, SqlInfo sqlInfo, Node node, Object paramObj) {
        // 获取所有子节点，并分别将其使用StringBuilder拼接起来
        List<Node> nodes = node.selectNodes(ZealotConst.ATTR_CHILD);
        for (Node n: nodes) {
            if (ZealotConst.NODETYPE_TEXT.equals(n.getNodeTypeName())) {
                // 如果子节点node 是文本节点，则直接获取其文本
                sqlInfo.getJoin().append(n.getText());
            } else if (ZealotConst.NODETYPE_ELEMENT.equals(n.getNodeTypeName())) {
                // 如果子节点node 是元素节点，则再判断其是什么元素，动态判断条件和参数
                ConditContext.buildSqlInfo(new BuildSource(nameSpace, sqlInfo, n, paramObj), n.getName());
            }
        }

        return buildFinalSql(sqlInfo, paramObj);
    }
604409
public Expression<Float> between(Float startValue, Float endValue) {
		String valueString = "'" + startValue + "' AND '" + endValue + "'";
		return new Expression<Float>(this, Operation.between, valueString);
	}
331504
@Override
    protected void appendFieldStart( final StringBuffer    buffer,
                                     final String          fieldName )
    {
        appendFieldSeparator( buffer );

        if ( isUseFieldNames() && fieldName != null )
        {
            buffer.append( fieldName );

            for ( int ii = 0; ii < ( 18 - fieldName.length()); ii++ )
            {
                buffer.append( " " );
            }

            buffer.append( getFieldNameValueSeparator() );
        }
    }
400217
def getAllText(cls, where=None, SEPERATOR=' ', orderBy=None):
        
        (sql, fields) = cls._prepareSQL("SELECTALL", where, orderBy=orderBy)
        curs = cls.cursor()
        curs.execute(sql)
        # We might start eating memory at this point
        rows = curs.fetchall()
        curs.close()
        result = []
        idPositions = [fields.index(key) for key in cls._sqlPrimary]
        shortPos = [fields.index(short) for short in cls._shortView]
        for row in rows:
            ids = [row[pos] for pos in idPositions]
            if len(idPositions) > 1:
                ids = tuple(ids)
            else:
                ids = ids[0]
            text = SEPERATOR.join([str(row[pos]) for pos in shortPos])
            result.append((ids, text))
        return result
81978
@Override
    public void _whereBetween(String fieldName, Object start, Object end, boolean exact) {
        fieldName = ensureValidFieldName(fieldName, false);

        List<QueryToken> tokens = getCurrentWhereTokens();
        appendOperatorIfNeeded(tokens);
        negateIfNeeded(tokens, fieldName);

        WhereParams startParams = new WhereParams();
        startParams.setValue(start);
        startParams.setFieldName(fieldName);

        WhereParams endParams = new WhereParams();
        endParams.setValue(end);
        endParams.setFieldName(fieldName);

        String fromParameterName = addQueryParameter(start == null ? "*" : transformValue(startParams, true));
        String toParameterName = addQueryParameter(end == null ? "NULL" : transformValue(endParams, true));

        WhereToken whereToken = WhereToken.create(WhereOperator.BETWEEN, fieldName, null, new WhereToken.WhereOptions(exact, fromParameterName, toParameterName));
        tokens.add(whereToken);
    }
991822
public static boolean isQuantifier(final String text, final int start, final int len){
        if(len < 2){
            return false;
        }
        //避免量词和不完整小数结合
        //.的值是46,/的值是47
        //判断前一个字符是否是.或/
        int index = start-1;
        if(index > -1 && (text.charAt(index) == 46 || text.charAt(index) == 47)){
            return false;
        }
        char lastChar = text.charAt(start+len-1);
        if(Quantifier.is(lastChar)
                && 
                (isNumber(text, start, len-1) || 
                isChineseNumber(text, start, len-1) || 
                isFraction(text, start, len-1)) ){
            if(LOGGER.isDebugEnabled()) {
                LOGGER.debug("识别数量词：" + text.substring(start, start + len));
            }
            return true;
        }
        return false;
    }
1046680
public void markText(String text, int startLineno, int startCharno,
      int endLineno, int endCharno) {
    if (currentMarker != null) {
      JSDocInfo.StringPosition position = new JSDocInfo.StringPosition();
      position.setItem(text);
      position.setPositionInformation(startLineno, startCharno,
          endLineno, endCharno);
      currentMarker.setDescription(position);
    }
  }
18217
String getPreparedStatementText(ControlBeanContext context, Method m, Object[] args) {
        StringBuilder sb = new StringBuilder();
        for (SqlFragment sf : _children) {
            sb.append(sf.getPreparedStatementText(context, m, args));
        }
        return sb.toString();
    }