ecodeclub / eorm

简单 ORM 框架
Apache License 2.0
194 stars 64 forks source link

Like clause #15

Closed flycash closed 2 years ago

flycash commented 3 years ago

English Only

Please check existing issues first to avoid duplication and answer the questions below before submitting your issue.

Use case(s)

LIKE is simple. But I am thinking about, should we provide functions "HasSuffix, HasPrefix, Like".

(Please state use cases, what problem will this feature solve?)

Proposed Solution

At least we need one function:

func (p Predicate) Like(str string)

These functions are open to discuss:

func (p Predicate) HasPrefix(str string)
func (p Predicate) HasSuffix(str string)
func (p Predicate) Contains(str string)

(Please describe your proposed design/solution, if any)

Alternatives Considered

(Other possible options for solving the problem?)

Additional Context

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

(If you can, link to the line of code that might be helpful to explain the context)

github-actions[bot] commented 2 years ago

This issue is inactive for a long time.

github-actions[bot] commented 2 years ago

This issue is inactive for a long time.