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

Initial support for Cassandra #277

Merged
merged 1 commit into from Sep 21, 2020
Merged

Initial support for Cassandra #277

merged 1 commit into from Sep 21, 2020

Conversation

marccampbell
Copy link
Contributor

@marccampbell marccampbell commented Sep 18, 2020

This PR adds support for Cassandra schemas.
This also creates a new CRD for datatype. This is commonly used in cassandra and should / could also be implemented in other database engines.

Docs PR is at schemahero/schemahero-docs#40

@marccampbell marccampbell linked an issue Sep 19, 2020 that may be closed by this pull request
@marccampbell marccampbell force-pushed the cassandra branch 11 times, most recently from 6ed00cc to f9256c5 Compare September 21, 2020 20:52
@marccampbell marccampbell changed the title [WIP] Initial support for Cassandra Initial support for Cassandra Sep 21, 2020
@marccampbell marccampbell marked this pull request as ready for review September 21, 2020 20:52

if driver == "" || ddl == "" || uri == "" {
if driver == "" || ddl == "" || uri == "" || len(host) == 0 {
Copy link
Contributor

@divolgin divolgin Sep 21, 2020

Choose a reason for hiding this comment

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

inconsistent style: len(host) == 0 vs host == ""
nm. just got to where the params are defined

if uri == "" {
missing = append(missing, "uri")
if len(host) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be an && to save one indentation level


cmd.Flags().String("username", "", "username to use when connecting")
cmd.Flags().String("password", "", "password to use when connecting")
cmd.Flags().StringSlice("host", []string{}, "hostname to use when connecting")
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be hosts instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so... Right now it will be:

kubectl schemahero apply --host 10.1.1.1 --host 10.1.1.2 I think hosts would be weird, IMO

Signed-off-by: Marc Campbell <marc.e.campbell@gmail.com>
@marccampbell marccampbell merged commit c8fb299 into master Sep 21, 2020
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.

Support for Cassandra
2 participants