test: mobile e2e (#9753)
This commit is contained in:
@@ -124,7 +124,7 @@ export class DataStruct {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const nid = await trx.objectStore('records').add({
|
const nid = await trx.objectStore('records').put({
|
||||||
id: document.id,
|
id: document.id,
|
||||||
data: dataMap,
|
data: dataMap,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export class StringInvertedIndex implements InvertedIndex {
|
|||||||
|
|
||||||
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
|
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
|
||||||
for (const term of terms) {
|
for (const term of terms) {
|
||||||
await trx.objectStore('invertedIndex').add({
|
await trx.objectStore('invertedIndex').put({
|
||||||
key: InvertedIndexKey.forString(this.fieldKey, term).buffer(),
|
key: InvertedIndexKey.forString(this.fieldKey, term).buffer(),
|
||||||
nid: id,
|
nid: id,
|
||||||
});
|
});
|
||||||
@@ -117,7 +117,7 @@ export class IntegerInvertedIndex implements InvertedIndex {
|
|||||||
|
|
||||||
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
|
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
|
||||||
for (const term of terms) {
|
for (const term of terms) {
|
||||||
await trx.objectStore('invertedIndex').add({
|
await trx.objectStore('invertedIndex').put({
|
||||||
key: InvertedIndexKey.forInt64(this.fieldKey, BigInt(term)).buffer(),
|
key: InvertedIndexKey.forInt64(this.fieldKey, BigInt(term)).buffer(),
|
||||||
nid: id,
|
nid: id,
|
||||||
});
|
});
|
||||||
@@ -172,7 +172,7 @@ export class BooleanInvertedIndex implements InvertedIndex {
|
|||||||
|
|
||||||
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
|
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
|
||||||
for (const term of terms) {
|
for (const term of terms) {
|
||||||
await trx.objectStore('invertedIndex').add({
|
await trx.objectStore('invertedIndex').put({
|
||||||
key: InvertedIndexKey.forBoolean(
|
key: InvertedIndexKey.forBoolean(
|
||||||
this.fieldKey,
|
this.fieldKey,
|
||||||
term === 'true'
|
term === 'true'
|
||||||
@@ -347,7 +347,7 @@ export class FullTextInvertedIndex implements InvertedIndex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const [term, tokens] of tokenMap) {
|
for (const [term, tokens] of tokenMap) {
|
||||||
await trx.objectStore('invertedIndex').add({
|
await trx.objectStore('invertedIndex').put({
|
||||||
key: InvertedIndexKey.forString(this.fieldKey, term).buffer(),
|
key: InvertedIndexKey.forString(this.fieldKey, term).buffer(),
|
||||||
nid: id,
|
nid: id,
|
||||||
pos: {
|
pos: {
|
||||||
|
|||||||
Reference in New Issue
Block a user