在MongoDB中如何在聚合中使用$ match和$ not? 这是代码,我想用$ not代替$ in
#include<stdio.h>
void nest_loop(int n)
{
int i,j;
char k = 'A';
for(i=n;i>0;i--)
{
for(j=n;j>i;j--)
{
printf(" ");//print required spaces.
}
for(j=0;j<i;j++)
{
printf("%c",k+j);//initial char value of k is A and will be incremented by one as looping continues.
}
printf("\n");
}
}
int main()
{
int n;
printf("Enter the row number\n");
scanf("%d",&n);
nest_loop(n);
return 0;
}
答案 0 :(得分:0)
您可以查看$nin运算符:
foreach(var predicate in predicates)
request = request.Where(predicate);
示例:
$nin selects the documents where:
the field value is not in the specified array or
the field does not exist.