Giter VIP home page Giter VIP logo

Comments (4)

caibirdme avatar caibirdme commented on July 24, 2024 1

应该是可以转成public方法的,我看看

from gendry.

caibirdme avatar caibirdme commented on July 24, 2024

你是说想实现类似于这样的效果吗:

NamedQuery(`select * from tb1 join tb2 where {{condition}}`, map[string]interface{}{
    "condition": WhereBuilder(whereMap),
})

from gendry.

Colstuwjx avatar Colstuwjx commented on July 24, 2024

@caibirdme 是的!

from gendry.

Colstuwjx avatar Colstuwjx commented on July 24, 2024

简单写了一下: 3058cf281f17, 但是仔细一想发现 NamedQuery 用的是 {{ xxx }} + map[string]interface{}{} 的写法来组合出最终语句的,而 BuildWhere 的话会直接产出 condvalues

感觉还是维持原样好一些吧,开放出构造 Where 子句的方法并没有真正需要消费它的地方。

from gendry.

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.