ClanCats / Hydrahon

🐉 Fast & standalone PHP MySQL Query Builder library.
https://clancats.io/hydrahon/master/
MIT License
278 stars 58 forks source link

Using SQL UNION / UNION ALL operator #15

Open samiharju opened 5 years ago

samiharju commented 5 years ago

Is there a possibility to create queries with the UNION or UNION ALL operator?

Something like this would be useful:

$h->table('students')
  ->select('column_name')
  ->union()
  ->table('teachers')
  ->select('column_name')
  ->get();

Resulting in:

SELECT column_name FROM students
UNION
SELECT column_name FROM teachers;
eurairapelli commented 4 years ago

Good night,,

Why not merge fork https://github.com/lucasnodari/Hydrahon with unionall in oficial Hydrahon?