Fauna .NET Driver 0.1.0-beta
 
Loading...
Searching...
No Matches
IQueryFragment.cs
Go to the documentation of this file.
1using Fauna.Mapping;
3using System.Text;
4
5namespace Fauna;
6
10public interface IQueryFragment
11{
17}
18
23public static class IQueryFragmentExtensions
24{
30 public static string Serialize(this IQueryFragment fragment, MappingContext ctx)
31 {
32 using var ms = new MemoryStream();
33 using var fw = new Utf8FaunaWriter(ms);
34 fragment.Serialize(ctx, fw);
35 fw.Flush();
36 return Encoding.UTF8.GetString(ms.ToArray());
37 }
38}
Provides functionality for writing data in a streaming manner to a buffer or a stream.
Represents the base interface for a query fragment used for FQL query construction.
void Serialize(MappingContext ctx, Utf8FaunaWriter writer)
Serializes the query fragment into the provided stream.
Definition Client.cs:9