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

Intial Commit Review. #1

Closed
wants to merge 12 commits into from
Closed

Intial Commit Review. #1

wants to merge 12 commits into from

Conversation

KevinJoiner
Copy link
Collaborator

This PR allows anyone to make comments or suggestions on the initial code.

}
defer func() {
if cerr := goOutputFile.Close(); err == nil && cerr != nil {
err = cerr
Copy link
Member

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?

Copy link
Collaborator Author

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
Copy link
Member

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?

)

const (
ClickhouseFileName = "vss-table.sql"
Copy link
Member

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.

Copy link
Collaborator Author

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.

package codegen

import (
_ "embed"
Copy link
Member

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.

Copy link
Collaborator Author

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.
Comment on lines 41 to 48
"originalName": "data.vehicleID",
"originalType": "string"
}
},
{
"vspecName": "Vehicle.DIMO.DefinitionID",
"conversion": {
"originalName": "data.definitionID",
Copy link
Member

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.
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