1602 / 1602/jugglingdb

Question: Why AbstractClass._forDB stringify JSON and Array.

Offen
#335 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
2k
Forks
238
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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;
};
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, mongodb, mysql, node.js, postgresql, redis, sqlite
Bereich
backend-api-design, database
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.