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

chore: split queries.sql into files by table#762

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
coadler merged 9 commits intomainfromcolin/query-files
Apr 1, 2022

Conversation

coadler
Copy link
Contributor

No description provided.

@coadlercoadler self-assigned thisMar 31, 2022
@codecov
Copy link

codecovbot commentedMar 31, 2022
edited
Loading

Codecov Report

Merging#762 (55476d7) intomain (2b1a0ee) willincrease coverage by1.67%.
The diff coverage isn/a.

@@            Coverage Diff             @@##             main     #762      +/-   ##==========================================+ Coverage   64.25%   65.93%   +1.67%==========================================  Files         199      200       +1       Lines       11861    13179    +1318       Branches       87       87              ==========================================+ Hits         7621     8689    +1068- Misses       3420     3603     +183- Partials      820      887      +67
FlagCoverage Δ
unittest-go-65.35% <ø> (+2.07%)⬆️
unittest-go-macos-latest52.35% <ø> (-6.64%)⬇️
unittest-go-ubuntu-latest55.14% <ø> (-6.75%)⬇️
unittest-go-windows-202251.85% <ø> (-6.31%)⬇️
unittest-js62.63% <ø> (ø)
Impacted FilesCoverage Δ
coderd/database/queries.sql.go83.30% <ø> (ø)
pty/start_other.go64.70% <0.00%> (-23.53%)⬇️
provisionersdk/serve.go35.13% <0.00%> (-8.11%)⬇️
coderd/provisionerdaemons.go60.03% <0.00%> (-3.04%)⬇️
coderd/parameter/compute.go74.07% <0.00%> (-2.23%)⬇️
coderd/workspaceresources.go57.72% <0.00%> (-1.63%)⬇️
provisionerd/provisionerd.go80.32% <0.00%> (-0.59%)⬇️
peer/conn.go79.18% <0.00%> (+0.76%)⬆️
cli/cliui/agent.go82.45% <0.00%> (+5.26%)⬆️
... and1 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update2b1a0ee...55476d7. Read thecomment docs.

Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not a fan of the Go files this generates.

It misuses_ inside of Go file names, and makes the majority of files in the database package generated, which makes others harder to read.

Is it possible to output all generated into a single file like before? I love the separated SQL files, but it seems unnecessary to have separated generated Go files.

@coadlercoadler marked this pull request as ready for reviewMarch 31, 2022 21:58
@@ -30,6 +30,7 @@ CREATE TABLE projects (

-- Enforces no active projects have the same name.
CREATE UNIQUE INDEX ON projects (organization_id, name) WHERE deleted = FALSE;
CREATE UNIQUE INDEX idx_projects_name_lower ON projects USING btree (lower(name));
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@kylecarbs we seemed to be querying these by their lowercase names so I added indexes for them as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ahh wise. Good change!

@coadlercoadler requested a review fromkylecarbsMarch 31, 2022 22:00
Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Minor things! Neat change.

--output ./coderd/database/query.sql
sed -i 's/@ /@/g' ./coderd/database/query.sql
fmt/sql: $(wildcard coderd/database/queries/*.sql)
# TODO: this is slightly slow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Could we use bash wait to make this faster?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The biggest problem is that it has to attempt to install vianpx every time, otherwise it's pretty fast! Cannpx be called concurrently?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ohhhhhh. I say we requiresql-formatter installed globally then.

@coadlercoadler merged commitfd52310 intomainApr 1, 2022
@coadlercoadler deleted the colin/query-files branchApril 1, 2022 20:45
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kylecarbskylecarbskylecarbs approved these changes

Assignees

@coadlercoadler

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@coadler@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp