Skip to content

feat(login): drop login from all servers in Ag#54

Merged
Alex Irion (alexirion10) merged 4 commits intomasterfrom
feat/login/drop
Jan 11, 2021
Merged

feat(login): drop login from all servers in Ag#54
Alex Irion (alexirion10) merged 4 commits intomasterfrom
feat/login/drop

Conversation

@alexirion10
Copy link
Copy Markdown
Contributor

No description provided.

@Martin11175
Copy link
Copy Markdown

Do we need to add this to the AgDatabase.Delete() function to actually request dropping the logins?

@alexirion10
Copy link
Copy Markdown
Contributor Author

We could... the way I wrote the code was like the following, decoupling the two from each other:

var agDb = new AgDatabase();
foreach(var loginProp in agDb.AssociatedLogins())
  agDb.DropLogin(loginProp);
agDb.Delete();

@Martin11175
Copy link
Copy Markdown

That's fair, in which case:

  • Should the DropLogin() method be added to the IAgDatabase to allow people to mock it out?
  • Do we want a DropAllLogins() utility method as well?
  • Could this method drop the login we're trying to use to do the move (and will that prevent us doing the Delete() call)?
  • Should we add it as an option to the CLI for people not interacting programmatically?

@alexirion10
Copy link
Copy Markdown
Contributor Author

  • Sure I can add it to the interface
  • DropAllLogins is a possibility, but it's very easy for a consumer to do that themselves, I'm not sure it's entirely necessary
  • Sooooo we're using this library not just for client moves anymore... its purpose has been expanded to any operations needed on an AG database. The case here is for a WipeDb operation
  • I'm not adding it the CLI, as this functionality has nothing to do with database moves

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fair enough! Questions answered and looks reasonable to me; :shipit:!

@alexirion10 Alex Irion (alexirion10) merged commit b1a4971 into master Jan 11, 2021
@alexirion10 Alex Irion (alexirion10) deleted the feat/login/drop branch January 11, 2021 15:51
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.

2 participants