You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal: Leveraging the template based codegen engine of wings to generate logger code across stack logging towards the same table with unified types and fields.
Syntax
go-filepath src/go
ts-filepath src/ts
import examples/input/event
import examples/input/result
gen-filetype go
db-type psql
logger Search {
id int unique serial primary
query string nonnull
event Event nonnull
results []Result
}
gen-filetype: Language for the table initialization code (if / when this is the first run).
db-type: Database type
unique serial primary nonnull: Database keywords
Config
We also need to add some new fields in the wings.json config files
{
..."db": {
"credential-type": "custom"/* or "inherited" */, /* The rest of the fields are only needed for custom credentials. */"credentials": {
"name": "sample_db",
"username": "test_user",
"password": "test_password"
}
}
...
}
Expectations
Here's a list of other things to expect / support in its implementation:
Can be imported / integrated as part of a larger project (and its initialization process).
Can use both existing or separate database credentials / connection.
Should include adding new columns if not already in existing (previously created) table.
Limitations
Here are some expected limitations on the implementation:
Unable to modify or delete existing columns.
Columns can be removed from code to prevent future use but generated code won't include removing them from existing table.
Unable to detect there's an existing table (in the same database) that's not generated from / by wings.
Open for suggestions.
The text was updated successfully, but these errors were encountered:
Goal: Leveraging the template based codegen engine of wings to generate logger code across stack logging towards the same table with unified types and fields.
Syntax
gen-filetype
: Language for the table initialization code (if / when this is the first run).db-type
: Database typeunique serial primary nonnull
: Database keywordsConfig
We also need to add some new fields in the
wings.json
config filesExpectations
Here's a list of other things to expect / support in its implementation:
Limitations
Here are some expected limitations on the implementation:
Open for suggestions.
The text was updated successfully, but these errors were encountered: