Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/querybase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ class Querybase {
}

/**
* Print a warning to the console about using "._indexOn" rules for
* Print a warning to the console about using ".indexOn" rules for
* the generated keys. This warning has a copy-and-pastable security rule
* based upon the keys provided.
* @param {string} value
Expand All @@ -630,9 +630,9 @@ class Querybase {
const indexKeys = this.encodedKeys();
const _indexOnRule = `
"${_.getPathFromRef(this.ref())}": {
"._indexOn": [${_.keys(indexKeys).map((key) => { return `"${indexKeys[key]}"`; }).join(", ")}]
".indexOn": [${_.keys(indexKeys).map((key) => { return `"${indexKeys[key]}"`; }).join(", ")}]
}`;
console.warn(`Add this rule to drastically improve performance of your Realtime Database queries: \n ${_indexOnRule}`);
console.warn(`If you haven't yet, add this rule to drastically improve performance of your Realtime Database queries: \n ${_indexOnRule}`);
}

}
Expand Down