From f81bc4a79ac5759b39b6904ac784a6e3a4e8121e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 6 Jul 2021 09:30:23 -0300 Subject: [PATCH 01/14] .DS_Store ignored --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 70861e8b6..6907d8641 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ build /bower_components /tmp /yarn-error.log -/reports/ \ No newline at end of file +/reports/.DS_Store From 01e102c1b51871516b23037d9a9c5eaae0662cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 6 Jul 2021 09:33:04 -0300 Subject: [PATCH 02/14] Added API route support to :filename and :index --- src/calc2/main.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calc2/main.tsx b/src/calc2/main.tsx index c047802b3..5e2210a05 100644 --- a/src/calc2/main.tsx +++ b/src/calc2/main.tsx @@ -67,7 +67,7 @@ export class Main extends React.Component { - + (

404

From 95ae943469144193db5c148ddc7b803c4208f839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 6 Jul 2021 09:36:09 -0300 Subject: [PATCH 03/14] Bug fix: in case the :filename and :index are set in the URL, it is necessary to set the correct group accordingly --- src/calc2/store/groups.ts | 43 ++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/src/calc2/store/groups.ts b/src/calc2/store/groups.ts index d2ae8b8d4..ae5db5343 100644 --- a/src/calc2/store/groups.ts +++ b/src/calc2/store/groups.ts @@ -68,16 +68,39 @@ export function* rootSaga() { }; yield saga.put(success); if (setCurrent !== undefined && loadedGroups.length > 0) { - const { source, id, filename } = loadedGroups[0].groupInfo; - - const setCurrent: GROUP_SET_CURRENT = { - type: 'GROUP_SET_CURRENT', - source, - id, - filename, - index: 0, - }; - yield saga.put(setCurrent); + // In case the :filename and :index are set in the URL, + // it's necessary to set the correct group accordingly + if (setCurrent && setCurrent != 'first' && + setCurrent.filename && setCurrent.index) { + for(var i=0;i Date: Tue, 6 Jul 2021 09:39:53 -0300 Subject: [PATCH 04/14] Added support to load API data synchronously --- src/calc2/utils/groupUtils.ts | 2 +- src/calc2/views/calc.tsx | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/calc2/utils/groupUtils.ts b/src/calc2/utils/groupUtils.ts index ad4b31c84..70300262b 100644 --- a/src/calc2/utils/groupUtils.ts +++ b/src/calc2/utils/groupUtils.ts @@ -172,7 +172,7 @@ export function loadGroupsFromSource(source: GroupSourceType, id: string, mainta reject(new Error('gist ' + id + ' not found')); }, }, - async: true, + async: false, }); break; } diff --git a/src/calc2/views/calc.tsx b/src/calc2/views/calc.tsx index fe5f8aad3..7179eb65b 100644 --- a/src/calc2/views/calc.tsx +++ b/src/calc2/views/calc.tsx @@ -50,6 +50,11 @@ export class Calc extends React.Component { })*/ this.apiView = this.props.location.pathname.split("/")[2] == "api" this.params = queryString.parse(this.props.location.search) + + // It's necessary to load remote group synchronouly + if (this.apiView) { + this.loadGroup(this.props); + } } componentDidUpdate(prevProps: Props): void { From bb767d39b0b1f8bebda661048a102ab9c03d3c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 6 Jul 2021 11:33:37 -0300 Subject: [PATCH 05/14] Set project requirement: Node@12. NOTE: It does not run with Node@14 nor Node@16 (tested on macOS Big Sur v11.4). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13abebe8c..8d659be5f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A relational algebra calculator ## How to build * Install yarn https://yarnpkg.com/ -* Install node https://nodejs.org/en/ +* Install node@12 https://nodejs.org/en/ * Clone the repo * Checkout the `development` branch * Execute `yarn install` to install all dependencies From 27d76edb0a3bb016d7e516f2b6ed937170bb14d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Mon, 9 Aug 2021 08:56:27 -0300 Subject: [PATCH 06/14] Fix issue of parsing + as a space --- src/calc2/views/api.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/calc2/views/api.tsx b/src/calc2/views/api.tsx index 728ca5755..49671bf33 100644 --- a/src/calc2/views/api.tsx +++ b/src/calc2/views/api.tsx @@ -27,7 +27,12 @@ export class Api extends React.Component { constructor(props: Props) { super(props); this.state = {}; - this.query = atob(props.params.query) + // Fix issue of parsing + as a space + // https://www.npmjs.com/package/query-string + // https://github.com/sindresorhus/query-string/issues/305 + // https://stackoverflow.com/questions/2678551/when-to-encode-space-to-plus-or-20 + // https://stackoverflow.com/questions/3794919/replace-all-spaces-in-a-string-with + this.query = atob(props.params.query.split(' ').join('+')) } componentDidMount() { From 441eb7dca0b5781fa977cf229f21e13655d954c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 18 Oct 2022 13:11:44 -0300 Subject: [PATCH 07/14] Bug fix --- src/calc2/views/help.tsx | 7 +++++-- src/db/exec/ValueExpr.ts | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/calc2/views/help.tsx b/src/calc2/views/help.tsx index 461dcea58..4008a251f 100644 --- a/src/calc2/views/help.tsx +++ b/src/calc2/views/help.tsx @@ -2040,9 +2040,12 @@ export class Help extends React.Component { - concat(a:string [, ...]) + concat(a:"any" [, ...]) string - concatenates the given strings + returns the string that results from concatenating the arguments. +
May have one or more arguments. A non-string argument is implicitly converted to its equivalent string form and then concatenated. Returns null if any argument is null (like in MySQL). + upper(a:string) diff --git a/src/db/exec/ValueExpr.ts b/src/db/exec/ValueExpr.ts index cedeeaf03..bd678a1a0 100644 --- a/src/db/exec/ValueExpr.ts +++ b/src/db/exec/ValueExpr.ts @@ -883,9 +883,9 @@ export class ValueExprGeneric extends ValueExpr { if (this._dataType === 'null' && dataType !== 'null') { this._dataTypeCalculated = dataType; } - else if (dataType !== 'null' && this._dataType !== dataType) { - this.throwExecutionError(i18n.t('db.messages.exec.error-function-expects-arguments-of-same-type', {func: 'CONCAT()'})); - } + // else if (dataType !== 'null' && this._dataType !== dataType) { + // this.throwExecutionError(i18n.t('db.messages.exec.error-function-expects-arguments-of-same-type', {func: 'CONCAT()'})); + // } } break; default: From cad98253930c51e5b19cc4261fe21769391b6633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 10 Oct 2023 17:26:41 -0300 Subject: [PATCH 08/14] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6907d8641..2d6172334 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ build /bower_components /tmp /yarn-error.log -/reports/.DS_Store +/reports/ +.DS_Store \ No newline at end of file From 49088bb4e04b95d3878262ebe7f5539bf76bc17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 10 Oct 2023 17:26:46 -0300 Subject: [PATCH 09/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 80baa7ca4..2669029eb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A relational algebra calculator ## How to build * Install yarn https://yarnpkg.com/ -* Install node@12 https://nodejs.org/en/ +* Install node https://nodejs.org/en/ * Clone the repo * Checkout the `development` branch * Execute `yarn install` to install all dependencies From c0508186149762fc937772c50dfb5c9eea6c6a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Tue, 10 Oct 2023 17:28:59 -0300 Subject: [PATCH 10/14] Update .gitignore --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2d6172334..76bc017ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store /nbproject/private/ /node_modules .brackets.json @@ -7,5 +8,4 @@ build /bower_components /tmp /yarn-error.log -/reports/ -.DS_Store \ No newline at end of file +/reports/ \ No newline at end of file From a22cc651526abb1d77188ca52d35dd6784f2d25b Mon Sep 17 00:00:00 2001 From: luizfelmach Date: Wed, 8 Nov 2023 17:27:55 -0300 Subject: [PATCH 11/14] fix request ajax without timeout --- src/calc2/utils/groupUtils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calc2/utils/groupUtils.ts b/src/calc2/utils/groupUtils.ts index b7110b838..98828fb0a 100644 --- a/src/calc2/utils/groupUtils.ts +++ b/src/calc2/utils/groupUtils.ts @@ -178,6 +178,7 @@ export function loadGroupsFromSource(source: GroupSourceType, id: string, mainta reject(new Error('gist ' + id + ' not found')); }, }, + timeout: 10000, async: false, }); break; From 7f5d768650079a3837caffbe9be9d919ecfdec0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Mon, 14 Oct 2024 17:19:45 -0300 Subject: [PATCH 12/14] Update ValueExpr.ts --- src/db/exec/ValueExpr.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db/exec/ValueExpr.ts b/src/db/exec/ValueExpr.ts index 605798469..80099c20a 100644 --- a/src/db/exec/ValueExpr.ts +++ b/src/db/exec/ValueExpr.ts @@ -885,9 +885,9 @@ export class ValueExprGeneric extends ValueExpr { if (this._dataType === 'null' && dataType !== 'null') { this._dataTypeCalculated = dataType; } - // else if (dataType !== 'null' && this._dataType !== dataType) { - // this.throwExecutionError(i18n.t('db.messages.exec.error-function-expects-arguments-of-same-type', {func: 'CONCAT()'})); - // } + else if (dataType !== 'null' && this._dataType !== dataType) { + this.throwExecutionError(i18n.t('db.messages.exec.error-function-expects-arguments-of-same-type', {func: 'CONCAT()'})); + } } break; default: From 52b276e3365312d4f15acc6f03c08032394ddbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Fri, 18 Oct 2024 16:08:44 -0300 Subject: [PATCH 13/14] Update help.tsx --- src/calc2/views/help.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/calc2/views/help.tsx b/src/calc2/views/help.tsx index 7b6f62590..1f38454ba 100644 --- a/src/calc2/views/help.tsx +++ b/src/calc2/views/help.tsx @@ -2119,12 +2119,9 @@ export class Help extends React.Component { - concat(a:"any" [, ...]) + concat(a:string [, ...]) string - returns the string that results from concatenating the arguments. -
May have one or more arguments. A non-string argument is implicitly converted to its equivalent string form and then concatenated. Returns null if any argument is null (like in MySQL). - + concatenates the given strings upper(a:string) From 027eba9e0d11d09bcb3a83bd0efbb3fd64da2002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Fri, 18 Oct 2024 16:10:26 -0300 Subject: [PATCH 14/14] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 76bc017ef..70861e8b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.DS_Store /nbproject/private/ /node_modules .brackets.json