You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2023/01/11 06:12:42 UTC

[GitHub] [inlong] leezng commented on a diff in pull request #7216: [INLONG-7215][Dashboard] PostgreSQL source parameter optimization

leezng commented on code in PR #7216:
URL: https://github.com/apache/inlong/pull/7216#discussion_r1066606045


##########
inlong-dashboard/src/metas/sources/defaults/PostgreSQL.ts:
##########
@@ -151,4 +153,16 @@ export default class PostgreSQLSource
   })
   @I18n('meta.Sources.PostgreSQL.decodingPluginName')
   decodingPluginName: string;
+
+  parse(data) {
+    data.tableNameList = data.tableNameList.join(',');

Review Comment:
   Do not destroy the original variable when modifying the data, you can simply copy the data, for example `let obj = {...data}`



##########
inlong-dashboard/src/metas/sources/defaults/PostgreSQL.ts:
##########
@@ -151,4 +153,16 @@ export default class PostgreSQLSource
   })
   @I18n('meta.Sources.PostgreSQL.decodingPluginName')
   decodingPluginName: string;
+
+  parse(data) {
+    data.tableNameList = data.tableNameList.join(',');
+    return data;
+  }
+
+  stringify(data) {
+    if (typeof data.tableNameList === 'string') {
+      data.tableNameList = data.tableNameList.split(',');

Review Comment:
   Same as above.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org