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: drop cascade & restrict #7

Merged
merged 1 commit into from
Nov 5, 2021
Merged

feat: drop cascade & restrict #7

merged 1 commit into from
Nov 5, 2021

Conversation

aldy505
Copy link
Owner

@aldy505 aldy505 commented Nov 5, 2021

New feature: DROP TABLE tableName RESTRICT; and DROP TABLE tableName CASCADE;.

Usage:

  sql, _, err = bob.DropTable("users").Cascade().ToSql()
  if err != nil {
    log.Fatal(err)
  }
  // sql = "DROP TABLE users CASCADE;"
  sql, _, err = bob.DropTable("users").Restrict().ToSql()
  if err != nil {
    log.Fatal(err)
  }
  // sql = "DROP TABLE users RESTRICT;"

Closes #5

@codecov-commenter
Copy link

Codecov Report

Merging #7 (8a461fe) into master (efa752f) will decrease coverage by 2.13%.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master       #7      +/-   ##
===========================================
- Coverage   100.00%   97.86%   -2.14%     
===========================================
  Files            8        9       +1     
  Lines          263      281      +18     
===========================================
+ Hits           263      275      +12     
- Misses           0        6       +6     
Impacted Files Coverage Δ
internal.go 45.45% <45.45%> (ø)
drop.go 100.00% <100.00%> (ø)
has.go 100.00% <100.00%> (ø)

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 efa752f...8a461fe. Read the comment docs.

@aldy505 aldy505 merged commit f1008bd into master Nov 5, 2021
@aldy505 aldy505 deleted the feat/drop_cascade branch November 5, 2021 05:10
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.

DROP TABLE CASCADE support
2 participants