@shisyamo4131/air-firebase-v2-client-adapter 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
collectionGroup,
|
|
16
16
|
onSnapshot,
|
|
17
17
|
getFirestore,
|
|
18
|
-
increment as FieldValue_increment,
|
|
19
18
|
} from "firebase/firestore";
|
|
20
19
|
import { getAuth } from "firebase/auth";
|
|
21
20
|
import { ClientAdapterError, ERRORS } from "./error.js";
|
|
@@ -1025,6 +1024,15 @@ class ClientAdapter {
|
|
|
1025
1024
|
}
|
|
1026
1025
|
}
|
|
1027
1026
|
}
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Firestore トランザクションを実行します。
|
|
1030
|
+
* @param {Function} updateFunction - トランザクション内で実行する関数
|
|
1031
|
+
* @returns {Promise<any>} トランザクションの結果
|
|
1032
|
+
*/
|
|
1033
|
+
async runTransaction(updateFunction) {
|
|
1034
|
+
return await runTransaction(this.firestore, updateFunction);
|
|
1035
|
+
}
|
|
1028
1036
|
}
|
|
1029
1037
|
|
|
1030
1038
|
export default ClientAdapter;
|