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

feat: add duckdb dialect #696

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

dpeckett
Copy link
Contributor

@dpeckett dpeckett commented Feb 7, 2024

An attempt at adding DuckDB dialect support.

Signed-off-by: Damian Peckett <damian@pecke.tt>
@mfridman
Copy link
Collaborator

Thanks for contributing a PR, will review this over the next week or two.


func (s *Duckdb) CreateTable(tableName string) string {
q := `
CREATE SEQUENCE %s_id;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't have much experience with duckdb, is this the recommended way to get an autoincrementing primary key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At this time I'm hardly an expert but that seemed to be the main way to achieve this. You certainly don't have an AUTOINCREMENT keyword on the column available.

Copy link
Collaborator

@mfridman mfridman left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for putting this together. Looking forward to playing around with duckdb some more..

@mfridman
Copy link
Collaborator

Thanks for putting up a PR 🎉 .

@mfridman mfridman merged commit fb7ca2d into pressly:master Feb 15, 2024
10 checks passed
mfridman added a commit that referenced this pull request Mar 13, 2024
This reverts commit fb7ca2d.

# Conflicts:
#	cmd/goose/driver_duckdb.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants