Giter Club home page Giter Club logo

Comments (8)

RongNanNan avatar RongNanNan commented on July 30, 2024

catFilter打印sql参数时,List,是按照list的顺序打印,并不是按照真实parameterIndex的位置打的,如果set参数不是按照顺序的化,打印的有问题

from zebra.

8wy1985659 avatar 8wy1985659 commented on July 30, 2024

已修复
f2f750f

from zebra.

RongNanNan avatar RongNanNan commented on July 30, 2024

e,(?,?,?)调用:setString(3, '3')再setString(2, '2')再setString(1, '1')不会报错?

from zebra.

RongNanNan avatar RongNanNan commented on July 30, 2024

使用Set记录实现Comparable,或是提供比较器给外面
private static Comparator PARAM_COMPARATOR = new Comparator(){
@OverRide
public int compare(ParamContext paramContext1, ParamContext paramContext2) {
return paramContext1.getIndex() - paramContext2.getIndex();
}
};

from zebra.

8wy1985659 avatar 8wy1985659 commented on July 30, 2024

从使用方式上来讲 先setString(3, '3')再setString(2, '2')再setString(1, '1') 并不是必要需求
与其最后去compare 不如在插入时限定好顺序 我是这样理解的

from zebra.

RongNanNan avatar RongNanNan commented on July 30, 2024

我们的想法可能不一样,我的理解就是参数的打印顺序必须和sql里面的占位的顺序完全一致,而且没有文档标注必须按顺序进行参数设置,只要设置完全即可

另,如果不认同这个观点的话,建议还是不要修复了(交由别人的内部版本视情况修改),否则还会导致错误

from zebra.

8wy1985659 avatar 8wy1985659 commented on July 30, 2024

2种方案都可以保证打印顺序 不过开源版本确实应该考虑好兼容性 这里我同意你的观点
不过从实际使用上来讲 我确实觉得没有必要过于灵活

from zebra.

ainilife avatar ainilife commented on July 30, 2024

这个问题不大。按照你的这个要求去实现有点复杂,建议还是保持现状。无伤大雅。

from zebra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.