mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
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,
|
||||
data: dataMap,
|
||||
});
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user