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

Allow creation of tables with primary key and/or index #4

Open
pnacht opened this issue May 6, 2021 · 2 comments
Open

Allow creation of tables with primary key and/or index #4

pnacht opened this issue May 6, 2021 · 2 comments

Comments

@pnacht
Copy link

pnacht commented May 6, 2021

The title is pretty self-explanatory.

Primary keys and indices are essential tools for performant SQL queries, but must currently be performed manually by the user after table creation with an ALTER TABLE call (made more complex for PK's by the fact that the respective columns must be NOT NULL, which must also be defined post-facto).

At a glance, at least PK's could be relatively simply implemented by adding an argument to dbCreateTable and modifying sqlCreateTable. Indices are made more complicated by the need to define them as clustered or non-clustered, but PK's seem quite simple (says the guy who hasn't actually tried doing it).

@krlmlr
Copy link
Member

krlmlr commented May 6, 2021

Thanks. Would you like to test-drive r-dbi/DBI#351?

@krlmlr
Copy link
Member

krlmlr commented Oct 17, 2021

Might be easier with a rewrite. Closing for now.

@krlmlr krlmlr closed this as completed Oct 17, 2021
@krlmlr krlmlr transferred this issue from r-dbi/DBI Oct 31, 2021
@krlmlr krlmlr reopened this Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants