1602 / 1602/jugglingdb

Question: Why AbstractClass._forDB stringify JSON and Array.

Đang mở
#335 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
2k
Fork
238
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello, I try to use jugglingdb and can't understand for what function "AbstractClass._forDB" converts object and array to string. This limits search by criterias. We have to use regular expressions or exists another way. Thank for help.

```
AbstractClass._forDB = function (data) {
var res = {};
Object.keys(data).forEach(function (propName) {
var typeName = this.whatTypeName(propName);
if (!typeName && !data[propName] instanceof Array) {
return;
}
if (typeName === 'JSON' || data[propName] instanceof Array) {
res[propName] = JSON.stringify(data[propName]);
} else {
res[propName] = data[propName];
}
}.bind(this));
return res;
};
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Look at the AbstractClass._forDB function in the codebase, likely in a file like lib/abstract_class.js. Understand how JSON and Array data is handled for different database adapters (redis, mongodb, mysql, etc.). Check if there are existing tests for this function or related search functionality. Determine if the stringification is necessary for all adapters or if it can be conditional.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, mongodb, mysql, node.js, postgresql, redis, sqlite
Lĩnh vực
backend-api-design, database
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.