Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Create Cassandra db schema on session initialization #5922
base: main
Are you sure you want to change the base?
Create Cassandra db schema on session initialization #5922
Changes from all commits
5041f31
30db170
ce0c375
810ab1c
0d6383f
207945f
985f65b
1c30503
e4ab709
c329bba
e3c6045
492e15e
44c39dc
dfc0c43
cb8ae19
c3d0fbd
728a139
1b6683d
ce11cc1
de1c563
edabe22
d0e1976
d8479b5
02b6159
73d276a
57349a8
84b52e1
9c2f05b
2c8de88
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check warning on line 205 in pkg/cassandra/config/config.go
Codecov / codecov/patch
pkg/cassandra/config/config.go#L200-L205
Check warning on line 207 in pkg/cassandra/config/config.go
Codecov / codecov/patch
pkg/cassandra/config/config.go#L207
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about this one
Check warning on line 214 in pkg/cassandra/config/config.go
Codecov / codecov/patch
pkg/cassandra/config/config.go#L213-L214
Check warning on line 298 in pkg/cassandra/config/config.go
Codecov / codecov/patch
pkg/cassandra/config/config.go#L297-L298
Check warning on line 40 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L33-L40
Check warning on line 47 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L43-L47
Check warning on line 53 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L49-L53
Check warning on line 55 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would make sense to trim spaces before checking for len=0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do it in generateSchemaIfNotPresent against
casQueries
, not here.Check warning on line 102 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L97-L102
Check warning on line 104 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L104
Check warning on line 113 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L107-L113
Check warning on line 118 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L115-L118
Check warning on line 122 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L120-L122
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are too many functions in this file that are polluting the overall package namespace. I would prefer to introduce a helper struct
and define those functions on that struct (and minimize parameter passing)
Check warning on line 129 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L125-L129
Check warning on line 134 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L131-L134
Check warning on line 137 in pkg/cassandra/config/schema.go
Codecov / codecov/patch
pkg/cassandra/config/schema.go#L137