[firestore] Add FieldPath support to DocumentSnapshot and Query

This commit is contained in:
Chris Bianca
2018-01-11 18:28:14 +00:00
parent d700bf9d6d
commit 5e062868fc
13 changed files with 327 additions and 50 deletions

View File

@@ -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,