-
Notifications
You must be signed in to change notification settings - Fork 7
[WIP]: Database Templates #166
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
base: develop
Are you sure you want to change the base?
Conversation
| private static final String TRANSLATION_TABLE_NAME = "TRANSLATION"; | ||
| private static final String TRANSLATION_ATTRIBUTE_TABLE_NAME = "TRANSLATION_ATTRIBUTE"; | ||
|
|
||
| private static final String DATABASE_TEMPLATE_TABLE_NAME = "DATABASE_TEMPLATE"; |
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.
| return new BufferedReader(new InputStreamReader(resourceAsStream)); | ||
| } | ||
|
|
||
| private BufferedReader readDatabaseTemplateFile() throws FileNotFoundException { |
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.
@ailegion for this I did not add an ENV variable. Should we allow users to override the database template file?
| @@ -0,0 +1,27 @@ | |||
| package com.adaptivescale.rosetta.ddl; | |||
|
|
|||
| public enum DatabaseTemplateEnum { | |||
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.
| createParams.put("tableName", table.getName()); | ||
| createParams.put("tableCode", definitionAsString); | ||
| stringBuilder.append(TemplateEngine.process(TABLE_CREATE_TEMPLATE, createParams)); | ||
| Optional.ofNullable(databaseTemplates.get(TABLE_CREATE.getName())) |
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.
We need this file here because of the unit tests.
No description provided.