| | | 1 | | namespace NGql.Core; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Contains constant values used throughout the application. |
| | | 5 | | /// </summary> |
| | | 6 | | public static class Constants |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// The default field type when no type is specified. |
| | | 10 | | /// </summary> |
| | | 11 | | public const string DefaultFieldType = "String"; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// The field type used for object/container fields that have nested fields. |
| | | 15 | | /// </summary> |
| | | 16 | | public const string ObjectFieldType = "object"; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// The marker for array types. |
| | | 20 | | /// </summary> |
| | | 21 | | public const string ArrayTypeMarker = "[]"; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// The marker for nullable types. |
| | | 25 | | /// </summary> |
| | | 26 | | public const string NullableTypeMarker = "?"; |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// The marker for array types as a span. |
| | | 30 | | /// </summary> |
| | 15 | 31 | | internal static ReadOnlySpan<char> ArrayTypeMarkerSpan => ArrayTypeMarker.AsSpan(); |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// The default field type as span. |
| | | 35 | | /// </summary> |
| | 3699 | 36 | | internal static ReadOnlySpan<char> DefaultFieldTypeSpan => DefaultFieldType.AsSpan(); |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// The object field type as span. |
| | | 40 | | /// </summary> |
| | 17259 | 41 | | internal static ReadOnlySpan<char> ObjectFieldTypeSpan => ObjectFieldType.AsSpan(); |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// The marker for nullable types as a span. |
| | | 45 | | /// </summary> |
| | 39 | 46 | | internal static ReadOnlySpan<char> NullableTypeMarkerSpan => NullableTypeMarker.AsSpan(); |
| | | 47 | | } |