@@ -27,115 +27,109 @@ <h6>desconnected</h6>
27
27
</ div >
28
28
29
29
< div id ="examples ">
30
- < h4 > examples</ h4 >
31
- < p > insert one data object </ p >
32
- {action:"insert", collection:"users", data:{name:"adam", age:12}}
30
+ < h4 > examples</ h4 >
33
31
34
- < p > insertMany inserts many data objects at one time 'bulk' </ p >
35
- {action:"insertMany ", collection:"test ", data:[ {name:"jalal ", age:23},{name:"akram", age:30},{name:"hasna", age:35}]}
32
+ < p > insert one data object
33
+ < pre > {action:"insert ", collection:"users ", data:{name:"adam ", age:12}} </ pre >
36
34
37
- < p > select one object </ p >
38
- {action:"findOne ", collection:"users ", match: {name:"adam"}}
35
+ < p > insertMany inserts many data objects at one time 'bulk' </ p >
36
+ < pre > {action:"insertMany ", collection:"test ", data:[ {name:"jalal", age:23},{name:"akram", age:30},{name:"hasna", age:35}]} </ pre >
39
37
40
- < p > select objects match conditions </ p >
41
- {action:"findMany ", collection:"users", match:{name:"adam"}}
38
+ < p > select one object </ p >
39
+ < pre > {action:"findOne ", collection:"users", match:{name:"adam"}}</ pre >
42
40
43
- < p > select objects that match the conditions</ p >
44
- {action:"findMany", collection:"users", match:{name:"adam", age:{$gt:12}}}
45
- < p > match numeric data by $eq $nq $lt $gt $ge $le</ p >
46
- < p > match text data by $eq $nq $lt $gt $ge $le </ p >
41
+ < p > select objects match conditions</ p >
42
+ < pre > {action:"findMany", collection:"users", match:{name:"adam"}}</ pre >
47
43
48
- < p > select objects that match any value </ p >
49
- {action:"findMany", collection:"users", match:{ age:{$in:[12, 23, 34] }}}
50
- </ br >
51
- {action:"findMany", collection:"users", match:{ name:{$in:["akram", "zaid"]}}}
44
+ < p > select objects that match the conditions </ p >
45
+ < pre > {action:"findMany", collection:"users", match:{name:"adam", age:{$gt:12 }}}</ pre >
46
+ < p > match numeric data by $eq $nq $lt $gt $ge $le </ p >
47
+ < p > match text data by $eq $nq $lt $gt $ge $le </ p >
52
48
53
- < p > select objects that do not match any value</ p >
54
- {action:"findMany", collection:"users", match:{ age:{$nin :[12, 23, 34]}}}
55
- </ br >
56
- {action:"findMany", collection:"users", match:{ name:{$nin :["akram", "zaid"]}}}
49
+ < p > select objects that match any value </ p >
50
+ < pre > {action:"findMany", collection:"users", match:{ age:{$in :[12, 23, 34]}}}</ pre >
51
+ </ br >
52
+ < pre > {action:"findMany", collection:"users", match:{ name:{$in :["akram", "zaid"]}}}</ pre >
57
53
58
- < p > select objects that match any conditions</ p >
59
- {action:"findMany", collection:"users", match:{ $or:[name:{$eq:"akram", age:$gt:13}]}}
54
+ < p > select objects that do not match any value</ p >
55
+ < pre > {action:"findMany", collection:"users", match:{ age:{$nin:[12, 23, 34]}}}</ pre >
56
+ </ br >
57
+ < pre > {action:"findMany", collection:"users", match:{ name:{$nin:["akram", "zaid"]}}}</ pre >
60
58
61
- < p > select objects that match all conditions</ p >
62
- {action:"findMany", collection:"users", match:{ $and :[name:{$eq:"akram", age:$gt:13}]}}
59
+ < p > select objects that match any conditions</ p >
60
+ < pre > {action:"findMany", collection:"users", match:{ $or :[name:{$eq:"akram", age:$gt:13}]}}</ pre >
63
61
62
+ < p > select objects that match all conditions</ p >
63
+ < pre > {action:"findMany", collection:"users", match:{ $and:[name:{$eq:"akram", age:$gt:13}]}}</ pre >
64
64
65
- < p > sub Query</ p >
66
- {
67
- action:"findMany",
68
- collection:"test",
69
- match:{
70
- name:{sub:{op:"$eq", action:"findOne", collection:"users",match:{name:"adam"}}},
71
- age:{sub:{op:"$eq", action:"findOne", collection:"users", match:{age:18}}}
72
- },
73
- }
74
65
75
- < p > order by & reverse or DISC : </ p >
76
- {action:"findMany ", collection:"users ", orderBy:"name", reverse:1}
66
+ < p > sub Query (in progress) </ p >
67
+ < pre > { match:{name:{sub:{op:"$eq ", action:"findOne ", collection:"users",match:{name:"adam"}}}}} </ pre >
77
68
78
- < p > updateById </ p >
79
- {action:"updateById ", collection:"test ", _id:3, data:{ name:"hosam", age:10}}
69
+ < p > order by & reverse or DISC : </ p >
70
+ < pre > {action:"findMany ", collection:"users ", orderBy:" name", reverse:1} </ pre >
80
71
81
- < p > updateOne </ p >
82
- {action:"updateById", collection:"test", match:{ _id{$gt:33}} , data:{name:"hosam", age:10}}
72
+ < p > updateById </ p >
73
+ < pre > {action:"updateById", collection:"test", _id:3 , data:{name:"hosam", age:10}}</ pre >
83
74
84
- < p > updateMany </ p >
85
- {action:"updateById", collection:"test", match:{_id{$gt:33}}, data:{name:"hosam", age:10}}
75
+ < p > updateOne </ p >
76
+ < pre > {action:"updateById", collection:"test", match:{_id{$gt:33}}, data:{name:"hosam", age:10}}</ pre >
86
77
78
+ < p > updateMany </ p >
79
+ < pre > {action:"updateById", collection:"test", match:{_id{$gt:33}}, data:{name:"hosam", age:10}}</ pre >
87
80
88
81
89
- < p > delete first objects that match the conditions</ p >
90
- {action:"deleteOne", collection:"users", match:{name:"adam", age:{$gt:12}}}
91
82
92
- < p > delete all objects that match the conditions </ p >
93
- {action:"deleteMany ", collection:"users", match:{name:"adam", age:{$gt:12}}}
83
+ < p > delete first objects that match the conditions</ p >
84
+ < pre > {action:"deleteOne ", collection:"users", match:{name:"adam", age:{$gt:12}}}</ pre >
94
85
95
- < p > skip or ignor some matching objects </ p >
96
- {action:"deleteMany", collection:"users", match:{name:"adam", age:{$gt:12}}, skip: 3}
86
+ < p > delete all objects that match the conditions </ p >
87
+ < pre > {action:"deleteMany", collection:"users", match:{name:"adam", age:{$gt:12}}} </ pre >
97
88
98
- < p > Limited to a number of matching objects</ p >
99
- {action:"deleteMany", collection:"users", match:{name:"adam", age:{$gt:12}}, skip: 3, limit:3}
89
+ < p > skip or ignor some matching objects</ p >
90
+ < pre > {action:"deleteMany", collection:"users", match:{name:"adam", age:{$gt:12}}, skip: 3} </ pre >
100
91
101
- < p > deleteMany </ p >
102
- {action:"deleteMany", collection:"users", match:{name:"adam", age:{$gt:12}}, skip: 3, limit:3}
92
+ < p > Limited to a number of matching objects </ p >
93
+ < pre > {action:"deleteMany", collection:"users", match:{name:"adam", age:{$gt:12}}, skip: 3, limit:3}</ pre >
103
94
95
+ < p > deleteMany</ p >
96
+ < pre > {action:"deleteMany", collection:"users", match:{name:"adam", age:{$gt:12}}, skip: 3, limit:3}</ pre >
104
97
105
98
106
- < p > exclode fields</ p >
107
- {action:"findMany", collection:"test", fields:{_id:0, name:0}}
108
99
100
+ < p > exclode fields</ p >
101
+ < pre > {action:"findMany", collection:"test", fields:{_id:0, name:0}}</ pre >
109
102
110
- < p > rename fields</ p >
111
- {action:"findMany", collection:"test", fields:{_id:0, name:"full_name"}}
112
103
104
+ < p > rename fields</ p >
105
+ < pre > {action:"findMany", collection:"test", fields:{_id:0, name:"full_name"}}</ pre >
113
106
114
- < p > String matching, by `$st` `$en` `$c` :</ p >
115
107
116
- < p > is str starts with 'ad' ? :</ p >
117
- {action:"findMany", collection:"test", match:{name:{$st:"ad"}}}
108
+ < p > String matching, by `$st` `$en` `$c` :</ p >
118
109
119
- < p > is str ends with 'ad' ? :</ p >
120
- {action:"findMany", collection:"test", match:{name:{$en :"ad"}}}
110
+ < p > is str starts with 'ad' ? :</ p >
111
+ < pre > {action:"findMany", collection:"test", match:{name:{$st :"ad"}}}</ pre >
121
112
122
- < p > is str contains 'ad' ? :</ p >
123
- {action:"findMany", collection:"test", match:{name:{$c :"ad"}}}
113
+ < p > is str ends with 'ad' ? :</ p >
114
+ < pre > {action:"findMany", collection:"test", match:{name:{$en :"ad"}}}</ pre >
124
115
125
- < p > is str not starts with 'ad' ? :</ p >
126
- {action:"findMany", collection:"test", match:{name:{$nst :"ad"}}}
116
+ < p > is str contains 'ad' ? :</ p >
117
+ < pre > {action:"findMany", collection:"test", match:{name:{$c :"ad"}}}</ pre >
127
118
128
- < p > is str not ends with 'ad' ? :</ p >
129
- {action:"findMany", collection:"test", match:{name:{$nen :"ad"}}}
119
+ < p > is str not starts with 'ad' ? :</ p >
120
+ < pre > {action:"findMany", collection:"test", match:{name:{$nst :"ad"}}}</ pre >
130
121
131
- < p > is str not contains 'ad' ? :</ p >
132
- {action:"findMany", collection:"test", match:{name:{$nc :"ad"}}}
122
+ < p > is str not ends with 'ad' ? :</ p >
123
+ < pre > {action:"findMany", collection:"test", match:{name:{$nen :"ad"}}}</ pre >
133
124
125
+ < p > is str not contains 'ad' ? :</ p >
126
+ < pre > {action:"findMany", collection:"test", match:{name:{$nc:"ad"}}}</ pre >
134
127
135
- < br />
136
- < br />
137
- < br />
138
- < br />
128
+
129
+ < br />
130
+ < br />
131
+ < br />
132
+ < br />
139
133
140
134
</ div >
141
135
< div id ="config "> < a href ="shell "> examples</ a > < a href ="doc "> doc</ a > config </ div >
0 commit comments