test: mobile e2e (#9753)

This commit is contained in:
liuyi
2025-01-17 16:22:09 +08:00
committed by GitHub
parent 94b0802e64
commit 9f3b39ffd6
2 changed files with 5 additions and 5 deletions

View File

@@ -124,7 +124,7 @@ export class DataStruct {
}
}
const nid = await trx.objectStore('records').add({
const nid = await trx.objectStore('records').put({
id: document.id,
data: dataMap,
});

View File

@@ -64,7 +64,7 @@ export class StringInvertedIndex implements InvertedIndex {
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
for (const term of terms) {
await trx.objectStore('invertedIndex').add({
await trx.objectStore('invertedIndex').put({
key: InvertedIndexKey.forString(this.fieldKey, term).buffer(),
nid: id,
});
@@ -117,7 +117,7 @@ export class IntegerInvertedIndex implements InvertedIndex {
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
for (const term of terms) {
await trx.objectStore('invertedIndex').add({
await trx.objectStore('invertedIndex').put({
key: InvertedIndexKey.forInt64(this.fieldKey, BigInt(term)).buffer(),
nid: id,
});
@@ -172,7 +172,7 @@ export class BooleanInvertedIndex implements InvertedIndex {
async insert(trx: DataStructRWTransaction, id: number, terms: string[]) {
for (const term of terms) {
await trx.objectStore('invertedIndex').add({
await trx.objectStore('invertedIndex').put({
key: InvertedIndexKey.forBoolean(
this.fieldKey,
term === 'true'
@@ -347,7 +347,7 @@ export class FullTextInvertedIndex implements InvertedIndex {
}
for (const [term, tokens] of tokenMap) {
await trx.objectStore('invertedIndex').add({
await trx.objectStore('invertedIndex').put({
key: InvertedIndexKey.forString(this.fieldKey, term).buffer(),
nid: id,
pos: {