Fauna v10 .NET/C# Driver
1.0.0
Loading...
Searching...
No Matches
repo.git
Fauna
Query
QueryArr.cs
Go to the documentation of this file.
1
using
Fauna.Mapping
;
2
using
Fauna.Serialization
;
3
4
namespace
Fauna
;
5
9
internal
sealed
class
QueryArr :
Query
,
IQueryFragment
10
{
14
public
IEnumerable<Query> Unwrap {
get
; }
15
20
public
QueryArr(IEnumerable<Query> v)
21
{
22
Unwrap = v;
23
}
24
25
31
public
override
void
Serialize
(
MappingContext
ctx,
Utf8FaunaWriter
writer)
32
{
33
writer.
WriteStartObject
();
34
writer.
WriteFieldName
(
"array"
);
35
writer.
WriteStartArray
();
36
foreach
(
Query
t
in
Unwrap)
37
{
38
var ser = Serializer.Generate(ctx, t.GetType());
39
ser.Serialize(ctx, writer, t);
40
}
41
writer.
WriteEndArray
();
42
writer.
WriteEndObject
();
43
}
44
50
public
override
bool
Equals(
Query
? o)
51
{
52
return
o is QueryArr other && Unwrap.SequenceEqual(other.Unwrap);
53
}
54
60
public
override
bool
Equals(
object
? otherObject)
61
{
62
return
Equals(otherObject as QueryArr);
63
}
64
69
public
override
int
GetHashCode()
70
{
71
return
Unwrap.GetHashCode();
72
}
73
78
public
override
string
ToString()
79
{
80
return
$
"QueryArr({string.Join("
,
", Unwrap)})"
;
81
}
82
83
}
Fauna.Mapping.MappingContext
A class representing the mapping context to be used during serialization and deserialization.
Definition
MappingContext.cs:10
Fauna.Query
Represents the abstract base class for constructing FQL queries.
Definition
Query.cs:11
Fauna.Serialization.Utf8FaunaWriter
Provides functionality for writing data in a streaming manner to a buffer or a stream.
Definition
Utf8FaunaWriter.cs:13
Fauna.Serialization.Utf8FaunaWriter.WriteFieldName
void WriteFieldName(string value)
Writes a field name for the next value.
Definition
Utf8FaunaWriter.cs:261
Fauna.Serialization.Utf8FaunaWriter.WriteStartArray
void WriteStartArray()
Writes the beginning of an array.
Definition
Utf8FaunaWriter.cs:104
Fauna.Serialization.Utf8FaunaWriter.WriteEndArray
void WriteEndArray()
Writes the end of an array.
Definition
Utf8FaunaWriter.cs:112
Fauna.Serialization.Utf8FaunaWriter.WriteEndObject
void WriteEndObject()
Writes the end of an object.
Definition
Utf8FaunaWriter.cs:77
Fauna.Serialization.Utf8FaunaWriter.WriteStartObject
void WriteStartObject()
Writes the beginning of an object.
Definition
Utf8FaunaWriter.cs:69
Fauna.IQueryFragment
Represents the base interface for a query fragment used for FQL query construction.
Definition
IQueryFragment.cs:11
Fauna.Mapping
Definition
Attributes.cs:1
Fauna.Serialization
Definition
BaseRefSerializer.cs:5
Fauna.Serialization.Serialize
void ISerializer. Serialize(MappingContext context, Utf8FaunaWriter writer, object? o)
Serializes the provided object onto the Utf8FaunaWriter
Fauna
Definition
Client.cs:10
Generated by
1.9.8