Skip to content

Conversation

davidleejy
Copy link
Contributor

This PR addresses a feature request raised in issue #449. Specifically this PR adds a functionality that lets users duplicate a table via:

table_new = db["my_table"].duplicate("new_table")

Test added in file tests/test_duplicate.py.

Happy to make changes to meet maintainers' feedback, if any.

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #452 (eef350f) into main (42440d6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #452   +/-   ##
=======================================
  Coverage   96.60%   96.61%           
=======================================
  Files           6        6           
  Lines        2534     2540    +6     
=======================================
+ Hits         2448     2454    +6     
  Misses         86       86           
Impacted Files Coverage Δ
sqlite_utils/db.py 97.53% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42440d6...eef350f. Read the comment docs.

@simonw simonw merged commit b366e68 into simonw:main Jul 15, 2022
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.

Utilities for duplicating tables and creating a table with the results of a query
2 participants