sqlc-dev / sqlc

Generate type-safe code from SQL
https://sqlc.dev
MIT License
13.38k stars 803 forks source link

delete generated Go files #105

Closed kevinburke1 closed 5 years ago

kevinburke1 commented 5 years ago

I dropped a table and removed the corresponding db/query/<table>.go file. However, src/internal/db/<table>.sql.go file was not deleted. I expected it to be deleted.

kyleconroy commented 5 years ago

Does protoc do this? I'm tempted to close this out as wontfix.

kevinburke1 commented 5 years ago

Good question, I'm not sure.

kyleconroy commented 5 years ago

I've tested the behavior of protoc. The generated files are not deleted. I'm content to do the same.

toqueteos commented 1 year ago

I've tested the behavior of protoc. The generated files are not deleted. I'm content to do the same.

I just renamed a table and discovered this behavior of sqlc, could we add a note somewhere in the docs that the out folder contents are not cleared upon calling sqlc generate? (although having an optional flag to do so would be a wonderful addition)