sea-query icon indicating copy to clipboard operation
sea-query copied to clipboard

issues-118 Add SubQuery operator

Open ikrivosheev opened this issue 3 years ago • 1 comments

PR Info

  • Closes https://github.com/SeaQL/sea-query/issues/118
  • https://github.com/SeaQL/sea-query/issues/216

Adds

  • SubQuery operators: EXISTS, ALL, ANY, SOME

ikrivosheev avatar Jul 04 '22 17:07 ikrivosheev

@billy1624 @tyt2y3 can you review?) I have done.

ikrivosheev avatar Jul 17 '22 09:07 ikrivosheev

@billy1624 @tyt2y3 hello! I have small question. Expr::ne have signature: pub fn ne<V: Into<Value>>(self, v: V) -> SimpleExpr. If i rewrite this method to: pub fn ne<V: Into<SimpleExpr>>(self, v: V) -> SimpleExpr will not be so convenient to use for simple queries and it is breaking change. Should I add new method?

What is the best way to name new methods? For example:

  1. ne_expr?
  2. expr_ne?
  3. Something else?)

ikrivosheev avatar Aug 20 '22 12:08 ikrivosheev

Hey @ikrivosheev, good suggestions!! I do think we need eq_expr and ne_expr inside Expr. That's definitely nice to have.

billy1624 avatar Aug 29 '22 03:08 billy1624

Hey @ikrivosheev, good suggestions!! I do think we need eq_expr and ne_expr inside Expr. That's definitely nice to have.

@billy1624 hello! Done

ikrivosheev avatar Aug 31 '22 09:08 ikrivosheev

Hmm, @billy1624, I think about new method... Maybe is better impl From<T> for SimpleExpr, where T is all types for Value? And after that we don`t need new method. What do you think?

ikrivosheev avatar Sep 02 '22 08:09 ikrivosheev

Hmm, @billy1624, I think about new method... Maybe is better impl From<T> for SimpleExpr, where T is all types for Value? And after that we don`t need new method. What do you think?

@tyt2y3 what do you think about it?

ikrivosheev avatar Sep 07 '22 15:09 ikrivosheev

@billy1624 @tyt2y3 done! I add impl<T> From<T> for SimpleExpr and everything works without the new method!

ikrivosheev avatar Sep 08 '22 18:09 ikrivosheev

@billy1624 @tyt2y3 can you review this PR?

ikrivosheev avatar Sep 14 '22 07:09 ikrivosheev