elgris / sqrl

Fluent SQL generation for golang
MIT License
279 stars 38 forks source link

Allow Sqlizer as Expr arguments #3

Closed shaxbee closed 8 years ago

shaxbee commented 8 years ago

Allow Sqlizer values to be used in expr. To avoid overhead of creating buffer everytime old behaviour is used when no arguments match interface Sqlizer.

Example of usage:

sq.Select('foo', 'bar').From('baz').Where(Expr("EXISTS(?)",
  sq.Select('foo').From('bad').Where(Eq{"foo": 42})
))
shaxbee commented 8 years ago

@elgris Care to take a look?

elgris commented 8 years ago

Thanks again @shaxbee !