-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Locate another transformation function in transformations.ts, too
transform underlines to dots Signed-off-by: Christian Muehlbauer <[email protected]>
- Loading branch information
Showing
5 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Transforms a database field name by replacing underscores with dots. | ||
* @param field - The database filed to transform. | ||
* @returns - The transformed to message node replacing underscores by dots. | ||
*/ | ||
export function transformDataPointsWithDots(field: string): string { | ||
return field.replace(/\_/g, "."); | ||
} | ||
|
||
/** | ||
* Transforms a message node by replacing dots with underscores. | ||
* @param node - The message node to transform. | ||
* @returns - The transformed message node with dots replaced by underscores. | ||
*/ | ||
export function transformDataPointsWithUnderscores(node: string): string { | ||
return node.replace(/\./g, "_"); | ||
} | ||
|