Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adds a copyfrom to the output_file_name tests that support it
  • Loading branch information
XanderAtBackboneSystems committed Sep 15, 2023
commit d81f148731a6a5b6eef3ce215e4d24c19bd6a0d3
1 change: 1 addition & 0 deletions internal/cmd/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func pluginGoCode(s config.SQLGo) *plugin.GoCode {
OutputBatchFileName: s.OutputBatchFileName,
OutputModelsFileName: s.OutputModelsFileName,
OutputQuerierFileName: s.OutputQuerierFileName,
OutputCopyfromFileName: s.OutputCopyFromFileName,
OutputFilesSuffix: s.OutputFilesSuffix,
InflectionExcludeTableNames: s.InflectionExcludeTableNames,
QueryParameterLimit: s.QueryParameterLimit,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions internal/endtoend/testdata/output_file_names/pgx/v4/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ SELECT "user".* FROM "user";
-- name: UsersB :batchmany
SELECT * FROM "user"
WHERE id = $1;

-- name: UsersC :copyfrom
INSERT INTO "user"
(id)
VALUES
($1);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions internal/endtoend/testdata/output_file_names/pgx/v5/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ SELECT "user".* FROM "user";
-- name: UsersB :batchmany
SELECT * FROM "user"
WHERE id = $1;

-- name: UsersC :copyfrom
INSERT INTO "user"
(id)
VALUES
($1);
2 changes: 1 addition & 1 deletion protos/plugin/codegen.proto
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ message GoCode {
string output_db_file_name = 15;
string output_models_file_name = 16;
string output_querier_file_name = 17;
string output_copyfrom_file_name = 28;
string output_copyfrom_file_name = 28;
string output_files_suffix = 18;
bool emit_enum_valid_method = 19;
bool emit_all_enum_values = 20;
Expand Down