sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Added MySQL System Catalogs

Open terricain opened this issue 1 year ago • 2 comments

I started out looking at #1171, realising that sqlc already contains all of the Postgres catalogs, then realised we didn't have any MySQL ones. Made a copy of the sqlc-pg-gen tool for MySQL, then tweaked the codegen to exclude the right schemas from being dumped into the output.

Adds:

  • Tables, Views, Functions and Procedures from the mysql, information_schema, performance_schema and sys databases.
  • sqlc-dolphin-gen tool to dump the above from a MySQL cluster.

Changes:

  • Schema exclusion logic to exclude specific sets of schema depending on the engine in use.

Fixes:

  • Typo in sqlc-pg-gen

terricain avatar Jun 13 '24 19:06 terricain

Ah looks like the schema exclusion bit in internal/codegen/golang/result.go needs to be propagated to kotlin plugin

terricain avatar Jun 13 '24 19:06 terricain

Have updated the kotlin plugin here - https://github.com/sqlc-dev/sqlc-gen-kotlin/pull/24

terricain avatar Jun 13 '24 19:06 terricain