Fauna v10 .NET/C# Driver 1.0.1
 
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 QueryFragmentExtensions
25{
32 public static string Serialize(this IQueryFragment fragment, MappingContext ctx)
33 {
34 using var ms = new MemoryStream();
35 using var fw = new Utf8FaunaWriter(ms);
36 fragment.Serialize(ctx, fw);
37 fw.Flush();
38 return Encoding.UTF8.GetString(ms.ToArray());
39 }
40}
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.
void ISerializer. Serialize(MappingContext context, Utf8FaunaWriter writer, object? o)
Serializes the provided object onto the Utf8FaunaWriter