Skip to content

feat: add SQL queries for v2 PG Coordinator #10572

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

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

spikecurtis
Copy link
Contributor

re #10528

Adds SQL queries to support Tailnet v2 API in the PG Coordinator

Copy link
Contributor Author

spikecurtis commented Nov 8, 2023

@spikecurtis spikecurtis force-pushed the spike/10528-sql-queries branch from e9ec10d to b0c48ca Compare November 14, 2023 06:55
updated_at
)
VALUES
($1, $2, $3, $4, now() at time zone 'utc')
Copy link
Contributor

Choose a reason for hiding this comment

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

offtopic: there's a timezone connection string parameter we can use to not need to specify utc everywhere.

Comment on lines +151 to +152
-- name: GetTailnetPeers :many
SELECT * FROM tailnet_peers WHERE id = $1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would make more sense as GetTailnetPeer. Even though it's a :many it's still filtering for one peer, which may have multiple rows.

@spikecurtis spikecurtis merged commit 1516c66 into main Nov 15, 2023
@spikecurtis spikecurtis deleted the spike/10528-sql-queries branch November 15, 2023 06:13
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants