-
Notifications
You must be signed in to change notification settings - Fork 0
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
Intial Commit Review. #1
Conversation
} | ||
defer func() { | ||
if cerr := goOutputFile.Close(); err == nil && cerr != nil { | ||
err = cerr |
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.
Will this actually bubble up?
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.
No good catch I need to make err
a named return for it to bubble up.
|
||
// Derived | ||
IsArray bool | ||
GOName string |
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.
Hm, is this the casing you want?
internal/codegen/codegen.go
Outdated
) | ||
|
||
const ( | ||
ClickhouseFileName = "vss-table.sql" |
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.
Ooh you've got a strict linter.
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.
Yeah this is actually a subset of my personal one I will grab one of config files we use in another repo.
internal/codegen/codegen.go
Outdated
package codegen | ||
|
||
import ( | ||
_ "embed" |
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 swear there's an exception for this one in the linter.
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 used to have the templates embedded in this file before I moved them to separate packages, so this import was an artifact.
* Fixed .gitignore to ignore codegen binary only. * Added generation of convert test functions. * Update comments for generated code. * Updated conversion for SupportedFuleTypes * Added Transmission.FuelType.
schema/migrations.json
Outdated
"originalName": "data.vehicleID", | ||
"originalType": "string" | ||
} | ||
}, | ||
{ | ||
"vspecName": "Vehicle.DIMO.DefinitionID", | ||
"conversion": { | ||
"originalName": "data.definitionID", |
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 don't recognize these fields.
* Removed root prefixes from model and column names. * Root prefix is used for the model name instead of `vehicle`. * file names are updated to match the model name. * table name matches the root prefix.
This PR allows anyone to make comments or suggestions on the initial code.