-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.yaml
37 lines (36 loc) · 1.46 KB
/
example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
collection1:
- _id: some_unique_key_value # _id is a doucment id in firebase, if exists - document will be updated, if not - created
str_attr: string value
int_attr: 42
float_attr: 3.1415926
array_attr:
- value1
- value2
- value3
timestamp_attr: 2021-04-23 18:29:46
- str_attr: another string value # if _id in ommited, document id will be autogenerated
int_attr: 12345
float_attr: 2.71828
array_attr:
- value3
- value2
timestamp_attr: 2021-08-18 08:32:04
_subcollections: # _subcollections is used to define collections inside the document
somecollection: # name of subcollection
- name: just a
- name: simple
- name: subcollection
anothercollection: # another subcollection
- _id: '123'
value: another
- _id: '234'
value: subcollection
- _id: '345'
value: for the same
- _id: '456'
value: document
collection2:
- _id: $query|/collection1/some_unique_key_value/[str_attr]
pi: $query|/collection1/some_unique_key_value/[float_attr] # with $query it is possible to address fields values from another documents
exp: $query|/collection1/[str_attr=another string value]/[float_attr] # of even search for document with specifying query conditions
time: $query|/collection1/[int_attr=num:42]/[timestamp_attr] # with num: prefix it is possible to specify that quesry should search numeric value, not a string