Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

codean-io/sqlc-gen-python

 
 

Repository files navigation

Usage

version:'2'plugins:-name:pywasm:url:https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.2.0.wasmsha256:a6c5d174c407007c3717eea36ff0882744346e6ba991f92f71d6ab2895204c0esql:-schema:"schema.sql"queries:"query.sql"engine:postgresqlcodegen:  -out:src/authorsplugin:pyoptions:package:authorsemit_module:falseemit_generators:trueemit_async:false

Multiple packages

If you have have a mono-repository setup you may want to split the output of queries and models. You can achieve this by using theoutput_models_file_nameandoutput_querier_file fields. Ifoutput_models_file_name is set tonull for it will not output themodels.py file. Settingoutput_querier_file to false will prevent outputting any query files. Combining these you can set one codegen to only output models while the other codegen outputs only queries. Make sure thepackage configuration is set equally so the query files import correctly the models.

SQLC needs at least one query, so you may need to add a unused query like the following in your schema and reuse theschema asqueries.

-- name: Skip :oneSELECT1;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go99.0%
  • Other1.0%

[8]ページ先頭

©2009-2025 Movatter.jp