This commit is contained in:
2021-08-01 20:09:11 -05:00
parent b10f61a489
commit bb1d2c491c
6 changed files with 13 additions and 52 deletions

View File

@@ -5,7 +5,9 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="Results\" />
<Compile Remove="Results\**" />
<EmbeddedResource Remove="Results\**" />
<None Remove="Results\**" />
</ItemGroup>
</Project>

View File

@@ -1,27 +0,0 @@
using System.Collections.Generic;
namespace CouchDB.Selectors
{
public class CouchQuery
{
public static CouchQuery Select => new();
private readonly List<Equals> equals;
protected CouchQuery()
{
equals = new List<Equals>();
}
public CouchQuery WithEqual(string key, string value)
{
equals.Add(new Equals(key, value));
return this;
}
public override string ToString()
{
var selector = string.Join(",", equals);
return $"{{ \"selector\": {selector}";
}
}
}

View File

@@ -1,18 +0,0 @@
namespace CouchDB.Selectors
{
public class Equals
{
private readonly string key;
private readonly string value;
internal Equals(string key, string value)
{
this.key = key;
this.value = value;
}
public override string ToString()
{
return $"{{ \"{key}\": {{ \"$eq\": {value}}} }}";
}
}
}