Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused import "database/sql" in view models #1279

Open
adatob opened this issue May 30, 2023 · 2 comments
Open

Unused import "database/sql" in view models #1279

adatob opened this issue May 30, 2023 · 2 comments
Labels

Comments

@adatob
Copy link

adatob commented May 30, 2023

Hey, I've noticed that the model generator added unused "database/sql" import for SQL VIEW models.

image

version of SQLBoiler: 4.14.2

database version: Postgresql 10

@stephenafamo
Copy link
Collaborator

Can you share some sort of schema for the VIEW?

@adatob
Copy link
Author

adatob commented Jun 2, 2023

The view was created as follow:
CREATE OR REPLACE VIEW myschema.jets_pilots AS SELECT jets.id AS jet_id, jets.name as name, pilots.name AS pilot_name FROM myschema.jets AS jets LEFT JOIN myschema.pilots AS pilots ON pilots.id=jets.pilot_id;

Tables pilots and jets was created within myschema.

Sqlboiler invoked using command:
sqlboiler psql --debug --no-tests --add-enum-types --always-wrap-errors --pkgname myschema -c sqlboiler.toml -o sql/models/mydb/myschema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants