mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-27 19:25:20 +08:00
[firestore] Add FieldPath support to DocumentSnapshot and Query
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import DocumentReference from '../DocumentReference';
|
||||
import { DOCUMENT_ID } from '../FieldPath';
|
||||
import { DELETE_FIELD_VALUE, SERVER_TIMESTAMP_FIELD_VALUE } from '../FieldValue';
|
||||
import GeoPoint from '../GeoPoint';
|
||||
import Path from '../Path';
|
||||
@@ -60,6 +61,10 @@ export const buildTypeMap = (value: any): FirestoreTypeMap | null => {
|
||||
type: 'fieldvalue',
|
||||
value: 'timestamp',
|
||||
};
|
||||
} else if (value === DOCUMENT_ID) {
|
||||
return {
|
||||
type: 'documentid',
|
||||
};
|
||||
} else if (type === 'boolean' || type === 'number' || type === 'string') {
|
||||
return {
|
||||
type,
|
||||
|
||||
Reference in New Issue
Block a user