volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.56k stars 533 forks source link

sqlboiler model generation not working with Vitess (MySQL CNFC scalable) due to subqueries #1353

Closed aliaqa256 closed 4 months ago

aliaqa256 commented 4 months ago

I am encountering an issue with sqlboiler when using it with Vitess (a horizontally scalable MySQL implementation based on Google's PlanetScale). The functionality that reads the database and generates models is not working as expected.

Suspected cause: I believe the issue is likely related to the use of subqueries in my vanilla MySQL queries. Vitess might not be handling them correctly, causing problems during model generation.

Expected behavior:

sqlboiler should successfully read the database schema and generate the corresponding models without any errors.

stephenafamo commented 4 months ago

I do not consider this a bug since SQLBoiler does not claim to support Vitess. If you can replicate this on a regular MySQL database, then I will look more into it