Fauna v10 .NET/C# Driver 0.2.0-beta
 
Loading...
Searching...
No Matches
IQueryFragment.cs
Go to the documentation of this file.
1using System.Text;
2using Fauna.Mapping;
4
5namespace Fauna;
6
10public interface IQueryFragment
11{
18}
19
24public static class IQueryFragmentExtensions
25{
31 public static string Serialize(this IQueryFragment fragment, MappingContext ctx)
32 {
33 using var ms = new MemoryStream();
34 using var fw = new Utf8FaunaWriter(ms);
35 fragment.Serialize(ctx, fw);
36 fw.Flush();
37 return Encoding.UTF8.GetString(ms.ToArray());
38 }
39}
A class representing the mapping context to be used during serialization and deserialization.
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:8