Skip to content

Commit 1274884

Browse files
committed
in work
1 parent 854bf78 commit 1274884

File tree

1 file changed

+1
-33
lines changed
  • packages/cubejs-backend-native/js

1 file changed

+1
-33
lines changed

packages/cubejs-backend-native/js/index.ts

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -450,39 +450,7 @@ export const sql4sql = async (instance: SqlInterfaceInstance, sqlQuery: string,
450450

451451
export const buildSqlAndParams = (cubeEvaluator: any): String => {
452452
const native = loadNative();
453-
const safeCallFn = (fn: Function, thisArg: any, ...args: any[]) => {
454-
try {
455-
return {
456-
result: fn.apply(thisArg, args),
457-
};
458-
} catch (e: any) {
459-
return {
460-
error: e.toString(),
461-
};
462-
}
463-
};
464-
465-
const createGetProxy = (target:any, rustHandlerBox:any) => {
466-
return new Proxy(target, {
467-
get(target, property, receiver) {
468-
if (typeof property === 'string') {
469-
try {
470-
const propertyStr = String(property);
471-
const result = rustHandlerBox.get(propertyStr);
472-
473-
if (result !== undefined) {
474-
return result;
475-
}
476-
} catch (error) {
477-
throw error;
478-
}
479-
}
480-
481-
return Reflect.get(target, property, receiver);
482-
}
483-
});
484-
}
485-
return native.buildSqlAndParams(cubeEvaluator, safeCallFn);
453+
return native.buildSqlAndParams(cubeEvaluator);
486454
};
487455

488456
export type ResultRow = Record<string, string>;

0 commit comments

Comments
 (0)